Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/cdefs.h
Show First 20 Lines • Show All 523 Lines • ▼ Show 20 Lines | |||||
#define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg))) | #define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg))) | ||||
#define __strfmonlike(fmtarg, firstvararg) \ | #define __strfmonlike(fmtarg, firstvararg) \ | ||||
__attribute__((__format__ (__strfmon__, fmtarg, firstvararg))) | __attribute__((__format__ (__strfmon__, fmtarg, firstvararg))) | ||||
#define __strftimelike(fmtarg, firstvararg) \ | #define __strftimelike(fmtarg, firstvararg) \ | ||||
__attribute__((__format__ (__strftime__, fmtarg, firstvararg))) | __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) | ||||
#endif | #endif | ||||
/* | /* | ||||
* Defining _FORTIFY_SOURCE will enable replacement bounds checking | |||||
* functions. This is heavily dependent on GCC extenions for | |||||
* object sizes and is only partially supported by clang. | |||||
*/ | |||||
#if __GNUC_PREREQ__(4, 1) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && \ | |||||
defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && !defined(lint) | |||||
#define __BSD_FORTIFY 1 | |||||
#if _FORTIFY_SOURCE >= 2 | |||||
#define __bos(s) __builtin_object_size((s), 1) | |||||
#else | |||||
#define __bos(s) __builtin_object_size((s), 0) | |||||
#endif | |||||
#define __bos0(s) __builtin_object_size((s), 0) | |||||
#define __FORTIFY_INLINE extern __inline __always_inline __gnu_inline | |||||
#endif /* !_FORTIFY_SOURCE */ | |||||
#define __FORTIFY_UNKNOWN_SIZE ((size_t) -1) | |||||
#if __GNUC_PREREQ__(4, 3) || __has_attribute(__error__) | |||||
#define __error_attr(msg) __attribute__((__error__(msg))) | |||||
#else | |||||
#define __error_attr(msg) | |||||
#endif | |||||
/* | |||||
* FORTIFY_SOURCE, and perhaps other compiler-specific features, require | * FORTIFY_SOURCE, and perhaps other compiler-specific features, require | ||||
* the use of non-standard inlining. In general we should try to avoid | * the use of non-standard inlining. In general we should try to avoid | ||||
* using these but GCC-compatible compilers tend to support the extensions | * using these but GCC-compatible compilers tend to support the extensions | ||||
* well enough to use them in limited cases. | * well enough to use them in limited cases. | ||||
*/ | */ | ||||
#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) | #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__)) | #define __gnu_inline __attribute__((__gnu_inline__, __artificial__)) | ||||
▲ Show 20 Lines • Show All 319 Lines • Show Last 20 Lines |