[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lzip-bug] Re: Version 1.11-rc2 of lzip released

From: Antonio Diaz Diaz
Subject: [Lzip-bug] Re: Version 1.11-rc2 of lzip released
Date: Sat, 31 Jul 2010 19:03:54 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905

JonY wrote:
Setting to stdin and stdout implicitly to binary mode at the beginning of main solved the problems. Something like:

 int main( const int argc, const char * const argv[] )

Thanks. I have already uploaded rc3. I'll announce it tomorrow.

setmode looks to be available with OS/2 as well, but its unrelated to BSD setmode.

Is there some "setmode" function common to Windows and OS/2? OS/2 seems to use this:

+#ifdef __EMX__
+  _fsetmode( stdin, "b");
+  _fsetmode( stdout, "b");

I would consider adding a conditional for binary mode stdin/stdout, but not litter the code with a conditional per system. Text mode is a bug[1], not a feature.

[1] http://cygwin.com/faq.html
"Actually there's no really good reason to do text mode processing since it only slows down reading and writing files".

There are some minor issues for win32 too, it doesn't have fchmod() and fchown() and some other permission related macros. How should these be dealt with in the long term?

In the short term I expect packagers to comment them out. ;-)

In the medium term I expect most "posix-like environments" (Cygwin, MinGW) for non-posix systems will implement[2] (or at least fake) them.

[2] http://en.wikipedia.org/wiki/MinGW#Comparison_with_Cygwin
"Cygwin aims to provide a complete POSIX layer (similar to that found in a Linux or other Unix systems) on top of Windows, sacrificing performance where necessary for compatibility".

In the long term I hope non-posix systems will become posix-systems or dissapear.

But suggestions are welcome. :-)

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]