Changeset View
Standalone View
sys/sys/cdefs.h
Show First 20 Lines • Show All 548 Lines • ▼ Show 20 Lines | |||||
#define __gnu_inline __attribute__((__gnu_inline__, __artificial__)) | #define __gnu_inline __attribute__((__gnu_inline__, __artificial__)) | ||||
#else | #else | ||||
#define __gnu_inline __attribute__((__gnu_inline__)) | #define __gnu_inline __attribute__((__gnu_inline__)) | ||||
#endif /* artificial */ | #endif /* artificial */ | ||||
#else | #else | ||||
#define __gnu_inline | #define __gnu_inline | ||||
#endif | #endif | ||||
#if __has_attribute(error) || __GNUC_PREREQ__(4, 3) | |||||
#define __error_attr(msg) __attribute__((__error__(msg))) | |||||
#else | |||||
#define __error_attr(msg) | |||||
#endif | |||||
/* FORTIFY_SOURCE related defines. */ | |||||
#if __GNUC_PREREQ__(4, 1) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && \ | |||||
defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && !defined(lint) | |||||
pfg: You need to add a !lint case here. | |||||
Not Done Inline ActionsPerhaps a parenthesis around __optimize__ >0 is pertinent here. In file included from /usr/include/stdio.h:39: defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && !defined(lint) ^ 1 error generated. pfg: Perhaps a parenthesis around `__optimize__` >0 is pertinent here.
From the… | |||||
Not Done Inline ActionsAnd seems like this is again a bug in the ports: root@nyi-01:/usr/ports/mail/ifile/work/ifile-1.3.8 # grep -R __OPTIMIZE__ * argp/argp-fs-xinl.c:#undef __OPTIMIZE__ argp/argp-fs-xinl.c:#define __OPTIMIZE__ argp/argp-xinl.c:#undef __OPTIMIZE__ argp/argp-xinl.c:#define __OPTIMIZE__ argp/argp.h:#ifdef __OPTIMIZE__ argp/argp.h:#endif /* __OPTIMIZE__ */ argp/argp-fmtstream.h:#ifdef __OPTIMIZE__ argp/argp-fmtstream.h:#endif /* __OPTIMIZE__ */ argp/argp.h.orig:#ifdef __OPTIMIZE__ argp/argp.h.orig:#endif /* __OPTIMIZE__ */ root@nyi-01:/usr/ports/mail/ifile/work/ifile-1.3.8 # argp/argp-fs-xinl.c: ... 24 25 #define ARGP_FS_EI 26 #undef __OPTIMIZE__ 27 #define __OPTIMIZE__ 28 #include "argp-fmtstream.h" ... they redefine the OPTIMIZE macro with empty value. So we should add MK_FORTIFY= no to the port's Makefile. op: And seems like this is again a bug in the ports:
```
root@nyi-01… | |||||
Not Done Inline ActionsNot an option: MK_FORTIFY may not be available after all. Especially not in 10.x or 9.x. I think upstream treats __OPTIMIZE__ as boolean in some case, which is against sensible style. Change the port to #define __OPTIMIZE__ 0 that should be more portable, pfg: Not an option: MK_FORTIFY may not be available after all. Especially not in 10.x or 9.x.
I… | |||||
#define __BSD_FORTIFY 1 | |||||
#if _FORTIFY_SOURCE >= 2 | |||||
Not Done Inline ActionsNote that clang-3.8 will have fixes for higher levels of FORTIFY. (3?) so we may want to consider that case here too. pfg: Note that clang-3.8 will have fixes for higher levels of FORTIFY. (3?) so we may want to… | |||||
#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) | |||||
/* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ | /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ | ||||
#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ | #if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \ | ||||
defined(__GNUC__) && !defined(__INTEL_COMPILER) | defined(__GNUC__) && !defined(__INTEL_COMPILER) | ||||
#define __printf0like(fmtarg, firstvararg) \ | #define __printf0like(fmtarg, firstvararg) \ | ||||
__attribute__((__format__ (__printf0__, fmtarg, firstvararg))) | __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) | ||||
#else | #else | ||||
#define __printf0like(fmtarg, firstvararg) | #define __printf0like(fmtarg, firstvararg) | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 304 Lines • Show Last 20 Lines |
You need to add a !lint case here.