This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] <sys/cdefs.h>: Inhibit macro expansion for __glibc_has_include


This is currently ineffective with GCC because of GC PR 80005, but
it makes sense to anticipate a fix for this defect.

Suggested by Zack Weinberg.

2019-06-12  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.

diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 638872b87b..ed146ce20b 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -413,7 +413,7 @@
 #endif
 
 #ifdef __has_include
-# define __glibc_has_include(header)	__has_include (header)
+# define __glibc_has_include __has_include
 #else
 # define __glibc_has_include(header)	0
 #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]