You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by rb...@covalent.net on 2000/06/21 02:41:47 UTC
[PATCH] cleanup warnings with --with-maintainer-mode
I really don't know if this will work cross-platform, so I am posting here
first. I got a clean-ish compile on Linux and a very clean compile on
FreeBSD, so I have a bit of hope. Basically the problem is that with the
new strchr and strrchr stuff on Linux, I get a lot of warnings like:
In file included from /home/rbb/tempdir/apache-2.0/src/include/ap_cache.h:5,
from ap_cache.c:1:
/home/rbb/tempdir/apache-2.0/src/include/httpd.h:1053: warning: `strchr'
redefined
/usr/include/bits/string2.h:376: warning: this is the location of the
previous definition
This patch removes those warnings. I am just not sure the patch is a good
idea.
Thoughts? Is my machine the only one doing this?
Ryan
Index: httpd.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/include/httpd.h,v
retrieving revision 1.60
diff -u -d -b -w -u -r1.60 httpd.h
--- httpd.h 2000/06/20 04:22:38 1.60
+++ httpd.h 2000/06/21 00:32:52
@@ -1050,7 +1050,9 @@
*/
#ifdef AP_DEBUG
+#undef strchr
# define strchr(s, c) ap_strchr(s,c)
+#undef strrchr
# define strrchr(s, c) ap_strrchr(s,c)
char *ap_strchr(char *s, int c);
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------
Re: [PATCH] cleanup warnings with --with-maintainer-mode
Posted by Sascha Schumann <sa...@schumann.cx>.
On Tue, 20 Jun 2000 rbb@covalent.net wrote:
>
> I really don't know if this will work cross-platform, so I am posting here
> first. I got a clean-ish compile on Linux and a very clean compile on
> FreeBSD, so I have a bit of hope. Basically the problem is that with the
> new strchr and strrchr stuff on Linux, I get a lot of warnings like:
>
> In file included from /home/rbb/tempdir/apache-2.0/src/include/ap_cache.h:5,
> from ap_cache.c:1:
> /home/rbb/tempdir/apache-2.0/src/include/httpd.h:1053: warning: `strchr'
> redefined
> /usr/include/bits/string2.h:376: warning: this is the location of the
> previous definition
>
>
> This patch removes those warnings. I am just not sure the patch is a good
> idea.
>
> Thoughts? Is my machine the only one doing this?
Glibc 2.1 uses inlined string functions (=macros) which
causes the above warnings. Undefining those macros is fine
and does not cause any problems.
- Sascha