[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getopt: make declaration available from <unistd.h>
From: |
Bruno Haible |
Subject: |
Re: getopt: make declaration available from <unistd.h> |
Date: |
Thu, 13 Aug 2009 01:44:10 +0200 |
User-agent: |
KMail/1.9.9 |
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