[libcxx] r222794 - Fixes to get libc++ building on sun solaris. Patch from C Bergstrom.
Eric Fiselier
eric at efcs.ca
Tue Nov 25 13:57:42 PST 2014
Author: ericwf
Date: Tue Nov 25 15:57:41 2014
New Revision: 222794
URL: http://llvm.org/viewvc/llvm-project?rev=222794&view=rev
Log:
Fixes to get libc++ building on sun solaris. Patch from C Bergstrom.
Modified:
libcxx/trunk/include/__config
libcxx/trunk/include/__locale
libcxx/trunk/include/support/solaris/xlocale.h
libcxx/trunk/include/tuple
libcxx/trunk/lib/CMakeLists.txt
libcxx/trunk/src/support/solaris/xlocale.c
Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=222794&r1=222793&r2=222794&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Tue Nov 25 15:57:41 2014
@@ -644,6 +644,8 @@ template <unsigned> struct __static_asse
#define _LIBCPP_ELAST __ELASTERROR
#elif defined(__APPLE__)
// Not _LIBCPP_ELAST needed on Apple
+#elif defined(__sun__)
+#define _LIBCPP_ELAST ESTALE
#else
// Warn here so that the person doing the libcxx port has an easier time:
#warning This platform's ELAST hasn't been ported yet
Modified: libcxx/trunk/include/__locale
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__locale?rev=222794&r1=222793&r2=222794&view=diff
==============================================================================
--- libcxx/trunk/include/__locale (original)
+++ libcxx/trunk/include/__locale Tue Nov 25 15:57:41 2014
@@ -29,8 +29,10 @@
# if __ANDROID_API__ <= 20
# include <support/android/locale_bionic.h>
# endif
+#elif defined(__sun__)
+# include <support/solaris/xlocale.h>
#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \
- || defined(__sun__) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
+ || defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
# include <xlocale.h>
#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
Modified: libcxx/trunk/include/support/solaris/xlocale.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/support/solaris/xlocale.h?rev=222794&r1=222793&r2=222794&view=diff
==============================================================================
--- libcxx/trunk/include/support/solaris/xlocale.h (original)
+++ libcxx/trunk/include/support/solaris/xlocale.h Tue Nov 25 15:57:41 2014
@@ -14,6 +14,8 @@
#ifndef __XLOCALE_H_INCLUDED
#define __XLOCALE_H_INCLUDED
+#include <stdlib.h>
+
#ifdef __cplusplus
extern "C" {
#endif
Modified: libcxx/trunk/include/tuple
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/tuple?rev=222794&r1=222793&r2=222794&view=diff
==============================================================================
--- libcxx/trunk/include/tuple (original)
+++ libcxx/trunk/include/tuple Tue Nov 25 15:57:41 2014
@@ -376,9 +376,9 @@ template <class ..._Tp>
_LIBCPP_INLINE_VISIBILITY
void __swallow(_Tp&&...) _NOEXCEPT {}
-template <bool ..._B>
+template <bool ..._Pred>
struct __all
- : is_same<__all<_B...>, __all<(_B, true)...>>
+ : is_same<__all<_Pred...>, __all<(_Pred, true)...>>
{ };
template <class _Tp>
Modified: libcxx/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=222794&r1=222793&r2=222794&view=diff
==============================================================================
--- libcxx/trunk/lib/CMakeLists.txt (original)
+++ libcxx/trunk/lib/CMakeLists.txt Tue Nov 25 15:57:41 2014
@@ -3,6 +3,9 @@ file(GLOB LIBCXX_SOURCES ../src/*.cpp)
if(WIN32)
file(GLOB LIBCXX_WIN32_SOURCES ../src/support/win32/*.cpp)
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()
# Add all the headers to the project for IDEs.
Modified: libcxx/trunk/src/support/solaris/xlocale.c
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/support/solaris/xlocale.c?rev=222794&r1=222793&r2=222794&view=diff
==============================================================================
--- libcxx/trunk/src/support/solaris/xlocale.c (original)
+++ libcxx/trunk/src/support/solaris/xlocale.c Tue Nov 25 15:57:41 2014
@@ -17,7 +17,7 @@
#include <limits.h>
#include <assert.h>
#include <sys/localedef.h>
-#include "xlocale.h"
+#include "support/solaris/xlocale.h"
static _LC_locale_t *__C_locale;
More information about the cfe-commits
mailing list