This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: getopt with gcc -ansi
Paul Eggert <eggert@CS.UCLA.EDU> writes:
> Andreas Schwab <schwab@suse.de> writes:
>
>> sleep is allowed everywhere <unistd.h> is allowed, but not getopt.
>
> But in POSIX 1003.1-2004, getopt and sleep are both required functions
> on the same footing; neither is an XSI extension, for example.
> Perhaps this wasn't true in older POSIX revisions, but it's true now.
> The "-ansi" flag should affect only the C standard level, not the
> POSIX revision level, no?
The -ansi flag provides C89, not POSIX.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."