You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Turner, Ian (iant)" <ia...@sequent.com> on 2000/02/15 01:16:08 UTC

Minor fix to v1.3.12-dev

   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)

Here is a simple diff to src/main/util.c that should be added to v1.3.12
before it is released.
(this has also been filed as bug general/5760 so it does not get lost)

*** util.c.orig Mon Feb 14 13:25:17 2000
--- util.c      Mon Feb 14 13:28:26 2000
***************
*** 809,815 ****
--- 809,820 ----
          return NULL;
      }
  
+ #ifdef OS2
      file = ap_pfopen(p, name, "rt");
+ #else
+     file = ap_pfopen(p, name, "r");
+ #endif
+ 


RE: Minor fix to v1.3.12-dev

Posted by Greg Stein <gs...@lyra.org>.
On Sat, 19 Feb 2000, William A. Rowe, Jr. wrote:
>...
> Of course... string concat probably doesn't work on some odd ANSI compiler
> (correct???)

We use string concat elsewhere. It should be fine.

Worst case, we can always define things like:

#if defined(WIN32) ...
#define FILE_TEXT_READ "rt"
#define FILE_RAW_READ "rb"
#else
#define FILE_TEXT_READ "r"
#define FILE_RAW_READ "r"
#endif

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/


RE: Minor fix to v1.3.12-dev

Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
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.
>


Re: Minor fix to v1.3.12-dev

Posted by Lee Tibbert <Le...@Compaq.Com>.
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.


Re: Minor fix to v1.3.12-dev

Posted by Manoj Kasichainula <ma...@io.com>.
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.