[libcxx-commits] [PATCH] D122861: [libcxx] Add some missing xlocale wrapper functions for OpenBSD

Brad Smith via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 8 20:38:06 PDT 2022


brad updated this revision to Diff 421676.
brad added a comment.

Update based on feedback.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122861/new/

https://reviews.llvm.org/D122861

Files:
  libcxx/include/__support/openbsd/xlocale.h


Index: libcxx/include/__support/openbsd/xlocale.h
===================================================================
--- libcxx/include/__support/openbsd/xlocale.h
+++ libcxx/include/__support/openbsd/xlocale.h
@@ -16,4 +16,24 @@
 #include <ctype.h>
 #include <cwctype>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+inline _LIBCPP_HIDE_FROM_ABI long
+strtol_l(const char *nptr, char **endptr, int base, locale_t) {
+  return ::strtol(nptr, endptr, base);
+}
+
+inline _LIBCPP_HIDE_FROM_ABI unsigned long
+strtoul_l(const char *nptr, char **endptr, int base, locale_t) {
+  return ::strtoul(nptr, endptr, base);
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122861.421676.patch
Type: text/x-patch
Size: 663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220409/b75d0118/attachment.bin>


More information about the libcxx-commits mailing list