httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@lnd.com>
Subject RE: Minor fix to v1.3.12-dev
Date Sat, 19 Feb 2000 08:17:58 GMT
This is almost an ASCII/EBCDIC issue to those cr/lf platforms, so here
are...

TWO solutions - you pick...

One; FILE_TEXT_ARG

[global header]
#if defined(WIN32) || defined(OS2) [|| ...]
#define FILE_TEXT_ARG "t"
#define FILE_RAW_ARG "b"
#else
#define FILE_TEXT_ARG
#define FILE_RAW_ARG
#endif

then all text file open calls...

[local implementation]
hfl = fopen(fpath, "r" FILE_TEXT_ARG)

or on raw file open calls

[local implementation]
hfl = fopen(fpath, "r" FILE_RAW_ARG)

Of course... string concat probably doesn't work on some odd ANSI compiler
(correct???)

So solution 2:

[global header]
#if defined(WIN32) || defined(OS2) [|| ...]
#define FILE_TEXT_RAW_ARG
#endif

[local implementation]
#ifdef FILE_TEXT_RAW_ARG
hfl = fopen(fpath, "rt")
#else
hfl = fopen(fpath, "r")
#endif


Thoughts?

Bill


> -----Original Message-----
> From: Lee Tibbert [mailto:Lee.Tibbert@Compaq.Com]
> Sent: Friday, February 18, 2000 10:28 PM
> To: new-httpd@apache.org
> Subject: Re: Minor fix to v1.3.12-dev
>
>
>
> The non-Ansi 't' breaks the pending OpenVMS port also.  It
> would be nice if
> a non-standard change were #ifdef'd for the operating system which
> used it, instead of forcing strict checking OSes to #ifdef
> around cruft.
>
> We are trying to have the minimal number of #ifdef VMS entries.
> We can #ifdef around this one too, but it lacks elegance.
>
> Lee
>
>
> At 08:34 PM 2/18/2000 -0600, you wrote:
> >On Mon, Feb 14, 2000 at 04:16:08PM -0800, Turner, Ian iant" wrote:
> > >
> > >    A minor change was made to v1.3.11 to resolve a
> problem with Apache on
> > > OS/2, which should have been #IFDEF'ed just for
> > > OS/2 (and any other platform which needs the "t" mode to
> fopen() ),
> > since not
> > > all implementations of Unix ignore the "t" mode.
> > > (I.E. the change breaks Apache on some platforms)
> >
> >Which platforms? If OS/2 is the only platform with the Ctrl-Z issue
> >that spawned this change (probably not true; there is Windows) then
> >we'd use an ifdef for OS/2. If there's only one Unix that croaks on
> >the "t", then we should ifndef for that.
>


Mime
View raw message