This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: nonnull markings in sys/cdefs.h causes trouble with gcc-3.3 ?
- From: Mike Frysinger <vapier at gentoo dot org>
- To: libc-alpha at sources dot redhat dot com
- Date: Thu, 7 Apr 2005 21:54:41 -0500
- Subject: Re: nonnull markings in sys/cdefs.h causes trouble with gcc-3.3 ?
- Organization: wh0rd.org
- References: <200504080242.j382gpTG010876@magilla.sf.frob.com>
On Thursday 07 April 2005 10:42 pm, Roland McGrath wrote:
> Like I said, don't request the libc function to be declared. You can do
> what you want with names not in the libc name space you are compiling
> against. If you want strcasestr to yourself, don't use _GNU_SOURCE.
well like i half said, simply doing '#include <string.h>' will declare
strcasestr(), even if you dont '#define _GNU_SOURCE' before hand:
$ cat string.cpp
#include <string.h>
$ g++ -E string.cpp | grep -A 1 strcasestr
extern char *strcasestr (__const char *__haystack, __const char *__needle)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
-mike