diff options
author | Daniel Llorens <lloda@sarc.name> | 2021-04-08 20:54:42 +0200 |
---|---|---|
committer | Daniel Llorens <lloda@sarc.name> | 2021-04-08 21:00:42 +0200 |
commit | bdb07f8fc7b37ef64498c7b06cd4457faf456189 (patch) | |
tree | 4c98d2d714f2071513897efe01063bebc36e32cb /lib/mbtowc-lock.h | |
parent | 88e703084567eb99238a3be6ba4285d87a25eeae (diff) | |
download | guile-wip-gnulib-update.tar.gz |
Update gnulib to a3a946f670718d0dee5a7425ad5ac0a29fb46ea1wip-gnulib-update
This fixes https://lists.gnu.org/archive/html/guile-devel/2021-04/msg00009.html
Diffstat (limited to 'lib/mbtowc-lock.h')
-rw-r--r-- | lib/mbtowc-lock.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/mbtowc-lock.h b/lib/mbtowc-lock.h index 320613eae..093951713 100644 --- a/lib/mbtowc-lock.h +++ b/lib/mbtowc-lock.h @@ -32,7 +32,17 @@ mbtowc_unlocked (wchar_t *pwc, const char *p, size_t m) /* Prohibit renaming this symbol. */ #undef gl_get_mbtowc_lock -#if defined _WIN32 && !defined __CYGWIN__ +#if GNULIB_MBRTOWC_SINGLE_THREAD + +/* All uses of this function are in a single thread. No locking needed. */ + +static int +mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m) +{ + return mbtowc_unlocked (pwc, p, m); +} + +#elif defined _WIN32 && !defined __CYGWIN__ extern __declspec(dllimport) CRITICAL_SECTION *gl_get_mbtowc_lock (void); |