--- Akim Demaille <[EMAIL PROTECTED]> wrote:
>
> | On Thu, Nov 16, 2000 at 12:51:05PM +0100, Akim Demaille wrote:
> | :
> | : | -[FILE *f = fopen ("conftestval", "w");
> | : | +[FILE *f = fopen ("conftestval", "wb");
> | :
> | : Portable?
> |
> | Not really my cup of tea, but (from fopen(3) on Linux):
> |
> | # The mode string can also include the letter ``b'' either as a third
> | # character or as a char acter between the characters in any of the
> | # two-character strings described above. This is strictly for
> | # compatibility with ANSI C3.159-1989 (``ANSI C'') and has no effect;
> | # the ``b'' is ignored.
>
> Does anybody know whether using fopen (foo, "wb") is portable? Gary
> uses a test for this, but I don't know if it's really needed. A grep
> on the packages I have at hand show this:
>
I'm really interested in this answer myself. Lars' patch is the correct one if
it is. Lars, just to satisfy my curiosity please send me the output of
`cygcheck -s -r -v'. I'm thinking you've a mix of binary mode processing
default mount vs text mode processing default mounts.
I'm researching fopen using google.com and I find that the "Single UNIX
Specification Version 2" from The Open Group supports wb. I've checked several
man pages and all except those related to PHP supports the 'b' option. It is
also required for conformity by IEEE STDSt (``POSIX'')-ansiC standard according
to http://www.ajk.tele.fi/libc/stdio/fopen.3.html.
Cheers,
=====
Earnie Boyd
mailto:[EMAIL PROTECTED]
--- <http://earniesystems.safeshopper.com> ---
--- Cygwin: POSIX on Windows <http://gw32.freeyellow.com/> ---
--- Minimalist GNU for Windows <http://www.mingw.org/> ---
__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/