Hi,

I got from a other porter this answer:

Your also going to have to include io.h to pull in the setmode(), then the tests pass.

The makefiles, configure and check.sh also need exeext added to properly support OS/2 and Windows.

Anything usefull ?


Dave
On  2-08-10 02:20, JonY wrote:
On 8/1/2010 23:02, Antonio Diaz Diaz wrote:
JonY wrote:
According to <http://www.lesstif.org/~amai/os2/html/porting.html>,
setmode looks to be available on OS/2.

Can we agree to use setmode?

I have found that minigzip.c[1] from zlib uses this for Cygwin and OS/2:
setmode(fileno(file), O_BINARY)

[1]http://www.sfr-fresh.com/unix/misc/zlib-1.2.5.tar.gz:a/zlib-1.2.5/minigzip.c

(see line 38).

So I plan to include the following near the beginning of main():
#if defined(OS2) || defined(__CYGWIN__)
setmode( STDIN_FILENO, O_BINARY );
setmode( STDOUT_FILENO, O_BINARY );
#endif

Elbert, JonY, can you check if this works both on Cygwin and OS/2? Thanks.


Hi,

This only applies to the older Cygwin 1.5, I think. Cygwin 1.7 now uses binary IO only, text mode was dropped.

Anyway, Cygwin versions builds and passes the test without any changes. I tested with lzip-1.11-rc3-20100729.

_______________________________________________
Lzip-bug mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lzip-bug



_______________________________________________
Lzip-bug mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lzip-bug

Reply via email to