1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 03:35:38 +03:00
aports/community/gdal/10-atoll.patch
Holger Jaekel a8a1990220 community/gdal: upgrade to 3.6.2
build a subset of drivers as plugins and move them to separate packages
new gdal drivers: JPEGXL, BASISU, KTX2
new ogr drivers: HANA, Parquet, Arrow
2023-01-24 05:22:09 +01:00

34 lines
983 B
Diff

Author: Holger Jaekel <holger.jaekel@gmx.de>
Summary: musl atoll() doesn't return ERANGE in case of overflow
----
--- a/port/cpl_conv.cpp
+++ b/port/cpl_conv.cpp
@@ -1011,8 +1011,6 @@
return atoll(pszString);
}
-#if defined(__MINGW32__) || defined(__sun__)
-
// mingw atoll() doesn't return ERANGE in case of overflow
static int CPLAtoGIntBigExHasOverflow(const char *pszString, GIntBig nVal)
{
@@ -1035,8 +1033,6 @@
return strcmp(szBuffer, pszString) != 0;
}
-#endif
-
/************************************************************************/
/* CPLAtoGIntBigEx() */
/************************************************************************/
@@ -1057,9 +1053,7 @@
errno = 0;
GIntBig nVal = strtoll(pszString, nullptr, 10);
if (errno == ERANGE
-#if defined(__MINGW32__) || defined(__sun__)
|| CPLAtoGIntBigExHasOverflow(pszString, nVal)
-#endif
)
{
if (pbOverflow)