[PATCH] D31970: [libcxx] Direct support for Fuchsia

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 19:43:00 PDT 2017


phosek updated this revision to Diff 95076.
phosek marked an inline comment as done.

Repository:
  rL LLVM

https://reviews.llvm.org/D31970

Files:
  include/__config
  include/__locale
  include/support/fuchsia/xlocale.h


Index: include/support/fuchsia/xlocale.h
===================================================================
--- /dev/null
+++ include/support/fuchsia/xlocale.h
@@ -0,0 +1,23 @@
+// -*- C++ -*-
+//===------------------- support/fuchsia/xlocale.h ------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H
+#define _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H
+
+#if defined(__Fuchsia__)
+
+#include <cstdlib>
+#include <cwchar>
+#include <support/xlocale/__posix_l_fallback.h>
+#include <support/xlocale/__strtonum_fallback.h>
+
+#endif // defined(__Fuchsia__)
+
+#endif // _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H
Index: include/__locale
===================================================================
--- include/__locale
+++ include/__locale
@@ -37,9 +37,11 @@
 #elif (defined(__GLIBC__) || defined(__APPLE__)      || defined(__FreeBSD__) \
     || defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
 # include <xlocale.h>
+#elif defined(__Fuchsia__)
+# include <support/fuchsia/xlocale.h>
 #elif defined(_LIBCPP_HAS_MUSL_LIBC)
 # include <support/musl/xlocale.h>
-#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__
+#endif
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
Index: include/__config
===================================================================
--- include/__config
+++ include/__config
@@ -1013,7 +1013,7 @@
 #endif
 
 #if defined(__BIONIC__) || defined(__CloudABI__) ||                            \
-    defined(_LIBCPP_HAS_MUSL_LIBC)
+    defined(__Fuchsia__) || defined(_LIBCPP_HAS_MUSL_LIBC)
 #define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
 #endif
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31970.95076.patch
Type: text/x-patch
Size: 1927 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170413/2015bbab/attachment.bin>


More information about the llvm-commits mailing list