localename: Notice setlocale() invocations on more platforms

2024-02-14 Thread Bruno Haible
When a program calls setlocale() with some argument that is not reflected in the environment variables, ideally the gl_locale_name function should return that locale. Currently this is enabled only for glibc systems. But it is actually possible to do the same thing on some other platforms as well:

Don't treat Apple's new Citrus/FreeBSD-based iconv like GNU libiconv

2024-02-14 Thread Bruno Haible
Apple's iconv() implementation, for many years, was based on GNU libiconv. They stopped upgrading in 2007, when I switched the license of the iconv program from GPLv2+ to GPLv3+. (Although the GNU libiconv library remained under LGPLv2+.) In 2023, they replaced the implementation with the Citrus/F

Improve support of Citrus/FreeBSD iconv

2024-02-14 Thread Bruno Haible
FreeBSD nowadays has an iconv implementation that supports transliteration, with the same iconv_open interface (add "//TRANSLIT" to the end of the target encoding argument) as glibc and GNU libiconv, and with the same iconvctl interface as GNU libiconv. This patch enable support for it in the Gnul

isnan: Fix compilation error in C++ mode on macOS 14.4 / Xcode 15.2

2024-02-14 Thread Bruno Haible
Paul E Reimer reported in : > I am installing gettext-0.22.4. ... As you can see, "make check" produces > two errors in msgconv-3 and lang-c++ > FAIL: lang-c++ > == > > In file included from prog.cc:5: > In file

Re: Multiple definition errors when linking libpoke into gdb

2024-02-14 Thread Bruno Haible
Jose E. Marchesi wrote: > I think in this case it is better to not use the xalloc module in > libpoke at all. This looks feasible: There are not many references to functions like xmalloc in libpoke. pkl-ast.c:116: PKL_AST_STRING_POINTER (new) = xstrdup (str); pkl-ast.c:131: PKL_AST_IDENTIFIER_P

Re: Missing functions of fchdir.c in libpoke.a

2024-02-14 Thread Hannes Domani
Am Mittwoch, 14. Februar 2024 um 18:06:23 MEZ hat Bruno Haible Folgendes geschrieben: > Hannes Domani wrote: > > > > Is there some reason why the 'fchdir' module isn't automatically > > > > imported > > > > if REPLACE_FCHDIR set set? > > > > > > There are two gnulib-tool invocation in poke; bo

Re: Missing functions of fchdir.c in libpoke.a

2024-02-14 Thread Bruno Haible
Hannes Domani wrote: > > > Is there some reason why the 'fchdir' module isn't automatically imported > > > if REPLACE_FCHDIR set set? > > > > There are two gnulib-tool invocation in poke; both affect the same > > poke/config.h. It is impossible for the gnulib-tool invocation for > > libpoke to know

Re: Missing functions of fchdir.c in libpoke.a

2024-02-14 Thread Hannes Domani
Am Mittwoch, 14. Februar 2024 um 17:56:40 MEZ hat Bruno Haible Folgendes geschrieben: > Hannes Domani wrote: > > Is there some reason why the 'fchdir' module isn't automatically imported > > if REPLACE_FCHDIR set set? > > There are two gnulib-tool invocation in poke; both affect the same > poke

Re: Missing functions of fchdir.c in libpoke.a

2024-02-14 Thread Bruno Haible
Hannes Domani wrote: > Is there some reason why the 'fchdir' module isn't automatically imported > if REPLACE_FCHDIR set set? There are two gnulib-tool invocation in poke; both affect the same poke/config.h. It is impossible for the gnulib-tool invocation for libpoke to know about the effects that

Re: Multiple definition errors when linking libpoke into gdb

2024-02-14 Thread Jose E. Marchesi
> Hannes Domani wrote: >> When I'm trying to (statically) link libpoke into gdb, I get the following >> errors: >> >> ... gl-libpoke/xmalloc.c:44: multiple definition of `xmalloc'; alloc.o >> ... gdb/alloc.c:49: first defined here >> >> Both gdb and gl-libpoke define these x* allocation functi

Re: Missing functions of fchdir.c in libpoke.a

2024-02-14 Thread Hannes Domani
Am Mittwoch, 14. Februar 2024 um 17:46:11 MEZ hat Bruno Haible Folgendes geschrieben: > Hannes Domani wrote: > > > Compiling fails like this: > > > > $ gcc -o conftest.exe -g -O2 -I/gdb/gdb-libs64/include conftest.c > > -L/gdb/gdb-libs64/lib -lpoke -lgc > > c:/msys64/mingw64/bin/../lib/gcc/x86

Re: Missing functions of fchdir.c in libpoke.a

2024-02-14 Thread Bruno Haible
Hannes Domani wrote: > Compiling fails like this: > > $ gcc -o conftest.exe -g -O2 -I/gdb/gdb-libs64/include conftest.c > -L/gdb/gdb-libs64/lib -lpoke -lgc > c:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: > C:/gdb/gdb-libs64/lib/libpoke.a(li

Re: Multiple definition errors when linking libpoke into gdb

2024-02-14 Thread Bruno Haible
Hannes Domani wrote: > When I'm trying to (statically) link libpoke into gdb, I get the following > errors: > > ... gl-libpoke/xmalloc.c:44: multiple definition of `xmalloc'; alloc.o > ... gdb/alloc.c:49: first defined here > > Both gdb and gl-libpoke define these x* allocation functions, and I'

Multiple definition errors when linking libpoke into gdb

2024-02-14 Thread Hannes Domani
Hello When I'm trying to (statically) link libpoke into gdb, I get the following errors: c:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/src/repos/poke/inst/lib/libpoke.a(libgnu_la-xmalloc.o): in function `xmalloc': C:\src\repos\poke\po