diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index b6ccce310e..ac8c355707 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -498,7 +498,7 @@ protected: Builder.defineMacro("_XOPEN_SOURCE", "600"); else Builder.defineMacro("_XOPEN_SOURCE", "500"); - if (Opts.CPlusPlus0x) + if (Opts.CPlusPlus) Builder.defineMacro("__C99FEATURES__"); Builder.defineMacro("_LARGEFILE_SOURCE"); Builder.defineMacro("_LARGEFILE64_SOURCE"); diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp index 4b734c97d9..ca9a2ce889 100644 --- a/lib/Frontend/InitHeaderSearch.cpp +++ b/lib/Frontend/InitHeaderSearch.cpp @@ -461,6 +461,11 @@ void InitHeaderSearch::AddDefaultIncludePaths(const LangOptions &Lang, AddPath(P.str(), CXXSystem, true, false, false, true); } } + // On Solaris, include the support directory for things like xlocale and + // fudged system headers. + if (triple.getOS() == llvm::Triple::Solaris) + AddPath("/usr/include/c++/v1/support/solaris", CXXSystem, true, false, + false); AddPath("/usr/include/c++/v1", CXXSystem, true, false, false); } else {