From: Bruno Haible Date: Mon, 15 May 2017 22:27:57 +0000 (+0200) Subject: Update after gnulib changed. X-Git-Tag: v0.20~465 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6f9caf8cc7614665d1be694485dd7bc30399e0f;p=thirdparty%2Fgettext.git Update after gnulib changed. * gnulib-local/lib/getopt-core.h.diff: New file. * gnulib-local/lib/getopt.in.h.diff: Remove file. * gnulib-local/lib/unistd.in.h.diff: Update. * gnulib-local/modules/fnmatch.diff: Update. * gnulib-local/Makefile.am (EXTRA_DIST): Add lib/getopt-core.h.diff. Remove lib/getopt.in.h.diff. * gettext-runtime/m4/wint_t.m4: Update from gnulib. * autogen.sh: In the gnulib-tool invocations, avoid gnulib test modules that depend on 'hash' (because we use a different 'hash' module). * .gitignore: Update. --- diff --git a/.gitignore b/.gitignore index 276dcfe96..8db6ed74a 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,6 @@ # Files brought in by gnulib-tool: /GNUmakefile /maint.mk -/build-aux/snippet/ /build-aux/config.libpath /build-aux/config.rpath /build-aux/csharpcomp.sh.in @@ -60,8 +59,10 @@ /gettext-tools/libgettextpo/unistr/ /gettext-tools/libgettextpo/uniwidth/ /gettext-tools/libgettextpo/Makefile.gnulib +/gettext-tools/libgettextpo/_Noreturn.h /gettext-tools/libgettextpo/alignof.h /gettext-tools/libgettextpo/alloca.in.h +/gettext-tools/libgettextpo/arg-nonnull.h /gettext-tools/libgettextpo/asnprintf.c /gettext-tools/libgettextpo/asprintf.c /gettext-tools/libgettextpo/basename-lgpl.c @@ -75,6 +76,7 @@ /gettext-tools/libgettextpo/c-strncasecmp.c /gettext-tools/libgettextpo/c-strstr.c /gettext-tools/libgettextpo/c-strstr.h +/gettext-tools/libgettextpo/c++defs.h /gettext-tools/libgettextpo/close.c /gettext-tools/libgettextpo/concat-filename.c /gettext-tools/libgettextpo/concat-filename.h @@ -181,6 +183,8 @@ /gettext-tools/libgettextpo/signal.in.h /gettext-tools/libgettextpo/sigprocmask.c /gettext-tools/libgettextpo/size_max.h +/gettext-tools/libgettextpo/stat-w32.c +/gettext-tools/libgettextpo/stat-w32.h /gettext-tools/libgettextpo/stat.c /gettext-tools/libgettextpo/stdarg.in.h /gettext-tools/libgettextpo/stdbool.in.h @@ -220,14 +224,17 @@ /gettext-tools/libgettextpo/unitypes.in.h /gettext-tools/libgettextpo/uniwidth.in.h /gettext-tools/libgettextpo/unlocked-io.h +/gettext-tools/libgettextpo/unused-parameter.h /gettext-tools/libgettextpo/vasnprintf.c /gettext-tools/libgettextpo/vasnprintf.h /gettext-tools/libgettextpo/vasprintf.c /gettext-tools/libgettextpo/verify.h +/gettext-tools/libgettextpo/warn-on-use.h /gettext-tools/libgettextpo/wchar.in.h /gettext-tools/libgettextpo/wctype-h.c /gettext-tools/libgettextpo/wctype.in.h /gettext-tools/libgettextpo/wcwidth.c +/gettext-tools/libgettextpo/xalloc-oversized.h /gettext-tools/libgettextpo/xalloc.h /gettext-tools/libgettextpo/xasprintf.c /gettext-tools/libgettextpo/xconcat-filename.c @@ -247,6 +254,8 @@ /gettext-tools/libgrep/gnulib-m4/ /gettext-tools/libgrep/Makefile.gnulib /gettext-tools/libgrep/btowc.c +/gettext-tools/libgrep/c++defs.h +/gettext-tools/libgrep/intprops.h /gettext-tools/libgrep/langinfo.in.h /gettext-tools/libgrep/localeconv.c /gettext-tools/libgrep/mbrlen.c @@ -259,6 +268,7 @@ /gettext-tools/libgrep/regex_internal.c /gettext-tools/libgrep/regex_internal.h /gettext-tools/libgrep/regexec.c +/gettext-tools/libgrep/warn-on-use.h /gettext-tools/libgrep/wcrtomb.c /gettext-tools/tests/init.sh @@ -714,10 +724,6 @@ core /gettext-tools/libgettextpo/iconv.h /gettext-tools/libgettextpo/limits.h /gettext-tools/libgettextpo/signal.h -/gettext-tools/libgettextpo/arg-nonnull.h -/gettext-tools/libgettextpo/c++defs.h -/gettext-tools/libgettextpo/unused-parameter.h -/gettext-tools/libgettextpo/warn-on-use.h /gettext-tools/libgettextpo/stdarg.h /gettext-tools/libgettextpo/stdbool.h /gettext-tools/libgettextpo/stddef.h @@ -739,8 +745,6 @@ core /gettext-tools/libgettextpo/wchar.h /gettext-tools/libgettextpo/wctype.h /gettext-tools/libgrep/langinfo.h -/gettext-tools/libgrep/c++defs.h -/gettext-tools/libgrep/warn-on-use.h /gettext-tools/src/gettext.res # Files generated by "make dist" and erased by "make mostlyclean" diff --git a/autogen.sh b/autogen.sh index fe8bd3a88..a2f761a42 100755 --- a/autogen.sh +++ b/autogen.sh @@ -322,7 +322,8 @@ if ! $skip_gnulib; then uniwidth/width-tests ' $GNULIB_TOOL --dir=gettext-tools --lib=libgettextlib --source-base=gnulib-lib --m4-base=gnulib-m4 --tests-base=gnulib-tests --makefile-name=Makefile.gnulib --libtool --with-tests --local-dir=gnulib-local --local-symlink \ - --import --avoid=hash-tests `for m in $GNULIB_MODULES_TOOLS_LIBUNISTRING_TESTS; do echo --avoid=$m; done` $GNULIB_MODULES_TOOLS_FOR_SRC $GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES $GNULIB_MODULES_TOOLS_OTHER || exit $? + --import --avoid=hash-tests --avoid=fdutimensat-tests --avoid=futimens-tests --avoid=utime-tests --avoid=utimens-tests --avoid=utimensat-tests \ + `for m in $GNULIB_MODULES_TOOLS_LIBUNISTRING_TESTS; do echo --avoid=$m; done` $GNULIB_MODULES_TOOLS_FOR_SRC $GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES $GNULIB_MODULES_TOOLS_OTHER || exit $? # In gettext-tools/libgrep: GNULIB_MODULES_TOOLS_FOR_LIBGREP=' mbrlen diff --git a/gettext-runtime/m4/wint_t.m4 b/gettext-runtime/m4/wint_t.m4 index 8ff2a5b5a..d30b8bcf8 100644 --- a/gettext-runtime/m4/wint_t.m4 +++ b/gettext-runtime/m4/wint_t.m4 @@ -1,11 +1,12 @@ -# wint_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2003, 2007-2016 Free Software Foundation, Inc. +# wint_t.m4 serial 7 +dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. -dnl Test whether has the 'wint_t' type. +dnl Test whether has the 'wint_t' type and whether gnulib's +dnl or would, if present, override 'wint_t'. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WINT_T], @@ -28,5 +29,46 @@ AC_DEFUN([gt_TYPE_WINT_T], [gt_cv_c_wint_t=no])]) if test $gt_cv_c_wint_t = yes; then AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) + + dnl Determine whether gnulib's or would, if present, + dnl override 'wint_t'. + AC_CACHE_CHECK([whether wint_t is too small], + [gl_cv_type_wint_t_too_small], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +#endif +#include + int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; + ]])], + [gl_cv_type_wint_t_too_small=no], + [gl_cv_type_wint_t_too_small=yes])]) + if test $gl_cv_type_wint_t_too_small = yes; then + GNULIB_OVERRIDES_WINT_T=1 + else + GNULIB_OVERRIDES_WINT_T=0 + fi + else + GNULIB_OVERRIDES_WINT_T=0 + fi + AC_SUBST([GNULIB_OVERRIDES_WINT_T]) +]) + +dnl Prerequisites of the 'wint_t' override. +AC_DEFUN([gl_TYPE_WINT_T_PREREQ], +[ + AC_CHECK_HEADERS_ONCE([crtdefs.h]) + if test $ac_cv_header_crtdefs_h = yes; then + HAVE_CRTDEFS_H=1 + else + HAVE_CRTDEFS_H=0 fi + AC_SUBST([HAVE_CRTDEFS_H]) ]) diff --git a/gnulib-local/Makefile.am b/gnulib-local/Makefile.am index cfb71aefd..50d6396ae 100644 --- a/gnulib-local/Makefile.am +++ b/gnulib-local/Makefile.am @@ -42,7 +42,7 @@ lib/file-ostream.oo.c \ lib/file-ostream.oo.h \ lib/fnmatch.c.diff \ lib/fnmatch_loop.c.diff \ -lib/getopt.in.h.diff \ +lib/getopt-core.h.diff \ lib/gettext.h \ lib/gl_array_list.h.diff \ lib/glibconfig.in.h \ diff --git a/gnulib-local/lib/getopt-core.h.diff b/gnulib-local/lib/getopt-core.h.diff new file mode 100644 index 000000000..52d31fa97 --- /dev/null +++ b/gnulib-local/lib/getopt-core.h.diff @@ -0,0 +1,46 @@ +--- getopt-core.h 2017-05-15 19:05:30.377063268 +0200 ++++ getopt-core.h.new 2017-05-15 19:10:17.203267905 +0200 +@@ -20,6 +20,14 @@ + #ifndef _GETOPT_CORE_H + #define _GETOPT_CORE_H 1 + ++/* Ensure that DLL_VARIABLE is defined. Since on OSF/1 4.0 and Irix 6.5 ++ includes , and is not a prerequisite for ++ using , this file can be included without a prior ++ "#include ". */ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ + /* This header should not be used directly; include getopt.h or + unistd.h instead. Unlike most bits headers, it does not have + a protective #error, because the guard macro for getopt.h in +@@ -33,7 +41,7 @@ + Also, when 'ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +-extern char *optarg; ++extern DLL_VARIABLE char *optarg; + + /* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller +@@ -47,16 +55,16 @@ + Otherwise, 'optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +-extern int optind; ++extern DLL_VARIABLE int optind; + + /* Callers store zero here to inhibit the error message 'getopt' prints + for unrecognized options. */ + +-extern int opterr; ++extern DLL_VARIABLE int opterr; + + /* Set to an option character which was unrecognized. */ + +-extern int optopt; ++extern DLL_VARIABLE int optopt; + + /* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for diff --git a/gnulib-local/lib/getopt.in.h.diff b/gnulib-local/lib/getopt.in.h.diff deleted file mode 100644 index 3504f564e..000000000 --- a/gnulib-local/lib/getopt.in.h.diff +++ /dev/null @@ -1,71 +0,0 @@ -*** gnulib/lib/getopt.in.h 2005-09-23 06:15:13.000000000 +0200 ---- gettext-tools/lib/getopt.in.h 2006-04-24 03:08:25.000000000 +0200 -*************** -*** 23,28 **** ---- 23,36 ---- - # define _GETOPT_H 1 - #endif - -+ /* Ensure that DLL_VARIABLE is defined. Since on OSF/1 4.0 and Irix 6.5 -+ includes , and is not a prerequisite for -+ using , this file can be included without a prior -+ "#include ". */ -+ #ifdef HAVE_CONFIG_H -+ # include -+ #endif -+ - /* Standalone applications should #define __GETOPT_PREFIX to an - identifier that prefixes the external functions and variables - defined in this header. When this happens, include the -*************** -*** 111,117 **** - Also, when 'ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -! extern char *optarg; - - /* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller ---- 119,125 ---- - Also, when 'ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -! extern DLL_VARIABLE char *optarg; - - /* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller -*************** -*** 125,140 **** - Otherwise, 'optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -! extern int optind; - - /* Callers store zero here to inhibit the error message 'getopt' prints - for unrecognized options. */ - -! extern int opterr; - - /* Set to an option character which was unrecognized. */ - -! extern int optopt; - - #ifndef __need_getopt - /* Describe the long-named options requested by the application. ---- 133,148 ---- - Otherwise, 'optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -! extern DLL_VARIABLE int optind; - - /* Callers store zero here to inhibit the error message 'getopt' prints - for unrecognized options. */ - -! extern DLL_VARIABLE int opterr; - - /* Set to an option character which was unrecognized. */ - -! extern DLL_VARIABLE int optopt; - - #ifndef __need_getopt - /* Describe the long-named options requested by the application. diff --git a/gnulib-local/lib/unistd.in.h.diff b/gnulib-local/lib/unistd.in.h.diff index f1d693713..ebde7d3b8 100644 --- a/gnulib-local/lib/unistd.in.h.diff +++ b/gnulib-local/lib/unistd.in.h.diff @@ -1,8 +1,6 @@ -diff --git a/unistd.in.h b/unistd.in.h -index b82be83..9df3f13 100644 ---- a/unistd.in.h -+++ b/unistd.in.h -@@ -125,7 +125,11 @@ +--- unistd.in.h 2017-05-15 19:05:30.449063823 +0200 ++++ unistd.in.h.new 2017-05-15 19:14:39.145268786 +0200 +@@ -136,7 +136,11 @@ /* Get getopt(), optarg, optind, opterr, optopt. But avoid namespace pollution on glibc systems. */ @@ -12,6 +10,6 @@ index b82be83..9df3f13 100644 + gettext-tools/libgettextpo/, but there is only a single + GNULIB_UNISTD_H_GETOPT variable for both. */ +#if @GNULIB_UNISTD_H_GETOPT@ && !defined GTPO_CONFIG_H && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT - # define __need_getopt - # include + # include + # include #endif diff --git a/gnulib-local/modules/fnmatch.diff b/gnulib-local/modules/fnmatch.diff index bcce9de10..99dae8d6a 100644 --- a/gnulib-local/modules/fnmatch.diff +++ b/gnulib-local/modules/fnmatch.diff @@ -6,14 +6,14 @@ extensions snippet/arg-nonnull ! alloca [test -n "$FNMATCH_H"] + builtin-expect [test -n "$FNMATCH_H"] flexmember [test -n "$FNMATCH_H"] stdbool [test -n "$FNMATCH_H"] - wchar [test -n "$FNMATCH_H"] --- 11,17 ---- Depends-on: extensions snippet/arg-nonnull ! alloca-opt [test -n "$FNMATCH_H"] + builtin-expect [test -n "$FNMATCH_H"] flexmember [test -n "$FNMATCH_H"] stdbool [test -n "$FNMATCH_H"] - wchar [test -n "$FNMATCH_H"]