bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hard-locale: make multithread-safe


From: Bruno Haible
Subject: Re: hard-locale: make multithread-safe
Date: Wed, 25 Dec 2019 00:36:00 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-169-generic; KDE/5.18.0; x86_64; ; )

> 2019-12-18  Bruno Haible  <address@hidden>
>       * modules/hard-locale (Depends-on): Remove strdup. Add setlocale-null.

This change has an effect on gettext's libgettextpo: Through this new
dependency chain
   hard-locale -> setlocale-null -> locale
there now is a gnulib-generated locale.h file in libgettextpo, and it
makes a '#define setlocale rpl_locale' definition visible, which in turn
cause the linking of libgettextpo to fail on mingw.

Ultimately this is caused by having two gnulib-tool invocations in the
scope of the same configure file; this is more fragile than having
them under different configure files. But anyway, there is an easy fix
in gnulib:


2019-12-24  Bruno Haible  <address@hidden>

        localcharset: Avoid referencing rpl_setlocale on native Windows.
        * lib/localcharset.c (setlocale): Undefine.

diff --git a/lib/localcharset.c b/lib/localcharset.c
index ffc0d8f..5dd4429 100644
--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -58,6 +58,9 @@
 #elif defined WINDOWS_NATIVE
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>
+  /* For the use of setlocale() below, the Gnulib override in setlocale.c is
+     not needed; see the platform lists in setlocale_null.m4.  */
+# undef setlocale
 #endif
 #if defined OS2
 # define INCL_DOS




reply via email to

[Prev in Thread] Current Thread [Next in Thread]