]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Update after gnulib changed.
authorBruno Haible <bruno@clisp.org>
Thu, 2 Jan 2020 13:54:32 +0000 (14:54 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Apr 2020 08:12:50 +0000 (10:12 +0200)
* gettext-runtime/intl/localcharset.c: Update from gnulib.
* gettext-runtime/intl/setlocale-lock.c: Likewise.

16 files changed:
gettext-runtime/intl/localcharset.c
gettext-runtime/intl/setlocale-lock.c
gettext-runtime/intl/verify.h
gettext-runtime/intl/xsize.h
gettext-runtime/m4/fcntl-o.m4
gettext-runtime/m4/flexmember.m4
gettext-runtime/m4/iconv.m4
gettext-runtime/m4/intlmacosx.m4
gettext-runtime/m4/inttypes-pri.m4
gettext-runtime/m4/inttypes_h.m4
gettext-runtime/m4/nls.m4
gettext-runtime/m4/po.m4
gettext-runtime/m4/progtest.m4
gettext-runtime/m4/size_max.m4
gettext-runtime/m4/stdint_h.m4
gettext-runtime/m4/xsize.m4

index d0d89de51bc782ee666fb0e9f2806ae53cfa52e8..ec75427694e9a90e89d30baf9df78d6ac2c5db95 100644 (file)
@@ -58,6 +58,9 @@
 #elif defined WINDOWS_NATIVE
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>
+  /* For the use of setlocale() below, the Gnulib override in setlocale.c is
+     not needed; see the platform lists in setlocale_null.m4.  */
+# undef setlocale
 #endif
 #if defined OS2
 # define INCL_DOS
index 761cc7f07be310df9602985a0198bb1653ca279e..b824e383e6f705d079f372baca7ec6ba664e0e0a 100644 (file)
@@ -1,5 +1,5 @@
 /* Return the internal lock used by setlocale_null_r.
-   Copyright (C) 2019 Free Software Foundation, Inc.
+   Copyright (C) 2019-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 <config.h>
 
+/* When it is known that the gl_get_setlocale_null_lock function is defined
+   by a dependency library, it should not be defined here.  */
+#if OMIT_SETLOCALE_LOCK
+
+/* This declaration is solely to ensure that after preprocessing
+   this file is never empty.  */
+typedef int dummy;
+
+#else
+
 /* This file defines the internal lock used by setlocale_null_r.
    It is a separate compilation unit, so that only one copy of it is
    present when linking statically.  */
 
 /* Prohibit renaming this symbol.  */
-#undef gl_get_setlocale_null_lock
+# undef gl_get_setlocale_null_lock
 
 /* Macro for exporting a symbol (function, not variable) defined in this file,
    when compiled into a shared library.  */
-#ifndef DLL_EXPORTED
-# if HAVE_VISIBILITY
+# ifndef DLL_EXPORTED
+#  if HAVE_VISIBILITY
   /* Override the effect of the compiler option '-fvisibility=hidden'.  */
-#  define DLL_EXPORTED __attribute__((__visibility__("default")))
-# elif defined _WIN32 || defined __CYGWIN__
-#  define DLL_EXPORTED __declspec(dllexport)
-# else
-#  define DLL_EXPORTED
+#   define DLL_EXPORTED __attribute__((__visibility__("default")))
+#  elif defined _WIN32 || defined __CYGWIN__
+#   define DLL_EXPORTED __declspec(dllexport)
+#  else
+#   define DLL_EXPORTED
+#  endif
 # endif
-#endif
 
-#if defined _WIN32 && !defined __CYGWIN__
+# if defined _WIN32 && !defined __CYGWIN__
 
-# define WIN32_LEAN_AND_MEAN  /* avoid including junk */
-# include <windows.h>
+#  define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#  include <windows.h>
 
-# include "windows-initguard.h"
+#  include "windows-initguard.h"
 
 /* The return type is a 'CRITICAL_SECTION *', not a 'glwthread_mutex_t *',
    because the latter is not guaranteed to be a stable ABI in the future.  */
@@ -79,9 +89,9 @@ gl_get_setlocale_null_lock (void)
   return &lock;
 }
 
-#elif HAVE_PTHREAD_API
+# elif HAVE_PTHREAD_API
 
-# include <pthread.h>
+#  include <pthread.h>
 
 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
 
@@ -95,10 +105,10 @@ gl_get_setlocale_null_lock (void)
   return &mutex;
 }
 
-#elif HAVE_THREADS_H
+# elif HAVE_THREADS_H
 
-# include <threads.h>
-# include <stdlib.h>
+#  include <threads.h>
+#  include <stdlib.h>
 
 static int volatile init_needed = 1;
 static once_flag init_once = ONCE_FLAG_INIT;
@@ -124,15 +134,17 @@ gl_get_setlocale_null_lock (void)
   return &mutex;
 }
 
-#endif
+# endif
 
-#if defined _WIN32 || defined __CYGWIN__
+# if (defined _WIN32 || defined __CYGWIN__) && !defined _MSC_VER
 /* Make sure the '__declspec(dllimport)' in setlocale_null.c does not cause
    a link failure when no DLLs are involved.  */
-# if defined _WIN64 || defined _LP64
-#  define IMP(x) __imp_##x
-# else
-#  define IMP(x) _imp__##x
-# endif
+#  if defined _WIN64 || defined _LP64
+#   define IMP(x) __imp_##x
+#  else
+#   define IMP(x) _imp__##x
+#  endif
 void * IMP(gl_get_setlocale_null_lock) = &gl_get_setlocale_null_lock;
+# endif
+
 #endif
index ca474dd0661565cffbbd752fe9c0cde25f65987d..2e4997ac9e695d8896a8d3c6452372a02a8a8221 100644 (file)
@@ -1,6 +1,6 @@
 /* Compile-time assert-like macros.
 
-   Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-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
index 34b696fb57dd71eb8d3eb74c9f3608b942092615..3b35f77f2548040bc19a386cf9b542ec8a1c95e6 100644 (file)
@@ -1,6 +1,6 @@
 /* xsize.h -- Checked size_t computations.
 
-   Copyright (C) 2003, 2008-2019 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2008-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
index 6ab3387dafab1f7105fb0f4c019fa6822982026f..747b865759e566cc81766871c5e3c114081a1313 100644 (file)
@@ -1,5 +1,5 @@
 # fcntl-o.m4 serial 6
-dnl Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-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,
 dnl with or without modifications, as long as this notice is preserved.
index c245ab025f61eddc56a209f25a53ee38fad39e73..90f3dddc6601556051cd39bab10d0988b36b454a 100644 (file)
@@ -1,7 +1,7 @@
 # serial 5
 # Check for flexible array member support.
 
-# Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
index a285e9daa5ea78453c0db5bb1640f7d59b7aa000..e593b7270a1684965e500773f374f84ff8ba15c3 100644 (file)
@@ -1,5 +1,5 @@
 # iconv.m4 serial 21
-dnl Copyright (C) 2000-2002, 2007-2014, 2016-2019 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2007-2014, 2016-2020 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index 3495174304347dde7accb8861d6ded584f165bdf..1c28ce2fc07e428bd4fd994b0528a4811d4cdb7c 100644 (file)
@@ -1,5 +1,5 @@
 # intlmacosx.m4 serial 7 (gettext-0.20.2)
-dnl Copyright (C) 2004-2014, 2016, 2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2014, 2016, 2019-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,
 dnl with or without modifications, as long as this notice is preserved.
index 38fe118a3426f64f0db3d60ef98b3cb07453a9b5..ac40a053ea493d701260fad572bc087629be2f4a 100644 (file)
@@ -1,5 +1,5 @@
 # inttypes-pri.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1997-2002, 2006, 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2002, 2006, 2008-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,
 dnl with or without modifications, as long as this notice is preserved.
index d20422a44998bf64c972ffb23a218abe6dce33c2..ebb532037c8e196b86a08386ac660cb9d785761e 100644 (file)
@@ -1,5 +1,5 @@
 # inttypes_h.m4 serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-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,
 dnl with or without modifications, as long as this notice is preserved.
index b62f6148570087e0dedc2704cd664fc8644fb467..43d18fd0a0a575db25c6bd2742ff4024661ca585 100644 (file)
@@ -1,6 +1,6 @@
 # nls.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019 Free Software
-dnl Foundation, Inc.
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2020 Free
+dnl 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.
index 143792dba560df0cc7b7651fe62dee3f4dd93b08..8fe71691d33e6346397ebb012778eeb2514e41a4 100644 (file)
@@ -1,5 +1,5 @@
 # po.m4 serial 30 (gettext-0.20)
-dnl Copyright (C) 1995-2014, 2016, 2018-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2014, 2016, 2018-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,
 dnl with or without modifications, as long as this notice is preserved.
index 5f186b14909c5e3c1ec6723629ca6a52f338f396..1ab9a2f5fd40c1a621166041ff3ad1091a7031cf 100644 (file)
@@ -1,5 +1,5 @@
 # progtest.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1996-2003, 2005, 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2003, 2005, 2008-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,
 dnl with or without modifications, as long as this notice is preserved.
index ab79052d6ecfc37338bff1801c1a01cfe8be96e1..5240d799c0d0bca942c9adbbff1a45513f561a98 100644 (file)
@@ -1,5 +1,5 @@
 # size_max.m4 serial 11
-dnl Copyright (C) 2003, 2005-2006, 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2006, 2008-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,
 dnl with or without modifications, as long as this notice is preserved.
index 6d5f1af0a18fb9d62115f51a085bd7ff1514d6e9..9df9e0480eb76783ff0cbab93e910d37e85cc299 100644 (file)
@@ -1,5 +1,5 @@
 # stdint_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-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,
 dnl with or without modifications, as long as this notice is preserved.
index f2898ba1a7896d3b2f006b3a08c06b558de664c3..978f99ab6b58ed8fb9b1fed66e5901e92533b67b 100644 (file)
@@ -1,5 +1,5 @@
 # xsize.m4 serial 5
-dnl Copyright (C) 2003-2004, 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2008-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,
 dnl with or without modifications, as long as this notice is preserved.