need to define _ISOC99_SOURCE
Ulrich Drepper
drepper@redhat.com
Wed Jul 26 09:23:00 GMT 2000
"Joseph S. Myers" <jsm28@cam.ac.uk> writes:
> In this particular case, since <wchar.h> and <wctype.h> were first added
> in AMD1, functions defined there should not be conditioned in them, just
> as all headers define ISO C:1990 things unconditionally, headers such as
> <unistd.h> define POSIX.1 things unconditionally, etc..
No. Wrong. Headers of these names were stupidly used before
standardizations. Also, if you are using functionality from a certain
standard you must define the appropriate feature selection macro.
Otherwise the system is allowed to do anything.
> (The defintion of __USE_ANSI seems unnecessary: it is nowhere
> used.
Might be.
> # define _ISOC99_SOURCE 1
>
> to the default defines in the case that no feature test macros or strict
> standards conformance has been specified:
>
> #if (!defined __STRICT_ANSI__ && !defined _ISOC99_SOURCE && \
> !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE && \
> !defined _XOPEN_SOURCE && !defined _XOPEN_SOURCE_EXTENDED && \
> !defined _BSD_SOURCE && !defined _SVID_SOURCE)
> # define _BSD_SOURCE 1
> # define _SVID_SOURCE 1
> #endif
No. The compiler flag must match. Go to the gcc people and make them
use ICO C99 as the standard.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
More information about the Libc-alpha
mailing list