]> Savannah Git Hosting - gnulib.git/commitdiff
getopt-posix: Fix build failure when using ac_cv_header_getopt_h=no.
authorBruno Haible <bruno@clisp.org>
Mon, 9 Oct 2017 14:33:00 +0000 (16:33 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 9 Oct 2017 14:33:00 +0000 (16:33 +0200)
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.

ChangeLog
lib/unistd.in.h

index 85cc398f9a281f46a2e5cf487a9ee98ce28c05a3..2adb915a0f01302a05c810d99a8e112dbcebae3c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 748112f38257098b8fcdcb4425cb40f3734c755b..b5b6e0e9c6656acc1a3d1ddae92155cfd9d791c2 100644 (file)
 /* 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