From 82f2c91ff515da3a657f51fc6b0808351c8d60e3 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 5 Mar 2021 00:21:53 +0100 Subject: [PATCH] stddef: Generalize tcc workaround to other compilers. Suggested by Paul Eggert in . * lib/stddef.in.h: Undefine the __need_* macros with all compilers. * doc/posix-headers/stddef.texi: Mention that the TinyCC bug also exists on macOS. --- ChangeLog | 9 +++++++++ doc/posix-headers/stddef.texi | 4 ++-- lib/stddef.in.h | 12 +++++------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 50d247fac0..0873cde039 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2021-03-04 Bruno Haible + + stddef: Generalize tcc workaround to other compilers. + Suggested by Paul Eggert in + . + * lib/stddef.in.h: Undefine the __need_* macros with all compilers. + * doc/posix-headers/stddef.texi: Mention that the TinyCC bug also exists + on macOS. + 2021-03-04 Paul Eggert stdalign: port to tcc + glibc diff --git a/doc/posix-headers/stddef.texi b/doc/posix-headers/stddef.texi index ba27fa8d94..fe7ed26c9b 100644 --- a/doc/posix-headers/stddef.texi +++ b/doc/posix-headers/stddef.texi @@ -29,8 +29,8 @@ of a pointer: AIX 7.2 with xlc in 64-bit mode. @item -When this header file is provided by TinyCC 0.9.27 on glibc systems, it does -not fulfil the expectations of other glibc header files. +When this header file is provided by TinyCC 0.9.27 on glibc or macOS systems, +it does not fulfil the expectations of other system header files. @end itemize Portability problems not fixed by Gnulib: diff --git a/lib/stddef.in.h b/lib/stddef.in.h index 590e12c77e..a1fc80c7e7 100644 --- a/lib/stddef.in.h +++ b/lib/stddef.in.h @@ -44,13 +44,11 @@ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ /* On TinyCC, make sure that the macros that indicate the special invocation convention get undefined. */ -# ifdef __TINYC__ -# undef __need_wchar_t -# undef __need_size_t -# undef __need_ptrdiff_t -# undef __need_NULL -# undef __need_wint_t -# endif +# undef __need_wchar_t +# undef __need_size_t +# undef __need_ptrdiff_t +# undef __need_NULL +# undef __need_wint_t # endif #else -- 2.39.5