You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rasmus Lerdorf <ra...@lerdorf.on.ca> on 1997/09/04 04:20:42 UTC

regex.h in 1.2 and 1.3?

In conf.h which is included by httpd.h there is a:

   #include <regex.h>

line which is used regardless of whether WANTHSREGEX is set to yes or no.
When WANTHSREGEX is set to yes, should this not point to regex/regex.h ?
Or am I missing something?

I am currently forced to work around it in mod_php by cheating and
defining _REGEX_H to stop Apache from inluding the system version of
regex.h overtop of the HS version.

-Rasmus


Re: regex.h in 1.2 and 1.3?

Posted by Rasmus Lerdorf <ra...@lerdorf.on.ca>.
> This is not valid if you set WANTHSREGEX when your system has a regex.h
> header of its own.  I guess there is a fair argument for changing this,
> assuming you really need to use WANTHSREGEX on systems with regex.h.

There are a lot of shitty system regex libraries out there.  Just because
a system happens to have a regex.h in /usr/include doesn't mean the
library is any good.  If that was the case, we should be detecting this
directly and just forcing WANTHSREGEX to the correct setting.  I think the
idea behind WANTHSREGEX was that people could choose to use the bundled
version if they wanted to without fear of their own library interfering.

-Rasmus


Re: regex.h in 1.2 and 1.3?

Posted by Marc Slemko <ma...@worldgate.com>.
Nono, that is just if you use "-I-" in the command line.

On Wed, 3 Sep 1997, Dean Gaudet wrote:

> <> and -I aren't friends.  From "man gcc":
> 
>     Any directories you specify with `-I'  options  be-
>     fore  the  `-I-'  option  are searched only for the
>     case of `#include "file"'; they  are  not  searched
>     for `#include <file>'.
> 
> So this is a bug.  It needs to use #include "regex.h".
> 
> Dean
> 
> On Wed, 3 Sep 1997, Marc Slemko wrote:
> 
> > The idea is that if you don't have a system regex library, you don't have
> > a regex.h in your system include directories, so that <regex.h> will point
> > to the one referenced by:
> > 
> >     INCLUDES="$INCLUDES -I${SRCDIR}/regex"
> > 
> > This is not valid if you set WANTHSREGEX when your system has a regex.h
> > header of its own.  I guess there is a fair argument for changing this,
> > assuming you really need to use WANTHSREGEX on systems with regex.h.
> > 
> > On Wed, 3 Sep 1997, Rasmus Lerdorf wrote:
> > 
> > > In conf.h which is included by httpd.h there is a:
> > > 
> > >    #include <regex.h>
> > > 
> > > line which is used regardless of whether WANTHSREGEX is set to yes or no.
> > > When WANTHSREGEX is set to yes, should this not point to regex/regex.h ?
> > > Or am I missing something?
> > > 
> > > I am currently forced to work around it in mod_php by cheating and
> > > defining _REGEX_H to stop Apache from inluding the system version of
> > > regex.h overtop of the HS version.
> > > 
> > > -Rasmus
> > > 
> > 
> > 
> 


Re: regex.h in 1.2 and 1.3?

Posted by Dean Gaudet <dg...@arctic.org>.
<> and -I aren't friends.  From "man gcc":

    Any directories you specify with `-I'  options  be-
    fore  the  `-I-'  option  are searched only for the
    case of `#include "file"'; they  are  not  searched
    for `#include <file>'.

So this is a bug.  It needs to use #include "regex.h".

Dean

On Wed, 3 Sep 1997, Marc Slemko wrote:

> The idea is that if you don't have a system regex library, you don't have
> a regex.h in your system include directories, so that <regex.h> will point
> to the one referenced by:
> 
>     INCLUDES="$INCLUDES -I${SRCDIR}/regex"
> 
> This is not valid if you set WANTHSREGEX when your system has a regex.h
> header of its own.  I guess there is a fair argument for changing this,
> assuming you really need to use WANTHSREGEX on systems with regex.h.
> 
> On Wed, 3 Sep 1997, Rasmus Lerdorf wrote:
> 
> > In conf.h which is included by httpd.h there is a:
> > 
> >    #include <regex.h>
> > 
> > line which is used regardless of whether WANTHSREGEX is set to yes or no.
> > When WANTHSREGEX is set to yes, should this not point to regex/regex.h ?
> > Or am I missing something?
> > 
> > I am currently forced to work around it in mod_php by cheating and
> > defining _REGEX_H to stop Apache from inluding the system version of
> > regex.h overtop of the HS version.
> > 
> > -Rasmus
> > 
> 
> 


Re: regex.h in 1.2 and 1.3?

Posted by Marc Slemko <ma...@worldgate.com>.
The idea is that if you don't have a system regex library, you don't have
a regex.h in your system include directories, so that <regex.h> will point
to the one referenced by:

    INCLUDES="$INCLUDES -I${SRCDIR}/regex"

This is not valid if you set WANTHSREGEX when your system has a regex.h
header of its own.  I guess there is a fair argument for changing this,
assuming you really need to use WANTHSREGEX on systems with regex.h.

On Wed, 3 Sep 1997, Rasmus Lerdorf wrote:

> In conf.h which is included by httpd.h there is a:
> 
>    #include <regex.h>
> 
> line which is used regardless of whether WANTHSREGEX is set to yes or no.
> When WANTHSREGEX is set to yes, should this not point to regex/regex.h ?
> Or am I missing something?
> 
> I am currently forced to work around it in mod_php by cheating and
> defining _REGEX_H to stop Apache from inluding the system version of
> regex.h overtop of the HS version.
> 
> -Rasmus
>