From 00893e79fc62966067af1a106567db96bd170338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 3 Mar 2024 19:11:32 +0100 Subject: New upstream version 1.2 --- lib/setlocale-lock.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'lib/setlocale-lock.c') diff --git a/lib/setlocale-lock.c b/lib/setlocale-lock.c index 4e7540e1..192489c4 100644 --- a/lib/setlocale-lock.c +++ b/lib/setlocale-lock.c @@ -1,5 +1,5 @@ /* Return the internal lock used by setlocale_null_r. - Copyright (C) 2019-2022 Free Software Foundation, Inc. + Copyright (C) 2019-2024 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -18,9 +18,10 @@ #include +/* The option '--disable-threads' explicitly requests no locking. */ /* 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 +#if AVOID_ANY_THREADS || OMIT_SETLOCALE_LOCK /* This declaration is solely to ensure that after preprocessing this file is never empty. */ @@ -37,14 +38,14 @@ typedef int dummy; /* Macro for exporting a symbol (function, not variable) defined in this file, when compiled into a shared library. */ -# ifndef DLL_EXPORTED +# ifndef SHLIB_EXPORTED # if HAVE_VISIBILITY /* Override the effect of the compiler option '-fvisibility=hidden'. */ -# define DLL_EXPORTED __attribute__((__visibility__("default"))) +# define SHLIB_EXPORTED __attribute__((__visibility__("default"))) # elif defined _WIN32 || defined __CYGWIN__ -# define DLL_EXPORTED __declspec(dllexport) +# define SHLIB_EXPORTED __declspec(dllexport) # else -# define DLL_EXPORTED +# define SHLIB_EXPORTED # endif # endif @@ -59,7 +60,7 @@ typedef int dummy; because the latter is not guaranteed to be a stable ABI in the future. */ /* Make sure the function gets exported from DLLs. */ -DLL_EXPORTED CRITICAL_SECTION *gl_get_setlocale_null_lock (void); +SHLIB_EXPORTED CRITICAL_SECTION *gl_get_setlocale_null_lock (void); static glwthread_initguard_t guard = GLWTHREAD_INITGUARD_INIT; static CRITICAL_SECTION lock; @@ -96,7 +97,7 @@ gl_get_setlocale_null_lock (void) static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* Make sure the function gets exported from shared libraries. */ -DLL_EXPORTED pthread_mutex_t *gl_get_setlocale_null_lock (void); +SHLIB_EXPORTED pthread_mutex_t *gl_get_setlocale_null_lock (void); /* Returns the internal lock used by setlocale_null_r. */ pthread_mutex_t * @@ -123,7 +124,7 @@ atomic_init (void) } /* Make sure the function gets exported from shared libraries. */ -DLL_EXPORTED mtx_t *gl_get_setlocale_null_lock (void); +SHLIB_EXPORTED mtx_t *gl_get_setlocale_null_lock (void); /* Returns the internal lock used by setlocale_null_r. */ mtx_t * -- cgit v1.2.3