On 2025-09-17 22:23, Bruno Haible wrote:
Michael Osipov wrote:
-D_POSIX_C_SOURCE=199506L is something we don't want to have, because
(as far as I understand) it reduces the set of symbols visible from the
*.h files.

Plase note that that macro also enables stuff:
# grep -r _POSIX_C_SOURCE /usr/include/
/usr/include/sys/buf.h:#if      (_POSIX_C_SOURCE >= 199309)
...

We attempt to get all available symbols defined or declared,
through the options
   -D_HPUX_SOURCE -D_XOPEN_SOURCE=600
recommended in [1].

Which symbols are gone from your Pov? I can double check in the header
files for you.

You reported in [2] that when you use -D_POSIX_C_SOURCE=199506L, the
symbol strdup is not declared and thus leads to compilation errors.

I ran through all of this again with a fresh 0.26:
./configure without any CPPFLAGS passed, even not your recommended "-D_HPUX_SOURCE -D_XOPEN_SOURCE=600", performed "grep -r --include=Makefile -l -- -lpthread . | xargs -I% sed -i 's#-lpthread#-mt#' %", gmake passed, gmake intalled passed. strdup() did not fail:
root@deblndw002x:/var/tmp/ports/work/gettext-0.26
# nm -a ./gettext-runtime/libasprintf/autosprintf.o | grep strdup
nm:  unknown option "a" ignored
[110]    |            0|       0|FUNC |GLOB |0|   UNDEF|strdup

Note that it failed on 0.24.x, not the newest one.
Right now, I don't see an issue to use -mt instead of -lpthread unless you provide me something I can test and it fails.

Michael

Reply via email to