This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]