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: cvs commit: apache-2.0/src/lib/apr/include apr.h.in
Date Sun, 11 Jun 2000 16:29:55 GMT
> From: Greg Stein [mailto:gstein@lyra.org]
> Sent: Sunday, June 11, 2000 4:14 AM
> 
> On Sun, Jun 11, 2000 at 09:08:06AM -0000, bjh@locus.apache.org wrote:
> > bjh         00/06/11 02:08:06
> > 
> >   Modified:    src/lib/apr/include apr.h.in
> >   Log:
> >   Fix definition of APR_HAVE_STRICMP & APR_HAVE_STRNICMP.
> >   
> >   Revision  Changes    Path
> >   1.32      +2 -2      apache-2.0/src/lib/apr/include/apr.h.in
> >   
> >   Index: apr.h.in
> >   
> >   -#define APR_HAVE_STRICMP        @have_strcasecmp@
> >   -#define APR_HAVE_STRNICMP       @have_strncasecmp@
> >   +#define APR_HAVE_STRICMP        @have_stricmp@
> >   +#define APR_HAVE_STRNICMP       @have_strnicmp@
> 
> Actually, this points out something weird:
> 
> why does APR define STRICMP *and* STRCASECMP? shouldn't we 
> decide on one or the other and stick with that one?

We did, it's strcasecmp.

  Index: apr_general.h
  ===================================================================
   #if (!APR_HAVE_STRNCASECMP) && (APR_HAVE_STRNICMP)
  -#define strncasecmp(s1, s2) strnicmp(s1, s2)
  +#define strncasecmp(s1, s2, n) strnicmp(s1, s2, n)
   #elif (!APR_HAVE_STRNCASECMP)
   int strncasecmp(const char *a, const char *b, size_t n);
   #endif

APR_HAVE_STRICMP and APR_HAVE_STRNICMP allow us to create the macro
equivilants for strcasecmp and strncasecmp.  

Mime
View raw message