From e04307e47c53bb970dc67fc39c398e53a00afcf2 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Fri, 2 Mar 2012 10:49:52 +0000 Subject: Add the Solaris support directory to the header search when using libc++. Unconditionally define __C99FEATURES__ when using C++ on Solaris. This is a (hopefully temporary) work around for libc++ exposing C99-but-not-C++98 features in C++98 mode. llvm-svn: 151889 --- clang/lib/Frontend/InitHeaderSearch.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/lib/Frontend/InitHeaderSearch.cpp') diff --git a/clang/lib/Frontend/InitHeaderSearch.cpp b/clang/lib/Frontend/InitHeaderSearch.cpp index 4b734c97d93..ca9a2ce8899 100644 --- a/clang/lib/Frontend/InitHeaderSearch.cpp +++ b/clang/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 { -- cgit v1.2.3