diff options
author | Brad Smith <brad@comstyle.com> | 2022-04-21 20:00:59 -0400 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2022-04-25 15:14:49 -0700 |
commit | 324127d8da95554086c02d609c5b05d3405f73a0 (patch) | |
tree | df0db017d27dcb4d2e1e2cb15bcf35ae5479969e | |
parent | ebf29ba9f0a3a1076c613aef59e65d65435daaee (diff) | |
download | llvm-324127d8da95554086c02d609c5b05d3405f73a0.tar.gz |
[libcxx] Add some missing xlocale wrapper functions for OpenBSD
Reviewed By: Mordante
Differential Revision: https://reviews.llvm.org/D122861
(cherry picked from commit a0d40a579a6f27a1b1cdb7d68b2145e332c02c4e)
-rw-r--r-- | libcxx/include/__support/openbsd/xlocale.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libcxx/include/__support/openbsd/xlocale.h b/libcxx/include/__support/openbsd/xlocale.h index 49d66fde1e8e..f3917f333fb3 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 |