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: Roland McGrath <roland at redhat dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: libc-alpha <libc-alpha at sources dot redhat dot com>
- Date: Thu, 7 Apr 2005 19:01:00 -0700
- Subject: Re: nonnull markings in sys/cdefs.h causes trouble with gcc-3.3 ?
If __nonnull actually has anything to do with it, that seems like the bug.
The string.h declaration has __THROW, which in C++ is `throw ()'. That is
the type of the C library function. If you don't want to write a function
of the same type, then you shouldn't be using the name of a function that
is declared by the C library. strcasestr is not a standard function, it is
a GNU extension. So you won't get it if you request a standard environment
using _POSIX_SOURCE et al, only with _GNU_SOURCE or the default condition.
If you want to use _GNU_SOURCE, then don't try to redefine libc functions.