opencolorio: NetBSD has strtol_l

This commit is contained in:
nros 2023-11-09 15:21:17 +00:00
parent 6c9cfeae85
commit d13db9bd39
2 changed files with 13 additions and 3 deletions

View File

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.11 2023/11/09 14:54:03 nros Exp $
$NetBSD: distinfo,v 1.12 2023/11/09 15:21:17 nros Exp $
BLAKE2s (OpenColorIO-2.2.1.tar.gz) = 5fd74fcfa9cc588b7252dcc32df273c69a62a49ccd22b3258f6b2a4d3022624a
SHA512 (OpenColorIO-2.2.1.tar.gz) = d5f3a4b5bd661af7336c015d07e0feccb286464a08239a3c259a97217001161e7571f5137475fc2f4d1b9af6381bbfa03c0b60f41de282f114307961b8d84fc9
@ -9,4 +9,4 @@ SHA1 (patch-src_OpenColorIO_CMakeLists.txt) = 72715406f7cd0e092fcec1808f6682b0dd
SHA1 (patch-src_OpenColorIO_OCIOZArchive.cpp) = 07f6832350a400d98f273bacf16a82df1c1031f9
SHA1 (patch-src_apps_ocioarchive_main.cpp) = 227dc6f8bee4415db6eb54deef8551aee8b2bb36
SHA1 (patch-src_apputils_argparse.cpp) = 2c0948e891ad340a36f728070ac57b55691cece0
SHA1 (patch-src_utils_NumberUtils.h) = 25bc5722b133402127560727b8f718e211eadc97
SHA1 (patch-src_utils_NumberUtils.h) = 35cd321b9759144a16e8a376f83a119a6f7e4719

View File

@ -1,7 +1,8 @@
$NetBSD: patch-src_utils_NumberUtils.h,v 1.1 2023/11/09 14:54:03 nros Exp $
$NetBSD: patch-src_utils_NumberUtils.h,v 1.2 2023/11/09 15:21:17 nros Exp $
Solaris does not have strtod_l and strtof_l
Portability fix, use "defined" to check for preprocessor defines
NetBSD has strtol_l
--- src/utils/NumberUtils.h.orig 2023-01-06 02:05:59.000000000 +0000
+++ src/utils/NumberUtils.h
@ -27,3 +28,12 @@ Portability fix, use "defined" to check for preprocessor defines
#else
tempval = ::strtof_l(first, &endptr, loc.local);
#endif
@@ -144,7 +148,7 @@ really_inline from_chars_result from_cha
long int
#ifdef _WIN32
tempval = _strtol_l(first, &endptr, 0, loc.local);
-#elif defined(__GLIBC__)
+#elif defined(__GLIBC__) || defined(__NetBSD__)
tempval = ::strtol_l(first, &endptr, 0, loc.local);
#else
tempval = ::strtol(first, &endptr, 0);