diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-10-31 15:27:12 (GMT) |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-10-31 15:27:12 (GMT) |
commit | 5be04ec2ceb1df77afbca4fcbf9e92a712612d6f (patch) | |
tree | 2b2e1c71dffae827c8e45cd4cccc375093d03486 /gl/setlocale-lock.c | |
parent | 6d1d1dac32841d5ca6ee51bb09b30a6c604b17e2 (diff) | |
download | monitoring-plugins-5be04ec2ceb1df77afbca4fcbf9e92a712612d6f.tar.gz |
Sync with the latest Gnulib code (d4ec02b3cc)refs/pull/2037/head
Diffstat (limited to 'gl/setlocale-lock.c')
-rw-r--r-- | gl/setlocale-lock.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gl/setlocale-lock.c b/gl/setlocale-lock.c index b70ba09..192489c 100644 --- a/gl/setlocale-lock.c +++ b/gl/setlocale-lock.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* Return the internal lock used by setlocale_null_r. | 1 | /* Return the internal lock used by setlocale_null_r. |
2 | Copyright (C) 2019-2023 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2024 Free Software Foundation, Inc. |
3 | 3 | ||
4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
@@ -18,9 +18,10 @@ | |||
18 | 18 | ||
19 | #include <config.h> | 19 | #include <config.h> |
20 | 20 | ||
21 | /* The option '--disable-threads' explicitly requests no locking. */ | ||
21 | /* When it is known that the gl_get_setlocale_null_lock function is defined | 22 | /* When it is known that the gl_get_setlocale_null_lock function is defined |
22 | by a dependency library, it should not be defined here. */ | 23 | by a dependency library, it should not be defined here. */ |
23 | #if OMIT_SETLOCALE_LOCK | 24 | #if AVOID_ANY_THREADS || OMIT_SETLOCALE_LOCK |
24 | 25 | ||
25 | /* This declaration is solely to ensure that after preprocessing | 26 | /* This declaration is solely to ensure that after preprocessing |
26 | this file is never empty. */ | 27 | this file is never empty. */ |
@@ -37,14 +38,14 @@ typedef int dummy; | |||
37 | 38 | ||
38 | /* Macro for exporting a symbol (function, not variable) defined in this file, | 39 | /* Macro for exporting a symbol (function, not variable) defined in this file, |
39 | when compiled into a shared library. */ | 40 | when compiled into a shared library. */ |
40 | # ifndef DLL_EXPORTED | 41 | # ifndef SHLIB_EXPORTED |
41 | # if HAVE_VISIBILITY | 42 | # if HAVE_VISIBILITY |
42 | /* Override the effect of the compiler option '-fvisibility=hidden'. */ | 43 | /* Override the effect of the compiler option '-fvisibility=hidden'. */ |
43 | # define DLL_EXPORTED __attribute__((__visibility__("default"))) | 44 | # define SHLIB_EXPORTED __attribute__((__visibility__("default"))) |
44 | # elif defined _WIN32 || defined __CYGWIN__ | 45 | # elif defined _WIN32 || defined __CYGWIN__ |
45 | # define DLL_EXPORTED __declspec(dllexport) | 46 | # define SHLIB_EXPORTED __declspec(dllexport) |
46 | # else | 47 | # else |
47 | # define DLL_EXPORTED | 48 | # define SHLIB_EXPORTED |
48 | # endif | 49 | # endif |
49 | # endif | 50 | # endif |
50 | 51 | ||
@@ -59,7 +60,7 @@ typedef int dummy; | |||
59 | because the latter is not guaranteed to be a stable ABI in the future. */ | 60 | because the latter is not guaranteed to be a stable ABI in the future. */ |
60 | 61 | ||
61 | /* Make sure the function gets exported from DLLs. */ | 62 | /* Make sure the function gets exported from DLLs. */ |
62 | DLL_EXPORTED CRITICAL_SECTION *gl_get_setlocale_null_lock (void); | 63 | SHLIB_EXPORTED CRITICAL_SECTION *gl_get_setlocale_null_lock (void); |
63 | 64 | ||
64 | static glwthread_initguard_t guard = GLWTHREAD_INITGUARD_INIT; | 65 | static glwthread_initguard_t guard = GLWTHREAD_INITGUARD_INIT; |
65 | static CRITICAL_SECTION lock; | 66 | static CRITICAL_SECTION lock; |
@@ -96,7 +97,7 @@ gl_get_setlocale_null_lock (void) | |||
96 | static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; | 97 | static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; |
97 | 98 | ||
98 | /* Make sure the function gets exported from shared libraries. */ | 99 | /* Make sure the function gets exported from shared libraries. */ |
99 | DLL_EXPORTED pthread_mutex_t *gl_get_setlocale_null_lock (void); | 100 | SHLIB_EXPORTED pthread_mutex_t *gl_get_setlocale_null_lock (void); |
100 | 101 | ||
101 | /* Returns the internal lock used by setlocale_null_r. */ | 102 | /* Returns the internal lock used by setlocale_null_r. */ |
102 | pthread_mutex_t * | 103 | pthread_mutex_t * |
@@ -123,7 +124,7 @@ atomic_init (void) | |||
123 | } | 124 | } |
124 | 125 | ||
125 | /* Make sure the function gets exported from shared libraries. */ | 126 | /* Make sure the function gets exported from shared libraries. */ |
126 | DLL_EXPORTED mtx_t *gl_get_setlocale_null_lock (void); | 127 | SHLIB_EXPORTED mtx_t *gl_get_setlocale_null_lock (void); |
127 | 128 | ||
128 | /* Returns the internal lock used by setlocale_null_r. */ | 129 | /* Returns the internal lock used by setlocale_null_r. */ |
129 | mtx_t * | 130 | mtx_t * |