summaryrefslogtreecommitdiffstats
path: root/libcxx/src/support
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2016-10-18 16:54:59 +0000
committerMichal Gorny <mgorny@gentoo.org>2016-10-18 16:54:59 +0000
commitef634ecddde9dc73db8c2ff74cc937c03b020c2d (patch)
tree1d0ad8639de8f366d1207e23720f32aa8791403e /libcxx/src/support
parent376548c34c705119d3b9312338cd238a926551b7 (diff)
downloadbcm5719-llvm-ef634ecddde9dc73db8c2ff74cc937c03b020c2d.tar.gz
bcm5719-llvm-ef634ecddde9dc73db8c2ff74cc937c03b020c2d.zip
[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
Diffstat (limited to 'libcxx/src/support')
-rw-r--r--libcxx/src/support/solaris/xlocale.cpp (renamed from libcxx/src/support/solaris/xlocale.c)3
1 files changed, 3 insertions, 0 deletions
diff --git a/libcxx/src/support/solaris/xlocale.c b/libcxx/src/support/solaris/xlocale.cpp
index 802829c9ead..6eaf317c768 100644
--- a/libcxx/src/support/solaris/xlocale.c
+++ b/libcxx/src/support/solaris/xlocale.cpp
@@ -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__
OpenPOWER on IntegriCloud