[Top][All Lists]

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

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

From: Elbert Pol
Subject: Re: [Lzip-bug] Re: Version 1.11-rc2 of lzip released
Date: Sun, 01 Aug 2010 10:28:56 +0200
User-agent: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv: Gecko/20100714 Thunderbird/3.1.1

 On  1-08-10 01:37, JonY wrote:

Some info @ the fsetmode ...


If you search for Emx  _fsetmode you will see alot :)

On 8/1/2010 01:03, Antonio Diaz Diaz wrote:
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");

Sorry, no _fsetmode on win32. I can't seem to find OS/2 docs anywhere, but some ffmpeg discussion mentions setmode being available to OS/2 as well.

Elbert, care to comment?

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".

IMHO, that was MS's bad decision for backwards compatibility.

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".

mingw developers would rave on how mingw is not posix and doesn't try to be posix, unless its adding minimalist support for its toolchain infrastructure.

Cygwin however performs flawlessly for lzip, it does try to be posix.

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

That would be nice. :)

But suggestions are welcome. :-)

None at the moment, unless you are willing to use autotools, or at least some compile tests in configure to find out if these functions are available.

Lzip-bug mailing list

reply via email to

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