summaryrefslogtreecommitdiff
path: root/lib/getopt-pfx-core.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-06-11 15:53:09 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-06-11 15:53:41 -0700
commite3461d1c21a99bcef1b8826f710434e0ffb5adea (patch)
tree1d05c67a7dfb0caa1c7240f33f00b79b39164d1e /lib/getopt-pfx-core.h
parent9611fb9ff199a1caea136493de81e16e722abc63 (diff)
downloadgnulib-e3461d1c21a99bcef1b8826f710434e0ffb5adea.tar.gz
getopt-posix: port to glibc 2.25.90
Problem reported by Daniel P. Berrange in: http://lists.gnu.org/archive/html/bug-gnulib/2017-06/msg00003.html * lib/getopt-pfx-core.h (_GETOPT_CORE_H): * lib/getopt-pfx-ext.h (_GETOPT_EXT_H): #undef if __GETOPT_PREFIX is defined.
Diffstat (limited to 'lib/getopt-pfx-core.h')
-rw-r--r--lib/getopt-pfx-core.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/getopt-pfx-core.h b/lib/getopt-pfx-core.h
index 155c11612d..6ad0da683b 100644
--- a/lib/getopt-pfx-core.h
+++ b/lib/getopt-pfx-core.h
@@ -47,6 +47,11 @@
# define opterr __GETOPT_ID (opterr)
# define optind __GETOPT_ID (optind)
# define optopt __GETOPT_ID (optopt)
+
+/* The system's getopt.h may have already included getopt-core.h to
+ declare the unprefixed identifiers. Undef _GETOPT_CORE_H so that
+ getopt-core.h declares them with prefixes. */
+# undef _GETOPT_CORE_H
#endif
#include <getopt-core.h>