nonnull markings in sys/cdefs.h causes trouble with gcc-3.3 ?

Mike Frysinger vapier@gentoo.org
Fri Apr 8 02:56:00 GMT 2005


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



More information about the Libc-alpha mailing list