+2020-01-03 Bruno Haible <bruno@clisp.org>
+
+ getopt-posix: Fix compilation failure in testdirs.
+ * lib/unistd.in.h: Include <getopt-cdefs.h> and <getopt-pfx-core.h> only
+ when the gnulib module 'getopt-posix' is enabled.
+ * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_GETOPT_POSIX.
+ * modules/getopt-posix (configure.ac): Set GNULIB_GETOPT_POSIX as a
+ module indicator.
+ * modules/unistd (Makefile.am): Substitute GNULIB_GETOPT_POSIX.
+
2020-01-03 Bruno Haible <bruno@clisp.org>
doc: Mention the 64-bit inode number problem.
/* Get getopt(), optarg, optind, opterr, optopt. */
-#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
+#if @GNULIB_GETOPT_POSIX@ && @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
# include <getopt-cdefs.h>
# include <getopt-pfx-core.h>
#endif
-# unistd_h.m4 serial 76
+# unistd_h.m4 serial 77
dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME])
GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN])
GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
+ GNULIB_GETOPT_POSIX=0; AC_SUBST([GNULIB_GETOPT_POSIX])
GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
GNULIB_GETPASS=0; AC_SUBST([GNULIB_GETPASS])
GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])
GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT=1
fi
AC_SUBST([GNULIB_${gl_include_guard_prefix}_UNISTD_H_GETOPT])
+gl_UNISTD_MODULE_INDICATOR([getopt-posix])
Makefile.am:
BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H)
-e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
-e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
-e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
+ -e 's/@''GNULIB_GETOPT_POSIX''@/$(GNULIB_GETOPT_POSIX)/g' \
-e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
-e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
-e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \