Fixes to get libc++ building on sun solaris. Patch from C Bergstrom.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@222794 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bd0000808d
commit
6cb69ffa0a
@ -644,6 +644,8 @@ template <unsigned> struct __static_assert_check {};
|
|||||||
#define _LIBCPP_ELAST __ELASTERROR
|
#define _LIBCPP_ELAST __ELASTERROR
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
// Not _LIBCPP_ELAST needed on Apple
|
// Not _LIBCPP_ELAST needed on Apple
|
||||||
|
#elif defined(__sun__)
|
||||||
|
#define _LIBCPP_ELAST ESTALE
|
||||||
#else
|
#else
|
||||||
// Warn here so that the person doing the libcxx port has an easier time:
|
// Warn here so that the person doing the libcxx port has an easier time:
|
||||||
#warning This platform's ELAST hasn't been ported yet
|
#warning This platform's ELAST hasn't been ported yet
|
||||||
|
@ -29,8 +29,10 @@
|
|||||||
# if __ANDROID_API__ <= 20
|
# if __ANDROID_API__ <= 20
|
||||||
# include <support/android/locale_bionic.h>
|
# include <support/android/locale_bionic.h>
|
||||||
# endif
|
# endif
|
||||||
|
#elif defined(__sun__)
|
||||||
|
# include <support/solaris/xlocale.h>
|
||||||
#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \
|
#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \
|
||||||
|| defined(__sun__) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
|
|| defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
|
||||||
# include <xlocale.h>
|
# include <xlocale.h>
|
||||||
#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
|
#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
#ifndef __XLOCALE_H_INCLUDED
|
#ifndef __XLOCALE_H_INCLUDED
|
||||||
#define __XLOCALE_H_INCLUDED
|
#define __XLOCALE_H_INCLUDED
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -376,9 +376,9 @@ template <class ..._Tp>
|
|||||||
_LIBCPP_INLINE_VISIBILITY
|
_LIBCPP_INLINE_VISIBILITY
|
||||||
void __swallow(_Tp&&...) _NOEXCEPT {}
|
void __swallow(_Tp&&...) _NOEXCEPT {}
|
||||||
|
|
||||||
template <bool ..._B>
|
template <bool ..._Pred>
|
||||||
struct __all
|
struct __all
|
||||||
: is_same<__all<_B...>, __all<(_B, true)...>>
|
: is_same<__all<_Pred...>, __all<(_Pred, true)...>>
|
||||||
{ };
|
{ };
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
|
@ -3,6 +3,9 @@ file(GLOB LIBCXX_SOURCES ../src/*.cpp)
|
|||||||
if(WIN32)
|
if(WIN32)
|
||||||
file(GLOB LIBCXX_WIN32_SOURCES ../src/support/win32/*.cpp)
|
file(GLOB LIBCXX_WIN32_SOURCES ../src/support/win32/*.cpp)
|
||||||
list(APPEND LIBCXX_SOURCES ${LIBCXX_WIN32_SOURCES})
|
list(APPEND LIBCXX_SOURCES ${LIBCXX_WIN32_SOURCES})
|
||||||
|
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
|
||||||
|
file(GLOB LIBCXX_SOLARIS_SOURCES ../src/support/solaris/*.c)
|
||||||
|
list(APPEND LIBCXX_SOURCES ${LIBCXX_SOLARIS_SOURCES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Add all the headers to the project for IDEs.
|
# Add all the headers to the project for IDEs.
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <sys/localedef.h>
|
#include <sys/localedef.h>
|
||||||
#include "xlocale.h"
|
#include "support/solaris/xlocale.h"
|
||||||
|
|
||||||
static _LC_locale_t *__C_locale;
|
static _LC_locale_t *__C_locale;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user