Solaris port. Currently sees around 200 test failures, mostly related to

Solaris not providing some of the locales that the test suite uses.

Note: This depends on an xlocale (partial) implementation for Solaris and a
couple of fixed standard headers.  These will be committed to a branch later
today.



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151720 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Chisnall
2012-02-29 13:05:08 +00:00
parent f2b2cc6440
commit 997e454139
9 changed files with 79 additions and 9 deletions

View File

@@ -7,6 +7,12 @@
//
//===----------------------------------------------------------------------===//
// On Solaris, we need to define something to make the C99 parts of localeconv
// visible.
#ifdef __sun__
#define _LCONV_C99
#endif
#include "string"
#include "locale"
#include "codecvt"
@@ -925,11 +931,16 @@ ctype<char>::classic_table() _NOEXCEPT
return _DefaultRuneLocale.__runetype;
#elif defined(__GLIBC__)
return __cloc()->__ctype_b;
#elif __sun__
return __ctype_mask;
#elif _WIN32
return _ctype+1; // internal ctype mask table defined in msvcrt.dll
// This is assumed to be safe, which is a nonsense assumption because we're
// going to end up dereferencing it later...
#else
// Platform not supported: abort so the person doing the port knows what to
// fix
abort();
return NULL;
#endif
}