1 /* 2 * Copyright 2019 Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _FEATURES_H 6 #define _FEATURES_H 7 8 9 #if defined(_BSD_SOURCE) \ 10 || (!defined(__STRICT_ANSI__) && !defined(_POSIX_C_SOURCE)) 11 #undef _DEFAULT_SOURCE 12 #define _DEFAULT_SOURCE 13 #endif 14 15 #if defined(_GNU_SOURCE) 16 #undef _ISOC11_SOURCE 17 #define _ISOC11_SOURCE 18 #undef _DEFAULT_SOURCE 19 #define _DEFAULT_SOURCE 20 #endif 21 22 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L 23 #undef _ISOC11_SOURCE 24 #define _ISOC11_SOURCE 25 #endif 26 27 #if defined(__cplusplus) && __cplusplus >= 201703L 28 #undef _ISOC11_SOURCE 29 #define _ISOC11_SOURCE 30 #endif 31 32 #endif // _FEATURES_H 33