Joachim Mairböck e595b7fd4b headers/bsd: fix comments after #endif
gcc2 complains otherwise when using -ansi -pedantic-errors that
"text afer `#endif' violates ANSI standard" because it doesn't
recognize C++ comments in C mode.

Change-Id: Icb091d15a4324625ce305aa89391c44a94f4a38e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8094
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-08-23 15:16:40 +00:00

24 lines
527 B
C++

/*
* Copyright 2019-2021, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _FEATURES_H
#define _FEATURES_H
#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) \
|| (!defined(__STRICT_ANSI__) && !defined(_POSIX_C_SOURCE))
#undef _DEFAULT_SOURCE
#define _DEFAULT_SOURCE
#endif
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) \
|| (defined(__cplusplus) && __cplusplus >= 201103L)
#undef _ISOC11_SOURCE
#define _ISOC11_SOURCE
#endif
#endif /* _FEATURES_H */