[llvm-branch-commits] [libcxx] 324127d - [libcxx] Add some missing xlocale wrapper functions for OpenBSD

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Apr 25 15:15:31 PDT 2022


Author: Brad Smith
Date: 2022-04-25T15:14:49-07:00
New Revision: 324127d8da95554086c02d609c5b05d3405f73a0

URL: https://github.com/llvm/llvm-project/commit/324127d8da95554086c02d609c5b05d3405f73a0
DIFF: https://github.com/llvm/llvm-project/commit/324127d8da95554086c02d609c5b05d3405f73a0.diff

LOG: [libcxx] Add some missing xlocale wrapper functions for OpenBSD

Reviewed By: Mordante

Differential Revision: https://reviews.llvm.org/D122861

(cherry picked from commit a0d40a579a6f27a1b1cdb7d68b2145e332c02c4e)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__support/openbsd/xlocale.h b/libcxx/include/__support/openbsd/xlocale.h
index 49d66fde1e8ed..f3917f333fb37 100644
--- a/libcxx/include/__support/openbsd/xlocale.h
+++ b/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


        


More information about the llvm-branch-commits mailing list