Now, on Solaris 11.3 with gcc, I see a warning
../../gllib/vasnprintf.c:275:25: warning: implicit declaration of function
‘wcsnlen’ [-Wimplicit-function-declaration]
I don't know whether that's a Solaris 11 bug or a GCC installation/configuration
problem. Anyway, this simple patch fixes it.
20
On OpenBSD, I'm now seeing a "warning: unused function local_wcsnlen".
Also, on some platform, there is a warning about an unused variable
'has_precision'.
This patch fixes both.
2023-03-22 Bruno Haible
vasnwprintf: Fix a "warning: unused function local_wcsnlen".
* lib/vasnpr
Yesterday I did:
> * tests/test-vasnwprintf-posix.c (test_function): Add more tests for the
> %c and %lc directives.
Some of these new tests fail on musl libc, FreeBSD, NetBSD, AIX, mingw.
- For musl libc, *BSD, AIX, it's a bug in the swprintf function, and as
a workaround, I'll just
Yesterday I did:
> * modules/vasnwprintf (Depends-on): Add mbrtowc. Remove mbsrtowcs.
This causes link errors on AIX 7.1, such as:
xlc -q64 -qthreaded -qtls -g -L/home/haible/prefix64/lib -o
test-vasnwprintf-posix test-vasnwprintf-posix.o libtests.a ../gllib/libgnu.a
libtests.a ../gllib
Yesterday I did:
> (VASNPRINTF): In this case, implement %ls and %lc directly. Adjust a
> couple of #if conditions. For the conversion from TCHAR_T[] to
> DCHAR_T[], use mbsrtowcs.
Oops, this was buggy:
- The %lc implementation needs to ignore the precision.
- The conversion
x27;
This patch fixes it, thus making vasnwprintf work on older platforms
such as NetBSD 3.0, OpenBSD 3.8, HP-UX 11.00, IRIX 6.5.
2023-03-20 Bruno Haible
vasnwprintf: Port to older platforms without swprintf.
* m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Test for swprintf.