public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/zack/more-obsolete-typedefs] <sys/cdefs.h>: Inhibit macro expansion for __glibc_has_include
@ 2019-06-18 15:32 Zack Weinberg
0 siblings, 0 replies; only message in thread
From: Zack Weinberg @ 2019-06-18 15:32 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8d141877e07cc594e9fefc3795b8ba729288093c
commit 8d141877e07cc594e9fefc3795b8ba729288093c
Author: Florian Weimer <fweimer@redhat.com>
Date: Fri Jun 14 15:46:02 2019 +0200
<sys/cdefs.h>: Inhibit macro expansion for __glibc_has_include
This is currently ineffective with GCC because of GCC PR 80005, but
it makes sense to anticipate a fix for this defect.
Suggested by Zack Weinberg.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diff:
---
ChangeLog | 6 ++++++
misc/sys/cdefs.h | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index fc12a3e..4aae5e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-06-14 Florian Weimer <fweimer@redhat.com>
+
+ * misc/sys/cdefs.h (__glibc_has_include): Do not use a
+ function-like macro, so that __has_include can inhibit expansion
+ of its argument.
+
2019-06-13 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/bits/in.h (IPV6_ROUTER_ALERT_ISOLATE):
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 638872b..f1bd994 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -413,7 +413,9 @@
#endif
#ifdef __has_include
-# define __glibc_has_include(header) __has_include (header)
+/* Do not use a function-like macro, so that __has_include can inhibit
+ macro expansion. */
+# define __glibc_has_include __has_include
#else
# define __glibc_has_include(header) 0
#endif
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-18 15:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-18 15:32 [glibc/zack/more-obsolete-typedefs] <sys/cdefs.h>: Inhibit macro expansion for __glibc_has_include Zack Weinberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).