RE: COSS - some other fixes

From: Robert Collins <robert.collins@dont-contact.us>
Date: Mon, 20 May 2002 09:30:50 +1000

> -----Original Message-----
> From: Guido Serassio [mailto:serassio@libero.it]
> Sent: Monday, May 20, 2002 3:13 AM
> To: Henrik Nordstrom
> Cc: squid-dev@squid-cache.org
> Subject: Re: COSS - some other fixes
>
>
> Hi,
>
> Il 18.36 19/05/2002 Henrik Nordstrom ha scritto:
> >+#if defined(_SQUID_CYGWIN_)
> >+ setmode(fileno(fp), O_BINARY);
> >+#endif
> >
> >Wouldn't it be better to add a "b" to any binary fopen() calls?
> >
> >stdio mode option b is after all ANSI/ISO C and POSIX standard and
> >therefore UNIX standard.. should be silently ignored on any
> true POSIX
> >system, and honored on any system requiring it..
> >
> >Regards
> >Henrik
>
> I'm not sure about.
> This code was added from Robert at Cygwin merge time. I don't
> know if it's
> really needed in Cygwin.
> Looking on MSDN, MSVCRT seems to honore it, but in all
> SquidNT build I
> leave it ...
> So, I will try on Windows without it.

Cygwin honours r and b in fopen lines. The setfilemode with O_BINARY was
because some 'posix' OS's don't, and that was more portable.

Rob
Received on Sun May 19 2002 - 17:30:53 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:28 MST