From: Bruno Haible Date: Thu, 2 Jan 2020 13:54:32 +0000 (+0100) Subject: Update after gnulib changed. X-Git-Tag: v0.20.2~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2390ae06749d653678e5c060ba51122f93cfa3aa;p=thirdparty%2Fgettext.git Update after gnulib changed. * gettext-runtime/intl/localcharset.c: Update from gnulib. * gettext-runtime/intl/setlocale-lock.c: Likewise. --- diff --git a/gettext-runtime/intl/localcharset.c b/gettext-runtime/intl/localcharset.c index d0d89de51..ec7542769 100644 --- a/gettext-runtime/intl/localcharset.c +++ b/gettext-runtime/intl/localcharset.c @@ -58,6 +58,9 @@ #elif defined WINDOWS_NATIVE # define WIN32_LEAN_AND_MEAN # include + /* 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 diff --git a/gettext-runtime/intl/setlocale-lock.c b/gettext-runtime/intl/setlocale-lock.c index 761cc7f07..b824e383e 100644 --- a/gettext-runtime/intl/setlocale-lock.c +++ b/gettext-runtime/intl/setlocale-lock.c @@ -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 @@ -18,32 +18,42 @@ #include +/* 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 +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ +# include -# 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 +# include 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 -# include +# include +# include 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 diff --git a/gettext-runtime/intl/verify.h b/gettext-runtime/intl/verify.h index ca474dd06..2e4997ac9 100644 --- a/gettext-runtime/intl/verify.h +++ b/gettext-runtime/intl/verify.h @@ -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 diff --git a/gettext-runtime/intl/xsize.h b/gettext-runtime/intl/xsize.h index 34b696fb5..3b35f77f2 100644 --- a/gettext-runtime/intl/xsize.h +++ b/gettext-runtime/intl/xsize.h @@ -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 diff --git a/gettext-runtime/m4/fcntl-o.m4 b/gettext-runtime/m4/fcntl-o.m4 index 6ab3387da..747b86575 100644 --- a/gettext-runtime/m4/fcntl-o.m4 +++ b/gettext-runtime/m4/fcntl-o.m4 @@ -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. diff --git a/gettext-runtime/m4/flexmember.m4 b/gettext-runtime/m4/flexmember.m4 index c245ab025..90f3dddc6 100644 --- a/gettext-runtime/m4/flexmember.m4 +++ b/gettext-runtime/m4/flexmember.m4 @@ -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. diff --git a/gettext-runtime/m4/iconv.m4 b/gettext-runtime/m4/iconv.m4 index a285e9daa..e593b7270 100644 --- a/gettext-runtime/m4/iconv.m4 +++ b/gettext-runtime/m4/iconv.m4 @@ -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, diff --git a/gettext-runtime/m4/intlmacosx.m4 b/gettext-runtime/m4/intlmacosx.m4 index 349517430..1c28ce2fc 100644 --- a/gettext-runtime/m4/intlmacosx.m4 +++ b/gettext-runtime/m4/intlmacosx.m4 @@ -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. diff --git a/gettext-runtime/m4/inttypes-pri.m4 b/gettext-runtime/m4/inttypes-pri.m4 index 38fe118a3..ac40a053e 100644 --- a/gettext-runtime/m4/inttypes-pri.m4 +++ b/gettext-runtime/m4/inttypes-pri.m4 @@ -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. diff --git a/gettext-runtime/m4/inttypes_h.m4 b/gettext-runtime/m4/inttypes_h.m4 index d20422a44..ebb532037 100644 --- a/gettext-runtime/m4/inttypes_h.m4 +++ b/gettext-runtime/m4/inttypes_h.m4 @@ -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. diff --git a/gettext-runtime/m4/nls.m4 b/gettext-runtime/m4/nls.m4 index b62f61485..43d18fd0a 100644 --- a/gettext-runtime/m4/nls.m4 +++ b/gettext-runtime/m4/nls.m4 @@ -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. diff --git a/gettext-runtime/m4/po.m4 b/gettext-runtime/m4/po.m4 index 143792dba..8fe71691d 100644 --- a/gettext-runtime/m4/po.m4 +++ b/gettext-runtime/m4/po.m4 @@ -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. diff --git a/gettext-runtime/m4/progtest.m4 b/gettext-runtime/m4/progtest.m4 index 5f186b149..1ab9a2f5f 100644 --- a/gettext-runtime/m4/progtest.m4 +++ b/gettext-runtime/m4/progtest.m4 @@ -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. diff --git a/gettext-runtime/m4/size_max.m4 b/gettext-runtime/m4/size_max.m4 index ab79052d6..5240d799c 100644 --- a/gettext-runtime/m4/size_max.m4 +++ b/gettext-runtime/m4/size_max.m4 @@ -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. diff --git a/gettext-runtime/m4/stdint_h.m4 b/gettext-runtime/m4/stdint_h.m4 index 6d5f1af0a..9df9e0480 100644 --- a/gettext-runtime/m4/stdint_h.m4 +++ b/gettext-runtime/m4/stdint_h.m4 @@ -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. diff --git a/gettext-runtime/m4/xsize.m4 b/gettext-runtime/m4/xsize.m4 index f2898ba1a..978f99ab6 100644 --- a/gettext-runtime/m4/xsize.m4 +++ b/gettext-runtime/m4/xsize.m4 @@ -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.