1 $NetBSD: patch-lib_Basic_Targets_OSTargets.h,v 1.4 2019/10/19 13:54:29 adam Exp $
3 Sync SunOS default defines with a working reality.
5 diff -wpruN '--exclude=*.orig' a~/lib/Basic/Targets/OSTargets.h a/lib/Basic/Targets/OSTargets.h
6 --- a~/tools/clang/lib/Basic/Targets/OSTargets.h 1970-01-01 00:00:00
7 +++ a/tools/clang/lib/Basic/Targets/OSTargets.h 1970-01-01 00:00:00
8 @@ -628,22 +628,15 @@ protected:
9 Builder.defineMacro("__ELF__");
10 Builder.defineMacro("__svr4__");
11 Builder.defineMacro("__SVR4");
12 - // Solaris headers require _XOPEN_SOURCE to be set to 600 for C99 and
13 - // newer, but to 500 for everything else. feature_test.h has a check to
14 - // ensure that you are not using C99 with an old version of X/Open or C89
15 - // with a new version.
17 - Builder.defineMacro("_XOPEN_SOURCE", "600");
19 - Builder.defineMacro("_XOPEN_SOURCE", "500");
20 + // Compatibility with GCC to satisfy <sys/feature_tests.h> requirements.
22 - Builder.defineMacro("__C99FEATURES__");
23 + Builder.defineMacro("__STDC_VERSION__", "199901L");
24 + Builder.defineMacro("_XOPEN_SOURCE", "600");
25 Builder.defineMacro("_FILE_OFFSET_BITS", "64");
27 - // GCC restricts the next two to C++.
28 Builder.defineMacro("_LARGEFILE_SOURCE");
29 Builder.defineMacro("_LARGEFILE64_SOURCE");
30 Builder.defineMacro("__EXTENSIONS__");
32 if (Opts.POSIXThreads)
33 Builder.defineMacro("_REENTRANT");
34 if (this->HasFloat128)