[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#220910: Please reopen



On Sat, Nov 15, 2003 at 05:34:38PM +0100, Erwan David wrote:
> Le Sat 15/11/2003, Colin Watson disait
> > You're using -ansi, which causes some header files to disable functions
> > not called for by ISO C. getopt() is one such. If you remove that flag
> > you should find that getopt() reappears.
> > 
> > See the documentation of the -ansi flag.
> 
> whole unistd.h is outside iso C, so you mean al unistd.h is unusable
> using -ansi ?

The include of <getopt.h> in <unistd.h> is within #ifdef __USE_POSIX2. I
think <unistd.h> assumes IEEE Std 1003.1 by default, which presumably
doesn't include getopt(). See the top of /usr/include/features.h for
more; it looks like you could define _POSIX_C_SOURCE to 2 in addition to
-ansi, for example.

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: