Fixes for FreeBSD, including some fairly obvious copy-and-paste errors.
libc++ now mostly works on FreeBSD with libcxxrt and this patch applied to the base system:
http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20110920/e666632c/xlocale-0001.obj
Summary of tests on FreeBSD:
****************************************************
Results for /root/libcxx/test:
using FreeBSD clang version 3.0 (trunk 135360) 20110717
Target: x86_64-unknown-freebsd9.0
Thread model: posix
with -std=c++0x -stdlib=libc++ -I/root/libcxx/include -L/root/libcxx/build/lib
----------------------------------------------------
sections without tests : 1
sections with failures : 48
sections without failures: 1015
+ ----
total number of sections : 1064
----------------------------------------------------
number of tests failed : 145
number of tests passed : 4179
+ ----
total number of tests : 4324
****************************************************
(Many due to this clang version not supporting C++ atomics)
More fixes to follow...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140245 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/__config b/include/__config
index 3f6bfd4..84a7ddd 100644
--- a/include/__config
+++ b/include/__config
@@ -297,7 +297,7 @@
#define __has_feature(__x) 0
#endif
-#ifdef __APPLE__
+#if __APPLE__ || __FreeBSD__
#define _LIBCPP_LOCALE__L_EXTENSIONS 1
#endif
@@ -305,7 +305,7 @@
#define _LIBCPP_STABLE_APPLE_ABI
#endif
-#ifdef __APPLE__
+#if __APPLE__ || __FreeBSD__
#define _LIBCPP_WCTYPE_IS_MASK
#endif