[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new module 'setlocale-null'
From: |
Bruno Haible |
Subject: |
Re: new module 'setlocale-null' |
Date: |
Tue, 24 Dec 2019 17:28:36 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-169-generic; KDE/5.18.0; x86_64; ; ) |
Another tweak of this module: Add the ability to rely on the lock defined
in another library. This makes it possible to avoid a link error regarding
libgettextpo and libintl on Windows.
2019-12-24 Bruno Haible <address@hidden>
setlocale-null: Make it easy to rely on the lock in another library.
* lib/setlocale-lock.c: Do not define anything if OMIT_SETLOCALE_LOCK is
defined.
diff --git -w a/lib/setlocale-lock.c b/lib/setlocale-lock.c
index 60c1ba3..a71ba64 100644
--- a/lib/setlocale-lock.c
+++ b/lib/setlocale-lock.c
@@ -18,6 +18,16 @@
#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. */
@@ -136,3 +146,5 @@ gl_get_setlocale_null_lock (void)
# endif
void * IMP(gl_get_setlocale_null_lock) = &gl_get_setlocale_null_lock;
# endif
+
+#endif
- new module 'setlocale-null', Bruno Haible, 2019/12/15
- setlocale-null: remove need for -lpthread on musl libc, *BSD, Haiku, Bruno Haible, 2019/12/16
- Re: new module 'setlocale-null', Bruno Haible, 2019/12/18
- Re: new module 'setlocale-null', Bruno Haible, 2019/12/22
- Re: new module 'setlocale-null', Bruno Haible, 2019/12/23
- Re: new module 'setlocale-null',
Bruno Haible <=