diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:38:57 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:38:57 +0000 |
commit | f5b6b735a731901f09d7f3cc153c1d869269ee83 (patch) | |
tree | 565a1b0f3c6a4094a5f2198879fb239053549f1e /gl/lib/setlocale_null.c | |
parent | Adding upstream version 2.12.0. (diff) | |
download | man-db-upstream/2.12.1.tar.xz man-db-upstream/2.12.1.zip |
Adding upstream version 2.12.1.upstream/2.12.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | gl/lib/setlocale_null.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/gl/lib/setlocale_null.c b/gl/lib/setlocale_null.c index 89c8a06..697502f 100644 --- a/gl/lib/setlocale_null.c +++ b/gl/lib/setlocale_null.c @@ -1,5 +1,5 @@ /* Query the name of the current global locale. - Copyright (C) 2019-2023 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 @@ -30,7 +30,12 @@ #endif #if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE) -# if defined _WIN32 && !defined __CYGWIN__ + +# if AVOID_ANY_THREADS + +/* The option '--disable-threads' explicitly requests no locking. */ + +# elif defined _WIN32 && !defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include <windows.h> @@ -51,6 +56,7 @@ # include <threads.h> # endif + #endif /* Use the system's setlocale() function, not the gnulib override, here. */ @@ -181,7 +187,12 @@ setlocale_null_unlocked (int category, char *buf, size_t bufsize) /* Prohibit renaming this symbol. */ # undef gl_get_setlocale_null_lock -# if defined _WIN32 && !defined __CYGWIN__ +# if AVOID_ANY_THREADS + +/* The option '--disable-threads' explicitly requests no locking. */ +# define setlocale_null_with_lock setlocale_null_unlocked + +# elif defined _WIN32 && !defined __CYGWIN__ extern __declspec(dllimport) CRITICAL_SECTION *gl_get_setlocale_null_lock (void); |