* gettext-runtime/intl/localcharset.c: Update from gnulib.
* gettext-runtime/intl/setlocale-lock.c: Likewise.
#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
/* 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. */
return &lock;
}
-#elif HAVE_PTHREAD_API
+# elif HAVE_PTHREAD_API
-# include <pthread.h>
+# include <pthread.h>
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
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;
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
/* 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
/* 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
# 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.
# 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.
# 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,
# 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.
# 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.
# 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.
# 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.
# 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.
# 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.
# 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.
# 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.
# 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.