aboutsummaryrefslogtreecommitdiffstats
path: root/community/gdal/10-atoll.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/gdal/10-atoll.patch')
-rw-r--r--community/gdal/10-atoll.patch28
1 files changed, 14 insertions, 14 deletions
diff --git a/community/gdal/10-atoll.patch b/community/gdal/10-atoll.patch
index bbc501ed854..81af7db3a94 100644
--- a/community/gdal/10-atoll.patch
+++ b/community/gdal/10-atoll.patch
@@ -2,33 +2,33 @@ Author: Holger Jaekel <holger.jaekel@gmx.de>
Summary: musl atoll() doesn't return ERANGE in case of overflow
----
---- a/gdal/port/cpl_conv.cpp
-+++ b/gdal/port/cpl_conv.cpp
-@@ -1006,8 +1006,6 @@ GIntBig CPLAtoGIntBig( const char *pszSt
- #endif
+--- 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)
+ static int CPLAtoGIntBigExHasOverflow(const char *pszString, GIntBig nVal)
{
-@@ -1030,8 +1028,6 @@ static int CPLAtoGIntBigExHasOverflow(co
+@@ -1035,8 +1033,6 @@
return strcmp(szBuffer, pszString) != 0;
}
-
+
-#endif
-
/************************************************************************/
/* CPLAtoGIntBigEx() */
/************************************************************************/
-@@ -1058,9 +1054,7 @@ GIntBig CPLAtoGIntBigEx( const char* psz
- GIntBig nVal = atol(pszString);
- #endif
- if( errno == ERANGE
+@@ -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 )
+ if (pbOverflow)