[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:27:54 PDT 2022
brad created this revision.
brad added reviewers: ldionne, libc++.
brad added a project: libc++.
Herald added a project: All.
brad requested review of this revision.
Herald added 1 blocking reviewer(s): libc++.
When updating OpenColorIO it was noticed that the function strtol_l() was missing and looking around I see strtoul_l() was also missing.
Repository:
rG LLVM Github Monorepo
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 __loc) {
+ return strtol(nptr, endptr, base);
+}
+
+static inline unsigned long strtoul_l(const char *nptr, char **endptr,
+ int base, locale_t __loc) {
+ return strtoul(nptr, endptr, base);
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122861.419610.patch
Type: text/x-patch
Size: 693 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220401/64d88b89/attachment.bin>
More information about the libcxx-commits
mailing list