summaryrefslogtreecommitdiffstats
path: root/sys/sys/cdefs.h
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-08-28 15:36:05 +0000
committerpfg <pfg@FreeBSD.org>2015-08-28 15:36:05 +0000
commite6a408eac51bd505990a8af7d987029e101fe69f (patch)
tree315964fb1fe6c592895dca11129dce121222a17e /sys/sys/cdefs.h
parentabb095340626038e26e87c8d7c27fdd44d180fee (diff)
downloadFreeBSD-src-e6a408eac51bd505990a8af7d987029e101fe69f.zip
FreeBSD-src-e6a408eac51bd505990a8af7d987029e101fe69f.tar.gz
Add underscores to attributes when checking for __has_attribute.
This is a good practice to avoid confusion with allowed macros. Suggested by: jilles
Diffstat (limited to 'sys/sys/cdefs.h')
-rw-r--r--sys/sys/cdefs.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index 9f9742c..3eaf17b 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -237,12 +237,12 @@
#define __aligned(x) __attribute__((__aligned__(x)))
#define __section(x) __attribute__((__section__(x)))
#endif
-#if __GNUC_PREREQ__(4, 3) || __has_attribute(alloc_size)
+#if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__)
#define __alloc_size(x) __attribute__((__alloc_size__(x)))
#else
#define __alloc_size(x)
#endif
-#if __GNUC_PREREQ__(4, 9) || __has_attribute(alloc_align)
+#if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__)
#define __alloc_align(x) __attribute__((__alloc_align__(x)))
#else
#define __alloc_align(x)
@@ -535,7 +535,7 @@
* well enough to use them in limited cases.
*/
#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__)
-#if __GNUC_PREREQ__(4, 3) || __has_attribute(artificial)
+#if __GNUC_PREREQ__(4, 3) || __has_attribute(__artificial__)
#define __gnu_inline __attribute__((__gnu_inline__, __artificial__))
#else
#define __gnu_inline __attribute__((__gnu_inline__))
@@ -787,8 +787,8 @@
* properties that cannot be enforced by the C type system.
*/
-#if __has_attribute(argument_with_type_tag) && \
- __has_attribute(type_tag_for_datatype) && !defined(lint)
+#if __has_attribute(__argument_with_type_tag__) && \
+ __has_attribute(__type_tag_for_datatype__) && !defined(lint)
#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \
__attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx)))
#define __datatype_type_tag(kind, type) \
OpenPOWER on IntegriCloud