Sun C 5.14

2023-04-04 Thread Po Lu
I can't build Emacs with Sun C 5.14, on x86_64-pc-solaris2.11: cc -m64 -c-g3 -O -I. -I../src -I. -I./../src -o time_rz.o time_rz.c "time_rz.c", line 45: non-constant enumerator value cc: acomp failed for time_rz.c gmake: *** [Makefile:84: time_rz.o] Error 2 Here is the preprocessed time_

duplocale: Fix compilation error on Haiku

2023-04-04 Thread Bruno Haible
On Haiku (2017), I'm seeing a compilation error in a testdir: gcc-x86 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC -DEXEEXT=\"\" -I. -I../../gllib -I.. -DGNULIB_STRICT_CHECKING=1 -I/boot/home/config/non-packaged/include -Wall -fvisibility=hidden -g -O2 -MT copy-acl.o -MD -MP -MF $d

c32tob, c32is*, c32rtomb, mbrtoc32: Fix file lists

2023-04-04 Thread Bruno Haible
The command ./gnulib-tool --create-testdir --dir=../testdir --single-configure --without-tests c32islower produces these warnings: configure.ac:278: warning: gt_LOCALE_ZH_CN is m4_require'd but not m4_defun'd glm4/mbrtoc32.m4:153: gl_MBRTOC32_SANITYCHECK is expanded from... configure.ac

stdlib: Work around MB_CUR_MAX bug on Solaris 10

2023-04-04 Thread Bruno Haible
Running the unit tests on Solaris 10, I got an abort() here: FAIL: test-c32snrtombs-2.sh The stack trace is: #3 0xfd7fff286980 in abort () from /lib/64/libc.so.1 #4 0x00402842 in wcsnrtombs (dest=0xfd7fffdff930 "süß", '_' , "\177\375\377\377N.@", srcp=0xfd7fffdff950, srclen

*c32*: Inline most functions on glibc and musl libc

2023-04-04 Thread Bruno Haible
The type 'char32_t' is a more modern alternative to 'wchar_t', because it solves the problems mentioned in . To make a migration from 'wchar_t' to 'char32_t' attractive, it is important that on glibc and musl libc

Re: bug#62607: cp --recursive --backup broken in 9.2

2023-04-04 Thread Pádraig Brady
On 03/04/2023 18:19, Pádraig Brady wrote: On 02/04/2023 13:40, Pádraig Brady wrote: For completeness the correct repro is: mkdir -p {src,dst}/foo touch {src,dst}/foo/bar cp --recursive --backup src/* dst The attached two patches should address this. The first fixes the bug in g

*c32*: Optimize on musl libc like on glibc

2023-04-04 Thread Bruno Haible
glibc is not the only platform that defines __STDC_ISO_10646__ and thus guarantees that wchar_t values are Unicode code points. musl libc does that as well. (The mapping of bytes 0x80..0xFF to U+DF80..U+DFFF in the C locale can be ignored in this context.) So, the same optimizations apply to musl

uchar: Rename _GL_LARGE_CHAR32_T to _GL_SMALL_WCHAR_T

2023-04-04 Thread Bruno Haible
The macro _GL_LARGE_CHAR32_T is a bit of a misnomer. While the type char32_t is standardized and the same on all platforms, it's the wchar_t type which is too small for a Unicode character on some platforms. Therefore, I'm renaming this macro. 2023-04-04 Bruno Haible uchar: Rename _GL

c32rtomb: Fix an autoconf test

2023-04-04 Thread Bruno Haible
A syntax error in an autoconf test (NULL being used without prior #include /) caused the autoconfiguration to override the function c32rtomb always. This patch fixes it. 2023-04-04 Bruno Haible c32rtomb: Fix an autoconf test. * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): In a test prog