[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
Thu Mar 31 20:54:08 PDT 2022


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

Formatting and style fixes.


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
+
+
+static inline long strtol_l(const char *nptr, char **endptr, int base,
+                            locale_t) {
+  return strtol(nptr, endptr, base);
+}
+
+static inline 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.419612.patch
Type: text/x-patch
Size: 695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220401/ed052eae/attachment.bin>


More information about the libcxx-commits mailing list