You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@locus.apache.org on 2000/06/10 19:15:42 UTC
cvs commit: apache-2.0/src/lib/apr/lib apr_cpystrn.c
wrowe 00/06/10 10:15:42
Modified: src/lib/apr aprlib.dsp
src/lib/apr/include apr.hw apr_general.h apr_private.hw
src/lib/apr/lib apr_cpystrn.c
Log:
Some serious completion of stricmp, strnicmp, strdup and strstr issues
on Win32... these all happily reside in the standard runtime library.
Revision Changes Path
1.33 +4 -0 apache-2.0/src/lib/apr/aprlib.dsp
Index: aprlib.dsp
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/aprlib.dsp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- aprlib.dsp 2000/05/27 17:18:57 1.32
+++ aprlib.dsp 2000/06/10 17:15:38 1.33
@@ -309,6 +309,10 @@
# End Source File
# Begin Source File
+SOURCE=.\include\apr_tables.h
+# End Source File
+# Begin Source File
+
SOURCE=.\include\apr_thread_proc.h
# End Source File
# Begin Source File
1.17 +8 -0 apache-2.0/src/lib/apr/include/apr.hw
Index: apr.hw
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.hw,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- apr.hw 2000/06/01 03:11:23 1.16
+++ apr.hw 2000/06/10 17:15:40 1.17
@@ -125,6 +125,14 @@
#define APR_HAVE_IN_ADDR 1
#define APR_HAVE_INET_ADDR 1
+#define APR_HAVE_STRCASECMP 0
+#define APR_HAVE_STRICMP 1
+#define APR_HAVE_STRNCASECMP 0
+#define APR_HAVE_STRNICMP 1
+#define APR_HAVE_STRNICMP 1
+
+#define APR_HAVE_STRDUP 1
+#define APR_HAVE_STRSTR 1
#define APR_USE_FLOCK_SERIALIZE 0
#define APR_USE_SYSVSEM_SERIALIZE 0
1.34 +1 -1 apache-2.0/src/lib/apr/include/apr_general.h
Index: apr_general.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_general.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- apr_general.h 2000/06/09 21:19:48 1.33
+++ apr_general.h 2000/06/10 17:15:40 1.34
@@ -225,7 +225,7 @@
#endif
#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
1.15 +7 -1 apache-2.0/src/lib/apr/include/apr_private.hw
Index: apr_private.hw
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_private.hw,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- apr_private.hw 2000/06/01 03:11:23 1.14
+++ apr_private.hw 2000/06/10 17:15:41 1.15
@@ -115,11 +115,17 @@
/* Use this section to define all of the HAVE_FOO_H
* that are required to build properly.
*/
-#define HAVE_CONIO_H 1
+#define HAVE_CONIO_H 1
#define HAVE_MALLOC_H 1
#define HAVE_STDLIB_H 1
#define HAVE_LIMITS_H 1
#define HAVE_SIGNAL_H 1
+
+#define HAVE_STRICMP 1
+#define HAVE_STRNICMP 1
+#define HAVE_STRNICMP 1
+#define HAVE_STRDUP 1
+#define HAVE_STRSTR 1
#define SIGHUP 1
/* 2 is used for SIGINT on windows */
1.22 +2 -2 apache-2.0/src/lib/apr/lib/apr_cpystrn.c
Index: apr_cpystrn.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_cpystrn.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- apr_cpystrn.c 2000/06/09 21:19:50 1.21
+++ apr_cpystrn.c 2000/06/10 17:15:42 1.22
@@ -259,7 +259,7 @@
#endif
/* The following two routines were donated for SVR4 by Andreas Vogel */
-#ifndef HAVE_STRCASECMP
+#if !defined(HAVE_STRCASECMP) && !defined(HAVE_STRICMP)
int strcasecmp(const char *a, const char *b)
{
const char *p = a;
@@ -278,7 +278,7 @@
#endif
-#ifndef HAVE_STRNCASECMP
+#if !defined(HAVE_STRNCASECMP) && !defined(HAVE_STRNICMP)
int strncasecmp(const char *a, const char *b, size_t n)
{
const char *p = a;
RE: cvs commit: apache-2.0/src/lib/apr/lib apr_cpystrn.c
Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> From: Greg Stein [mailto:gstein@lyra.org]
> Sent: Saturday, June 10, 2000 12:26 PM
>
> On Sat, Jun 10, 2000 at 05:15:42PM -0000,
> wrowe@locus.apache.org wrote:
> >...
> > --- apr.hw 2000/06/01 03:11:23 1.16
> > +++ apr.hw 2000/06/10 17:15:40 1.17
> > +#define APR_HAVE_STRNICMP 1
> > +#define APR_HAVE_STRNICMP 1
>
> two STRNICMP symbols? :-)
>
> is that a dup, or is the second supposed to be something else?
Just wanted to be sure the compiler believed me :-)
Actually, yes, several copies for STRSTR, STRDUP, just forgot
to clean up an extra.
> >...
> > --- apr_private.hw 2000/06/01 03:11:23 1.14
> > +++ apr_private.hw 2000/06/10 17:15:41 1.15
> > +#define HAVE_STRNICMP 1
> > +#define HAVE_STRNICMP 1
>
> whoops! here, too.
Both fixed (not the problem I was planning on attacking today,
must be distracted.) Thanks for catching them.
Bill
Re: cvs commit: apache-2.0/src/lib/apr/lib apr_cpystrn.c
Posted by Greg Stein <gs...@lyra.org>.
On Sat, Jun 10, 2000 at 05:15:42PM -0000, wrowe@locus.apache.org wrote:
>...
> --- apr.hw 2000/06/01 03:11:23 1.16
> +++ apr.hw 2000/06/10 17:15:40 1.17
> @@ -125,6 +125,14 @@
> #define APR_HAVE_IN_ADDR 1
> #define APR_HAVE_INET_ADDR 1
>
> +#define APR_HAVE_STRCASECMP 0
> +#define APR_HAVE_STRICMP 1
> +#define APR_HAVE_STRNCASECMP 0
> +#define APR_HAVE_STRNICMP 1
> +#define APR_HAVE_STRNICMP 1
two STRNICMP symbols? :-)
is that a dup, or is the second supposed to be something else?
>...
> --- apr_private.hw 2000/06/01 03:11:23 1.14
> +++ apr_private.hw 2000/06/10 17:15:41 1.15
> @@ -115,11 +115,17 @@
> /* Use this section to define all of the HAVE_FOO_H
> * that are required to build properly.
> */
> -#define HAVE_CONIO_H 1
> +#define HAVE_CONIO_H 1
> #define HAVE_MALLOC_H 1
> #define HAVE_STDLIB_H 1
> #define HAVE_LIMITS_H 1
> #define HAVE_SIGNAL_H 1
> +
> +#define HAVE_STRICMP 1
> +#define HAVE_STRNICMP 1
> +#define HAVE_STRNICMP 1
> +#define HAVE_STRDUP 1
> +#define HAVE_STRSTR 1
whoops! here, too.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
RE: cvs commit: apache-2.0/src/lib/apr/lib apr_cpystrn.c
Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> From: wrowe@locus.apache.org [mailto:wrowe@locus.apache.org]
> Sent: Saturday, June 10, 2000 12:16 PM
>
> wrowe 00/06/10 10:15:42
>
> Modified: src/lib/apr aprlib.dsp
> src/lib/apr/include apr.hw apr_general.h apr_private.hw
> src/lib/apr/lib apr_cpystrn.c
> Log:
> Some serious completion of stricmp, strnicmp, strdup and strstr issues
> on Win32... these all happily reside in the standard runtime library.
>
> Index: apr_private.hw
> ===================================================================
> RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_private.hw,v
> retrieving revision 1.14
> retrieving revision 1.15
> diff -u -r1.14 -r1.15
> --- apr_private.hw 2000/06/01 03:11:23 1.14
> +++ apr_private.hw 2000/06/10 17:15:41 1.15
> @@ -115,11 +115,17 @@
> /* Use this section to define all of the HAVE_FOO_H
> * that are required to build properly.
> */
> -#define HAVE_CONIO_H 1
> +#define HAVE_CONIO_H 1
> #define HAVE_MALLOC_H 1
> #define HAVE_STDLIB_H 1
> #define HAVE_LIMITS_H 1
> #define HAVE_SIGNAL_H 1
> +
> +#define HAVE_STRICMP 1
> +#define HAVE_STRNICMP 1
> +#define HAVE_STRNICMP 1
> +#define HAVE_STRDUP 1
> +#define HAVE_STRSTR 1
Is there a point to using HAVE_STR* tests in apr_cpystrn.c, when
the apr.h.in/apr.hw will define the APR_HAVE_STR and is testing
_those_symbols_ in apr_general.h macro wrapping? I don't like
discordant macro tests :-/
Bill