Mercurial > gnulib
changeset 19238:806a0059d978
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.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 09 Oct 2017 16:33:00 +0200 |
parents | c48260aa19be |
children | 59092bc6d463 |
files | ChangeLog lib/unistd.in.h |
diffstat | 2 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Oct 08 18:10:48 2017 +0200 +++ b/ChangeLog Mon Oct 09 16:33:00 2017 +0200 @@ -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.
--- a/lib/unistd.in.h Sun Oct 08 18:10:48 2017 +0200 +++ b/lib/unistd.in.h Mon Oct 09 16:33:00 2017 +0200 @@ -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