Skip to content

Commit 324127d

Browse files
brad0tstellar
authored andcommitted
[libcxx] Add some missing xlocale wrapper functions for OpenBSD
Reviewed By: Mordante Differential Revision: https://reviews.llvm.org/D122861 (cherry picked from commit a0d40a5)
1 parent ebf29ba commit 324127d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

libcxx/include/__support/openbsd/xlocale.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,24 @@
1616
#include <ctype.h>
1717
#include <cwctype>
1818

19+
#ifdef __cplusplus
20+
extern "C" {
21+
#endif
22+
23+
24+
inline _LIBCPP_HIDE_FROM_ABI long
25+
strtol_l(const char *nptr, char **endptr, int base, locale_t) {
26+
return ::strtol(nptr, endptr, base);
27+
}
28+
29+
inline _LIBCPP_HIDE_FROM_ABI unsigned long
30+
strtoul_l(const char *nptr, char **endptr, int base, locale_t) {
31+
return ::strtoul(nptr, endptr, base);
32+
}
33+
34+
35+
#ifdef __cplusplus
36+
}
37+
#endif
38+
1939
#endif

0 commit comments

Comments
 (0)