MT#55283 unify __attribute__() test macros

Change-Id: Ia2ef8e995c78a2dd1fe33e37f78eed6e58191ac7
(cherry picked from commit 0f9bb26143)
rfuchs/dataport-mr11.5
Richard Fuchs 2 years ago
parent 39166fac72
commit a8f43b4115

@ -448,7 +448,7 @@ INLINE pid_t gettid(void) {
/*** TAINT FUNCTIONS ***/
#if __has_attribute(__error__)
#if HAS_ATTR(__error__)
/* This is not supported in clang, and on gcc it might become inert if the
* symbol gets remapped to a builtin or stack protected function, but it
* otherwise gives better diagnostics. */

@ -7,12 +7,16 @@
# define INLINE static inline __attribute__((always_inline))
#endif
#define ACCESS(...)
#if defined __has_attribute
# if __has_attribute(access)
# undef ACCESS
# define ACCESS(...) __attribute__((access(__VA_ARGS__)))
# endif
# define HAS_ATTR(x) __has_attribute(x)
#else
# define HAS_ATTR(x) 0
#endif
#if HAS_ATTR(access)
# define ACCESS(...) __attribute__((access(__VA_ARGS__)))
#else
# define ACCESS(...)
#endif

Loading…
Cancel
Save