]> Savannah Git Hosting - gnulib.git/commitdiff
stddef: Work around an interoperability problem of tcc with glibc.
authorBruno Haible <bruno@clisp.org>
Wed, 3 Mar 2021 02:56:50 +0000 (03:56 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 3 Mar 2021 02:56:50 +0000 (03:56 +0100)
Reported by Luca Saiu <positron@gnu.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00011.html>.

* lib/stddef.in.h [__TINYC__]: In case of the special invocation
convention, undefine the macros that TinyCC's <stddef.h> should undefine
but doesn't.
* doc/posix-headers/stddef.texi: Mention the TinyCC bug.

ChangeLog
doc/posix-headers/stddef.texi
lib/stddef.in.h

index 7ba4369257fb02690b17494ada6f083b245fd333..7480874c55f19c1415f892790a83f674b9dd5810 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2021-03-02  Bruno Haible  <bruno@clisp.org>
+
+       stddef: Work around an interoperability problem of tcc with glibc.
+       Reported by Luca Saiu <positron@gnu.org> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00011.html>.
+       * lib/stddef.in.h [__TINYC__]: In case of the special invocation
+       convention, undefine the macros that TinyCC's <stddef.h> should undefine
+       but doesn't.
+       * doc/posix-headers/stddef.texi: Mention the TinyCC bug.
+
 2021-03-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        mbrtowc: port to AIX 7.1 with xlc 12.1
index dbc01034f68fc8cbbf0d65f4cfb84bc52c2f93b0..ba27fa8d9409acbff5e6e0687a8b437716f7748e 100644 (file)
@@ -27,6 +27,10 @@ NetBSD 5.0
 Some platforms provide a @code{NULL} macro whose value does not have the size
 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.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index ba6f90360ab9f1b83d1e4f088a9ea201faca63c5..590e12c77ee039a46a7279baaa6451e45dec7cc0 100644 (file)
 #   define _GL_STDDEF_WINT_T
 #  endif
 #  @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
 # endif
 
 #else