]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
<sys/cdefs.h>: Inhibit macro expansion for __glibc_has_include
authorFlorian Weimer <fweimer@redhat.com>
Fri, 14 Jun 2019 13:46:02 +0000 (15:46 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 14 Jun 2019 14:19:14 +0000 (16:19 +0200)
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>
ChangeLog
misc/sys/cdefs.h

index fc12a3e8ecd1ba9f323012b02de915c9e3b057d9..4aae5e74f797a561577865091bfdaba6d0d72a2d 100644 (file)
--- 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):
index 638872b87b53b31b7cadad546aace637134690c0..f1bd994a104c52442a20b6db90add12637e915d8 100644 (file)
 #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