]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Update after gnulib changed.
authorBruno Haible <bruno@clisp.org>
Mon, 15 May 2017 22:27:57 +0000 (00:27 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 15 May 2017 22:27:57 +0000 (00:27 +0200)
* 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.

.gitignore
autogen.sh
gettext-runtime/m4/wint_t.m4
gnulib-local/Makefile.am
gnulib-local/lib/getopt-core.h.diff [new file with mode: 0644]
gnulib-local/lib/getopt.in.h.diff [deleted file]
gnulib-local/lib/unistd.in.h.diff
gnulib-local/modules/fnmatch.diff

index 276dcfe96843cc6f628a7dc008d49f59e43f5f09..8db6ed74ac063dd4839619559483da2277afbf2e 100644 (file)
@@ -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
 /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
 /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
 /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
 /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
 /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"
index fe8bd3a88304b41fec6614a7c4a7b59f8e09475f..a2f761a4277491c34a107ae4b50e34661c0c0612 100755 (executable)
@@ -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
index 8ff2a5b5a28023c5894592d245f551bfb9663cd9..d30b8bcf837ebf422f312a87f33701f9b37fd1ec 100644 (file)
@@ -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 <wchar.h> has the 'wint_t' type.
+dnl Test whether <wchar.h> has the 'wint_t' type and whether gnulib's
+dnl <wchar.h> or <wctype.h> 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 <wchar.h> or <wctype.h> 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: <stdio.h> must be included before
+   <wchar.h>.
+   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+   included before <wchar.h>.  */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+              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])
 ])
index cfb71aefd1a9b2eaa62b96488c8e3b935dc77baf..50d6396ae6218b707ccbfe26c0f241fd9f835817 100644 (file)
@@ -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 (file)
index 0000000..52d31fa
--- /dev/null
@@ -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
++   <stdlib.h> includes <getopt.h>, and <config.h> is not a prerequisite for
++   using <stdlib.h>, this file can be included without a prior
++   "#include <config.h>".  */
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#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 (file)
index 3504f56..0000000
+++ /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
-+    <stdlib.h> includes <getopt.h>, and <config.h> is not a prerequisite for
-+    using <stdlib.h>, this file can be included without a prior
-+    "#include <config.h>".  */
-+ #ifdef HAVE_CONFIG_H
-+ # include <config.h>
-+ #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.
index f1d693713f58f58b7d0ed0c727ff490c40d435ad..ebde7d3b8a1ef5a64e33833a4f16a930daa716bf 100644 (file)
@@ -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 <getopt.h>
+ # include <getopt-cdefs.h>
+ # include <getopt-pfx-core.h>
  #endif
index bcce9de10c02859c189aa53a8da097b3380887c1..99dae8d6a42e11f84a041d9f0bde5e0d442da99e 100644 (file)
@@ -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"]