summaryrefslogtreecommitdiff
path: root/lib/cdefs.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-10-15 00:37:55 -0500
committerPaul Eggert <eggert@cs.ucla.edu>2018-10-15 00:39:02 -0500
commite8e003da5482abb42c8800b8b1cae42832dab0f9 (patch)
tree753f1d7af010589c7d01109077cf8ccfaf09c294 /lib/cdefs.h
parentd63720fdeec91b230174fc8676efb6286837e82c (diff)
downloadgnulib-e8e003da5482abb42c8800b8b1cae42832dab0f9.tar.gz
libc-config: merge from glibc
* lib/cdefs.h (__glibc_has_attribute): New macro.
Diffstat (limited to 'lib/cdefs.h')
-rw-r--r--lib/cdefs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/cdefs.h b/lib/cdefs.h
index b164531248..98cf74995a 100644
--- a/lib/cdefs.h
+++ b/lib/cdefs.h
@@ -409,6 +409,12 @@
# define __glibc_likely(cond) (cond)
#endif
+#ifdef __has_attribute
+# define __glibc_has_attribute(attr) __has_attribute (attr)
+#else
+# define __glibc_has_attribute(attr) 0
+#endif
+
#if (!defined _Noreturn \
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
&& !__GNUC_PREREQ (4,7))