forked from OSchip/llvm-project
[solaris] Convert the support library to C++ to fix -std=c++11 build
Convert the Solaris xlocale.c compatibility library from plain C to C++ in order to fix the build failures caused by the addition of -std=c++11 to LIBCXX_COMPILE_FLAGS. The additional flag got propagated to the C file, resulting in error with strict compilers. Differential Revision: https://reviews.llvm.org/D25431 llvm-svn: 284494
This commit is contained in:
parent
376548c34c
commit
ef634ecddd
|
@ -6,7 +6,7 @@ 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)
|
||||
file(GLOB LIBCXX_SOLARIS_SOURCES ../src/support/solaris/*.cpp)
|
||||
list(APPEND LIBCXX_SOURCES ${LIBCXX_SOLARIS_SOURCES})
|
||||
endif()
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <stdio.h>
|
||||
#include <sys/localedef.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
int isxdigit_l(int __c, locale_t __l) {
|
||||
return isxdigit(__c);
|
||||
|
@ -63,4 +64,6 @@ struct lconv *localeconv_l(locale_t __l) {
|
|||
return localeconv();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // __sun__
|
Loading…
Reference in New Issue