1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00

Add underscores to attributes when checking for __has_attribute.

This is a good practice to avoid confusion with allowed macros.

Suggested by:	jilles
This commit is contained in:
Pedro F. Giffuni 2015-08-28 15:36:05 +00:00
parent 755eb18fd7
commit fa60bc2f86
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287259

View File

@ -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) \