diff options
Diffstat (limited to 'include/sys')
| -rw-r--r-- | include/sys/cdefs.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h new file mode 100644 index 0000000..21ef031 --- /dev/null +++ b/include/sys/cdefs.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | * Public domain | ||
| 3 | * sys/cdefs.h compatibility shim | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef LIBCRYPTOCOMPAT_SYS_CDEFS_H | ||
| 7 | #define LIBCRYPTOCOMPAT_SYS_CDEFS_H | ||
| 8 | |||
| 9 | #ifdef _WIN32 | ||
| 10 | |||
| 11 | #define __warn_references(sym,msg) | ||
| 12 | |||
| 13 | #else | ||
| 14 | |||
| 15 | #include_next <sys/cdefs.h> | ||
| 16 | |||
| 17 | #ifndef __warn_references | ||
| 18 | |||
| 19 | #if defined(__GNUC__) && defined (HAS_GNU_WARNING_LONG) | ||
| 20 | #define __warn_references(sym,msg) \ | ||
| 21 | __asm__(".section .gnu.warning." __STRING(sym) \ | ||
| 22 | " ; .ascii \"" msg "\" ; .text"); | ||
| 23 | #else | ||
| 24 | #define __warn_references(sym,msg) | ||
| 25 | #endif | ||
| 26 | |||
| 27 | #endif /* __warn_references */ | ||
| 28 | |||
| 29 | #endif /* _WIN32 */ | ||
| 30 | |||
| 31 | #endif /* LIBCRYPTOCOMPAT_SYS_CDEFS_H */ | ||
