summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-03-03 03:56:50 +0100
committerBruno Haible <bruno@clisp.org>2021-03-03 03:56:50 +0100
commit3b0808afa4236e6fa221eac2ec25dc2a8ef09557 (patch)
tree89e8e2f068c92ca45f4629735bcfbb744fa34e6e
parent495dcf8d964e0b3a712f9345554a03d450851d8a (diff)
downloadgnulib-3b0808afa4236e6fa221eac2ec25dc2a8ef09557.tar.gz
gnulib-3b0808afa4236e6fa221eac2ec25dc2a8ef09557.tar.bz2
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.
-rw-r--r--ChangeLog10
-rw-r--r--doc/posix-headers/stddef.texi4
-rw-r--r--lib/stddef.in.h9
3 files changed, 23 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ba4369257..7480874c55 100644
--- 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
diff --git a/doc/posix-headers/stddef.texi b/doc/posix-headers/stddef.texi
index dbc01034f6..ba27fa8d94 100644
--- a/doc/posix-headers/stddef.texi
+++ b/doc/posix-headers/stddef.texi
@@ -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:
diff --git a/lib/stddef.in.h b/lib/stddef.in.h
index ba6f90360a..590e12c77e 100644
--- a/lib/stddef.in.h
+++ b/lib/stddef.in.h
@@ -42,6 +42,15 @@
# 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

Return to:

Send suggestions and report system problems to the System administrator.