When updating OpenColorIO it was noticed that the function strtol_l() was missing and looking around I see strtoul_l() was also missing.
Details
- Reviewers
ldionne Mordante - Group Reviewers
Restricted Project - Commits
- rGa0d40a579a6f: [libcxx] Add some missing xlocale wrapper functions for OpenBSD
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I wonder whether this only affects OpenBSD or other platforms as well. If it also affects other platforms should these functions be here or in _support/xlocale/__strtonum_fallback.h?
libcxx/include/__support/openbsd/xlocale.h | ||
---|---|---|
24 | Why the static inline instead of inline? |
I was wondering about that as well, but thought I should keep this specific to OpenBSD for now to reduce the likelihood of something breaking and can be expanded later if desired.
libcxx/include/__support/openbsd/xlocale.h | ||
---|---|---|
24 |
I copied bits from libcxx/include/__support/solaris/xlocale.h, but the same goes for libcxx/include/__support/ibm/xlocale.h and libcxx/include/__support/musl/xlocale.h. I don't see _LIBCPP_HIDE_FROM_ABI used anywhere in that sub-dir. |
Fair point.
libcxx/include/__support/openbsd/xlocale.h | ||
---|---|---|
24 | This is used in _support/xlocale/__strtonum_fallback.h inline _LIBCPP_INLINE_VISIBILITY long long strtoll_l(const char *nptr, char **endptr, int base, locale_t) { return ::strtoll(nptr, endptr, base); } Note that _LIBCPP_INLINE_VISIBILITY is the deprecated name for _LIBCPP_HIDE_FROM_ABI @ldionne Do you know why these locale headers use static inline instead of inline LIBCPP_HIDE_FROM_ABI? |
libcxx/include/__support/openbsd/xlocale.h | ||
---|---|---|
24 | I don't know why, but it's certainly unusual for us to define static inline functions in headers. I think this should be inline only (and _LIBCPP_HIDE_ROM_ABI like everything else). Edit: It might be because those are meant to bridge a gap between the C headers on the system, and that's a C like way of defining those functions? Regardless, I think we should go for just inline. |
Why the static inline instead of inline?
Please add _LIBCPP_HIDE_FROM_ABI.