|
From: | Bruno Haible |
Subject: | uchar: Make #include_next work right |
Date: | Sat, 26 Aug 2023 20:48:57 +0200 |
A coreutils prerelease fails to compile on AIX 7.1: xlc -q64 -qthreaded -qtls -I. -I.. -I./lib -Ilib -I../lib -Isrc -I../src -I/home/haible/prefix64/include -D_THREAD_SAFE -g -c -o lib/libcoreutils_a-btoc32.o `test -f 'lib/btoc32.c' || echo '../'`lib/btoc32.c "./lib/uchar.h", line 913.44: 1506-275 (S) Unexpected text wc encountered. "./lib/uchar.h", line 913.19: 1506-282 (S) The type of the parameters must be specified in a prototype. "./lib/uchar.h", line 1070.29: 1506-277 (S) Syntax error: possible missing ')' or ','? "./lib/uchar.h", line 1069.19: 1506-282 (S) The type of the parameters must be specified in a prototype. "./lib/uchar.h", line 1155.29: 1506-277 (S) Syntax error: possible missing ')' or ','? "./lib/uchar.h", line 1154.19: 1506-282 (S) The type of the parameters must be specified in a prototype. This syntax errors occur because 'char32_t' is not defined, although on this platform /usr/include/uchar.h ought to have defined it. Deeper analysis shows that the '#include_next <uchar.h>' statement in the generated lib/uchar.h does not work right, when the lib directory occurs in more than one -I option: $ xlc -q64 -qthreaded -qtls -I./lib -Ilib -g foo.c -E | grep uchar.h #line 6 "./lib/uchar.h" $ xlc -q64 -qthreaded -qtls -I./lib -g foo.c -E | grep uchar.h #line 29 "/usr/include/uchar.h" #line 6 "./lib/uchar.h" $ xlc -q64 -qthreaded -qtls -Ilib -g foo.c -E | grep uchar.h #line 29 "/usr/include/uchar.h" #line 6 "lib/uchar.h" The cause is that gnulib's uchar.h does not have a split double-inclusion guard, like it needs to have since it uses #include_next. This patch fixes it. The other three patches are just for code consistency. 2023-08-26 Bruno Haible <bruno@clisp.org> selinux-h: Add a comment. * lib/se-selinux.in.h: Clarify which #endif belongs to the double-inclusion guard. 2023-08-26 Bruno Haible <bruno@clisp.org> sys_utsname: Make double-inclusion guard more robust. * lib/sys_utsname.in.h: Test the guard symbol a second time. 2023-08-26 Bruno Haible <bruno@clisp.org> sys_times: Make double-inclusion guard more robust. * lib/sys_times.in.h: Test the guard symbol a second time. 2023-08-26 Bruno Haible <bruno@clisp.org> uchar: Make #include_next work right. * lib/uchar.in.h: Use a split double-inclusion guard.
0001-uchar-Make-include_next-work-right.patch
Description: Text Data
0002-sys_times-Make-double-inclusion-guard-more-robust.patch
Description: Text Data
0003-sys_utsname-Make-double-inclusion-guard-more-robust.patch
Description: Text Data
0004-selinux-h-Add-a-comment.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |