bug-gettext
[Top][All Lists]
Advanced

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

Re: Big picture of building & packaging


From: dev
Subject: Re: Big picture of building & packaging
Date: Tue, 13 Jun 2023 02:24:48 +0000

The values of environment variables are identical in both versions:

LC_ALL: de
LANG: (null)
LC_CTYPE: (null)

However, I didn't realize until I investigated more (from lack of C programming 
experience), but how you looked up the symbol names is a really good direction.

When I build v0.21:

    U _rpl_setlocale (from libgettextlib-0.21.dylib)

When I build v0.21.1:

    U _libintl_setlocale (from libintl.8.dylib)
 
Though I am not sure of this reason.

Teddy

June 11, 2023 2:44 PM, "Bruno Haible" <bruno@clisp.org> wrote:

> Teddy wrote:
> 
>> I have been able to trace it down to the following section of code in 
>> msginit.c:
>> 
>> if (setlocale (LC_ALL, "") == NULL)
>> /* Nonexistent locale. Use the English title. */
>> result = english;
>> else
>> {
>> /* Fetch the translation. */
>> ...
>> if (result != msgid && strcmp (result, msgid) != 0)
>> /* Use the English and the foreign title. */
>> result = xasprintf ("%s\n%s", english, result);
>> ...
>> 
>> On OSX, in v0.21, the setlocale function call returns NULL, while it does 
>> not in v0.21.1.
> 
> This setlocale's declaration is in libintl.h. In the source tree, it's the
> file gettext-runtime/intl/libgnuintl.in.h. In its history on the 0.21.x 
> branch,
> between 2020-07-27 and 2022-10-10, I see no relevant change. So, in both
> versions, the setlocale function comes from gnulib. This is also confirmed
> by looking at the .o files in a build:
> 
> $ nm ../../gettext-runtime/intl/.libs/setlocale.o | grep ' T '
> 0000000000000524 T _libintl_newlocale
> 0000000000000000 T _libintl_setlocale
> 
> $ nm ../gnulib-lib/setlocale.o | grep ' T '
> 0000000000000000 T _rpl_setlocale
> 
> $ nm msginit-msginit.o | grep setlocale
> U _rpl_setlocale
> 
> Now, let's look at the history of gnulib/lib/setlocale.c, on the stable-202201
> branch, again between 2020-07-27 and 2022-10-10. It hasn't changed at all! And
> the most important dependency of this file, gnulib/lib/localename.c, also has
> not changed in a way that would be relevant on macOS.
> 
> At the point where setlocale (LC_ALL, "") gets called, what are the values of
> - getenv ("LC_ALL"),
> - getenv ("LC_..") for all other LC_* variables,
> - getenv ("LANG") ?
> 
> Bruno



reply via email to

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