diff options
author | Bruno Haible <bruno@clisp.org> | 2017-10-09 16:33:00 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2017-10-09 16:33:00 +0200 |
commit | 180a0d70d117a9da652fa1aa17fff9537b082c2c (patch) | |
tree | 3532e8cd0b26dcfa5c646412fe5bb5212e6dccbd | |
parent | 47104b9c0ecd2f3fbd5350fcdf60921f4ab9dd23 (diff) | |
download | gnulib-180a0d70d117a9da652fa1aa17fff9537b082c2c.tar.gz |
getopt-posix: Fix build failure when using ac_cv_header_getopt_h=no.
Reported by Christian Ehrhardt <christian.ehrhardt@canonical.com>
and Daniel P. Berrange <berrange@redhat.com>.
* lib/unistd.in.h (getopt): Don't attempt to avoid namespace pollution
on glibc systems. The getopt-pfx-core.h file declares exactly what
unistd.h needs, nothing more.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | lib/unistd.in.h | 5 |
2 files changed, 11 insertions, 3 deletions
@@ -1,3 +1,12 @@ +2017-10-09 Bruno Haible <bruno@clisp.org> + + getopt-posix: Fix build failure when using ac_cv_header_getopt_h=no. + Reported by Christian Ehrhardt <christian.ehrhardt@canonical.com> + and Daniel P. Berrange <berrange@redhat.com>. + * lib/unistd.in.h (getopt): Don't attempt to avoid namespace pollution + on glibc systems. The getopt-pfx-core.h file declares exactly what + unistd.h needs, nothing more. + 2017-10-08 Bruno Haible <bruno@clisp.org> vma-iter: Improve support for FreeBSD. diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 748112f382..b5b6e0e9c6 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -134,9 +134,8 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ -/* Get getopt(), optarg, optind, opterr, optopt. - But avoid namespace pollution on glibc systems. */ -#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT +/* Get getopt(), optarg, optind, opterr, optopt. */ +#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT # include <getopt-cdefs.h> # include <getopt-pfx-core.h> #endif |