Eric Blake wrote:
> > POSIX specifies that getopt() and the four variables optarg etc. should be
> > declared in <unistd.h>. But gnulib provides them only in <getopt.h>. This
> > fixes it.
> 
> POSIX doesn't require <getopt.h>.  How about we also change the getopt module 
> to change the recommended Include: line over to <unistd.h>?

POSIX also doesn't require getopt_long. But most GNU programs do, otherwise
it's hard to implement support for --help and --version. And <unistd.h> does
not declare getopt_long; only <getopt.h> does.

To make all this clearer, I have essentially renamed 'getopt' to 'getopt-gnu'
and added a new module 'getopt-posix'.

Bruno


Reply via email to