]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Update after gnulib changed.
authorBruno Haible <bruno@clisp.org>
Fri, 26 Jun 2020 21:22:29 +0000 (23:22 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 26 Jun 2020 22:11:26 +0000 (00:11 +0200)
* gnulib-local/modules/fnmatch.diff: Remove file.
* gnulib-local/lib/fnmatch.c.diff: Remove file.
* gnulib-local/lib/fnmatch_loop.c.diff: Remove file.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove them.
* gettext-tools/src/read-properties.c (properties_parse): Update the fread_file
invocation.
* gettext-tools/po/POTFILES.in: Remove gnulib-lib/copy-acl.c,
gnulib-lib/set-acl.c.
* gettext-runtime/intl/localename.c: Update from gnulib.
* gettext-runtime/intl/relocatable.c: Likewise.
* gettext-runtime/intl/verify.h: Likewise.
* gettext-runtime/intl/windows-rwlock.c: Likewise.

gettext-runtime/intl/localename.c
gettext-runtime/intl/relocatable.c
gettext-runtime/intl/verify.h
gettext-runtime/intl/windows-rwlock.c
gettext-tools/po/POTFILES.in
gettext-tools/src/read-properties.c
gnulib-local/Makefile.am
gnulib-local/lib/fnmatch.c.diff [deleted file]
gnulib-local/lib/fnmatch_loop.c.diff [deleted file]
gnulib-local/modules/fnmatch.diff [deleted file]
libtextstyle/.gitignore

index 180caefc3a50d9b8f7822a545b75890844b4191b..6458f7574e5983a9e8e0205d483e63028265cc10 100644 (file)
@@ -1150,6 +1150,11 @@ extern char * getlocalename_l(int, locale_t);
 # ifndef LOCALE_NAME_MAX_LENGTH
 # define LOCALE_NAME_MAX_LENGTH 85
 # endif
+/* Don't assume that UNICODE is not defined.  */
+# undef GetLocaleInfo
+# define GetLocaleInfo GetLocaleInfoA
+# undef EnumSystemLocales
+# define EnumSystemLocales EnumSystemLocalesA
 #endif
 
 /* We want to use the system's setlocale() function here, not the gnulib
@@ -2564,7 +2569,7 @@ static char lname[LC_MAX * (LOCALE_NAME_MAX_LENGTH + 1) + 1];
 
 /* Callback function for EnumLocales.  */
 static BOOL CALLBACK
-enum_locales_fn (LPTSTR locale_num_str)
+enum_locales_fn (LPSTR locale_num_str)
 {
   char *endp;
   char locval[2 * LOCALE_NAME_MAX_LENGTH + 1 + 1];
index 209a618e9b50f4d8ff9f61f4c9c0663836b80e78..9461458dfd06b326f50716c42de92fed49209552 100644 (file)
@@ -1,5 +1,5 @@
 /* Provide relocatable packages.
-   Copyright (C) 2003-2006, 2008-2019 Free Software Foundation, Inc.
+   Copyright (C) 2003-2006, 2008-2020 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
 # include <libintl.h>
 #endif
 
+#if defined _WIN32 && !defined __CYGWIN__
+/* Don't assume that UNICODE is not defined.  */
+# undef GetModuleFileName
+# define GetModuleFileName GetModuleFileNameA
+#endif
+
 /* Faked cheap 'bool'.  */
 #undef bool
 #undef false
index 2e4997ac9e695d8896a8d3c6452372a02a8a8221..11dc4bf7a5ff948661c614bffea2d8f83f9cab28 100644 (file)
@@ -277,10 +277,22 @@ template <int w>
 #endif
 
 /* Assume that R always holds.  Behavior is undefined if R is false,
-   fails to evaluate, or has side effects.  Although assuming R can
-   help a compiler generate better code or diagnostics, performance
-   can suffer if R uses hard-to-optimize features such as function
-   calls not inlined by the compiler.  */
+   fails to evaluate, or has side effects.
+
+   'assume (R)' is a directive from the programmer telling the
+   compiler that R is true so the compiler needn't generate code to
+   test R.  This is why 'assume' is in verify.h: it's related to
+   static checking (in this case, static checking done by the
+   programmer), not dynamic checking.
+
+   'assume (R)' can affect compilation of all the code, not just code
+   that happens to be executed after the assume (R) is "executed".
+   For example, if the code mistakenly does 'assert (R); assume (R);'
+   the compiler is entitled to optimize away the 'assert (R)'.
+
+   Although assuming R can help a compiler generate better code or
+   diagnostics, performance can suffer if R uses hard-to-optimize
+   features such as function calls not inlined by the compiler.  */
 
 #if _GL_HAS_BUILTIN_UNREACHABLE
 # define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
index c69427e98f4e7db837c0e2c39a348c56d0a79cb0..30707d4ec61e952fcfd81daae705c7e199c77ff1 100644 (file)
@@ -1,5 +1,5 @@
 /* Read-write locks (native Windows implementation).
-   Copyright (C) 2005-2019 Free Software Foundation, Inc.
+   Copyright (C) 2005-2020 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
 #include <errno.h>
 #include <stdlib.h>
 
+/* Don't assume that UNICODE is not defined.  */
+#undef CreateEvent
+#define CreateEvent CreateEventA
+
 /* In this file, the waitqueues are implemented as circular arrays.  */
 #define glwthread_waitqueue_t glwthread_carray_waitqueue_t
 
index 931cf67b243827902814803d855a483db1f1333a..77f5e744e0cd2c209b2b5d57b2cade6c076a8b6a 100644 (file)
@@ -10,7 +10,6 @@
 gnulib-lib/argmatch.c
 gnulib-lib/clean-temp.c
 gnulib-lib/closeout.c
-gnulib-lib/copy-acl.c
 gnulib-lib/copy-file.c
 gnulib-lib/csharpcomp.c
 gnulib-lib/csharpexec.c
@@ -24,7 +23,6 @@ gnulib-lib/obstack.c
 gnulib-lib/pipe-filter-aux.c
 gnulib-lib/pipe-filter-ii.c
 gnulib-lib/quotearg.c
-gnulib-lib/set-acl.c
 gnulib-lib/spawn-pipe.c
 gnulib-lib/w32spawn.h
 gnulib-lib/wait-process.c
index 4dcb8aaeb71e049ba6da3749f0f96119f94fa39e..5ae010b542b6d2e29e9cccea8dd9ce8888557a9c 100644 (file)
@@ -600,7 +600,7 @@ properties_parse (abstract_catalog_reader_ty *this, FILE *file,
                   const char *real_filename, const char *logical_filename)
 {
   /* Read the file into memory.  */
-  contents = fread_file (file, &contents_length);
+  contents = fread_file (file, 0, &contents_length);
   if (contents == NULL)
     {
       const char *errno_description = strerror (errno);
index 9247c1c19e6dff49f5c6d6f025e0b968eedc6202..94349ad0d823bd3dda91c19299efe8df74840cf4 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the gnulib-local directory of GNU gettext
-## Copyright (C) 2006-2008, 2010-2012, 2014-2019 Free Software Foundation, Inc.
+## Copyright (C) 2006-2008, 2010-2012, 2014-2020 Free Software Foundation, Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -34,8 +34,6 @@ lib/error.h.diff \
 lib/error-progname.c \
 lib/error-progname.h \
 lib/exitfail.h.diff \
-lib/fnmatch.c.diff \
-lib/fnmatch_loop.c.diff \
 lib/getopt-core.h.diff \
 lib/gettext.h \
 lib/gl_array_list.h.diff \
@@ -164,7 +162,6 @@ modules/backupfile \
 modules/basename \
 modules/closeout \
 modules/error-progname \
-modules/fnmatch.diff \
 modules/gettext-runtime-misc \
 modules/gettext-tools-misc \
 modules/hash \
diff --git a/gnulib-local/lib/fnmatch.c.diff b/gnulib-local/lib/fnmatch.c.diff
deleted file mode 100644 (file)
index 47ffc44..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-*** lib/fnmatch.c.bak  2006-07-11 13:54:17.000000000 +0200
---- lib/fnmatch.c      2006-07-30 20:23:09.000000000 +0200
-***************
-*** 276,282 ****
-  fnmatch (const char *pattern, const char *string, int flags)
-  {
-  # if HANDLE_MULTIBYTE
-! #  define ALLOCA_LIMIT 2000
-    if (__builtin_expect (MB_CUR_MAX, 1) != 1)
-      {
-        mbstate_t ps;
---- 276,286 ----
-  fnmatch (const char *pattern, const char *string, int flags)
-  {
-  # if HANDLE_MULTIBYTE
-! #  if HAVE_ALLOCA || defined _LIBC
-! #   define ALLOCA_LIMIT 2000
-! #  else
-! #   define ALLOCA_LIMIT 0
-! #  endif
-    if (__builtin_expect (MB_CUR_MAX, 1) != 1)
-      {
-        mbstate_t ps;
diff --git a/gnulib-local/lib/fnmatch_loop.c.diff b/gnulib-local/lib/fnmatch_loop.c.diff
deleted file mode 100644 (file)
index 3224f93..0000000
+++ /dev/null
@@ -1,277 +0,0 @@
-*** lib/fnmatch_loop.c.bak     2009-12-10 20:38:55.000000000 +0100
---- lib/fnmatch_loop.c 2009-12-11 11:55:04.000000000 +0100
-***************
-*** 1021,1040 ****
-    struct patternlist
-    {
-      struct patternlist *next;
-      CHAR str[FLEXIBLE_ARRAY_MEMBER];
-    } *list = NULL;
-    struct patternlist **lastp = &list;
-    size_t pattern_len = STRLEN (pattern);
-    const CHAR *p;
-    const CHAR *rs;
-    enum { ALLOCA_LIMIT = 8000 };
-  
-    /* Parse the pattern.  Store the individual parts in the list.  */
-    level = 0;
-    for (startp = p = pattern + 1; ; ++p)
-      if (*p == L_('\0'))
-        /* This is an invalid pattern.  */
-!       return -1;
-      else if (*p == L_('['))
-        {
-          /* Handle brackets special.  */
---- 1021,1046 ----
-    struct patternlist
-    {
-      struct patternlist *next;
-+     int malloced;
-      CHAR str[FLEXIBLE_ARRAY_MEMBER];
-    } *list = NULL;
-    struct patternlist **lastp = &list;
-    size_t pattern_len = STRLEN (pattern);
-    const CHAR *p;
-    const CHAR *rs;
-+ #if HAVE_ALLOCA || defined _LIBC
-    enum { ALLOCA_LIMIT = 8000 };
-+ #else
-+   enum { ALLOCA_LIMIT = 0 };
-+ #endif
-+   int retval;
-  
-    /* Parse the pattern.  Store the individual parts in the list.  */
-    level = 0;
-    for (startp = p = pattern + 1; ; ++p)
-      if (*p == L_('\0'))
-        /* This is an invalid pattern.  */
-!       goto failed;
-      else if (*p == L_('['))
-        {
-          /* Handle brackets special.  */
-***************
-*** 1052,1058 ****
-          while (*p != L_(']'))
-            if (*p++ == L_('\0'))
-              /* This is no valid pattern.  */
-!             return -1;
-        }
-      else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@')
-                || *p == L_('!')) && p[1] == L_('('))
---- 1058,1064 ----
-          while (*p != L_(']'))
-            if (*p++ == L_('\0'))
-              /* This is no valid pattern.  */
-!             goto failed;
-        }
-      else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@')
-                || *p == L_('!')) && p[1] == L_('('))
-***************
-*** 1075,1085 ****
-              plensize = plen * sizeof (CHAR);                                  \
-              newpsize = FLEXSIZEOF (struct patternlist, str, plensize);        \
-              if ((size_t) -1 / sizeof (CHAR) < plen                            \
-!                 || newpsize < offsetof (struct patternlist, str)              \
-!                 || ALLOCA_LIMIT <= newpsize)                                  \
-!               return -1;                                                      \
-!             newp = (struct patternlist *) alloca (newpsize);                  \
-!             *((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L_('\0');    \
-              newp->next = NULL;                                                \
-              *lastp = newp;                                                    \
-              lastp = &newp->next
---- 1081,1101 ----
-              plensize = plen * sizeof (CHAR);                                  \
-              newpsize = FLEXSIZEOF (struct patternlist, str, plensize);        \
-              if ((size_t) -1 / sizeof (CHAR) < plen                            \
-!                 || newpsize < offsetof (struct patternlist, str))             \
-!               goto failed;                                                    \
-!             if (newpsize < ALLOCA_LIMIT)                                      \
-!               {                                                               \
-!                 newp = (struct patternlist *) alloca (newpsize);              \
-!                 newp->malloced = 0;                                           \
-!               }                                                               \
-!             else                                                              \
-!               {                                                               \
-!                 newp = (struct patternlist *) malloc (newpsize);              \
-!                 if (!newp)                                                    \
-!                   goto failed;                                                \
-!                 newp->malloced = 1;                                           \
-!               }                                                               \
-!             *((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L_('\0');   \
-              newp->next = NULL;                                                \
-              *lastp = newp;                                                    \
-              lastp = &newp->next
-***************
-*** 1103,1113 ****
-      {
-      case L_('*'):
-        if (FCT (p, string, string_end, no_leading_period, flags) == 0)
-!         return 0;
-        FALLTHROUGH;
-      case L_('+'):
-        do
-          {
-            for (rs = string; rs <= string_end; ++rs)
-              /* First match the prefix with the current pattern with the
-                 current pattern.  */
---- 1119,1134 ----
-      {
-      case L_('*'):
-        if (FCT (p, string, string_end, no_leading_period, flags) == 0)
-!         {
-!           retval = 0;
-!           goto done;
-!         }
-        FALLTHROUGH;
-      case L_('+'):
-        do
-          {
-+           struct patternlist *next;
-+ 
-            for (rs = string; rs <= string_end; ++rs)
-              /* First match the prefix with the current pattern with the
-                 current pattern.  */
-***************
-*** 1130,1159 ****
-                                  : rs[-1] == '/' && NO_LEADING_PERIOD (flags),
-                                  flags & FNM_FILE_NAME
-                                  ? flags : flags & ~FNM_PERIOD) == 0)))
-!               /* It worked.  Signal success.  */
-!               return 0;
-          }
-!       while ((list = list->next) != NULL);
-  
-        /* None of the patterns lead to a match.  */
-        return FNM_NOMATCH;
-  
-      case L_('?'):
-        if (FCT (p, string, string_end, no_leading_period, flags) == 0)
-!         return 0;
-        FALLTHROUGH;
-      case L_('@'):
-        do
-!         /* I cannot believe it but 'strcat' is actually acceptable
-!            here.  Match the entire string with the prefix from the
-!            pattern list and the rest of the pattern following the
-!            pattern list.  */
-!         if (FCT (STRCAT (list->str, p), string, string_end,
-!                  no_leading_period,
-!                  flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0)
-!           /* It worked.  Signal success.  */
-!           return 0;
-!       while ((list = list->next) != NULL);
-  
-        /* None of the patterns lead to a match.  */
-        return FNM_NOMATCH;
---- 1151,1203 ----
-                                  : rs[-1] == '/' && NO_LEADING_PERIOD (flags),
-                                  flags & FNM_FILE_NAME
-                                  ? flags : flags & ~FNM_PERIOD) == 0)))
-!               {
-!                 /* It worked.  Signal success.  */
-!                 retval = 0;
-!                 goto done;
-!               }
-! 
-!           next = list->next;
-!           if (list->malloced)
-!             free (list);
-!           list = next;
-          }
-!       while (list != NULL);
-  
-        /* None of the patterns lead to a match.  */
-        return FNM_NOMATCH;
-  
-      case L_('?'):
-        if (FCT (p, string, string_end, no_leading_period, flags) == 0)
-!         {
-!           retval = 0;
-!           goto done;
-!         }
-        FALLTHROUGH;
-      case L_('@'):
-        do
-!         {
-!           struct patternlist *next;
-! 
-!           /* I cannot believe it but 'strcat' is actually acceptable
-!              here.  Match the entire string with the prefix from the
-!              pattern list and the rest of the pattern following the
-!              pattern list.  */
-!           if (FCT (STRCAT (list->str, p), string, string_end,
-!                    no_leading_period,
-!                    flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0)
-!             {
-!               /* It worked.  Signal success.  */
-!               retval = 0;
-!               goto done;
-!             }
-! 
-!           next = list->next;
-!           if (list->malloced)
-!             free (list);
-!           list = next;
-!         }
-!       while (list != NULL);
-  
-        /* None of the patterns lead to a match.  */
-        return FNM_NOMATCH;
-***************
-*** 1177,1196 ****
-                         : rs[-1] == '/' && NO_LEADING_PERIOD (flags),
-                         flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD)
-                    == 0))
-!             /* This is successful.  */
-!             return 0;
-          }
-  
-        /* None of the patterns together with the rest of the pattern
-           lead to a match.  */
-!       return FNM_NOMATCH;
-  
-      default:
-        assert (! "Invalid extended matching operator");
-        break;
-      }
-  
-!   return -1;
-  }
-  
-  
---- 1221,1255 ----
-                         : rs[-1] == '/' && NO_LEADING_PERIOD (flags),
-                         flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD)
-                    == 0))
-!             {
-!               /* This is successful.  */
-!               retval = 0;
-!               goto done;
-!             }
-          }
-  
-        /* None of the patterns together with the rest of the pattern
-           lead to a match.  */
-!       retval = FNM_NOMATCH;
-!       goto done;
-  
-      default:
-        assert (! "Invalid extended matching operator");
-        break;
-      }
-  
-!  failed:
-!   retval = -1;
-!  done:
-!   while (list != NULL)
-!     {
-!       struct patternlist *next = list->next;
-! 
-!       if (list->malloced)
-!         free (list);
-!       list = next;
-!     }
-!   return retval;
-  }
-  
-  
diff --git a/gnulib-local/modules/fnmatch.diff b/gnulib-local/modules/fnmatch.diff
deleted file mode 100644 (file)
index 59cb1e7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-*** modules/fnmatch.orig       2011-06-02 22:42:23.000000000 +0200
---- modules/fnmatch    2011-06-02 22:42:43.000000000 +0200
-***************
-*** 9,15 ****
-  
-  Depends-on:
-  fnmatch-h
-! alloca          [test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1]
-  attribute       [test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1]
-  builtin-expect  [test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1]
-  flexmember      [test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1]
---- 9,15 ----
-  
-  Depends-on:
-  fnmatch-h
-! alloca-opt      [test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1]
-  attribute       [test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1]
-  builtin-expect  [test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1]
-  flexmember      [test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1]
index 36a5aebdbbed3a776597dc452a64748616d63a1b..1f722c4a4efbb13a74f3d9c167d3187e08713762 100644 (file)
 /lib/c-strcase.h
 /lib/c-strcasecmp.c
 /lib/c-strncasecmp.c
+/lib/cloexec.c
+/lib/cloexec.h
 /lib/close.c
 /lib/concat-filename.c
 /lib/concat-filename.h
 /lib/dirname.h
 /lib/dirname-lgpl.c
 /lib/dosname.h
+/lib/dup2.c
 /lib/errno.in.h
 /lib/error.c
 /lib/error.h
@@ -45,6 +48,7 @@
 /lib/exitfail.h
 /lib/fatal-signal.c
 /lib/fatal-signal.h
+/lib/fcntl.c
 /lib/fcntl.in.h
 /lib/fd-hook.c
 /lib/fd-hook.h
@@ -67,6 +71,7 @@
 /lib/get_ppid_of.h
 /lib/get_progname_of.c
 /lib/get_progname_of.h
+/lib/getdtablesize.c
 /lib/gethostname.c
 /lib/getprogname.c
 /lib/getprogname.h
 /lib/noreturn.h
 /lib/obstack.c
 /lib/obstack.h
+/lib/open.c
 /lib/ostream.oo.c
 /lib/ostream.oo.h
 /lib/pathmax.h