aboutsummaryrefslogtreecommitdiffstats
path: root/community/gdal/10-atoll.patch
blob: bbc501ed85499e915c79369023fd6d821e2a80f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
 }

-#if defined(__MINGW32__) || defined(__sun__)
-
 // mingw atoll() doesn't return ERANGE in case of overflow
 static int CPLAtoGIntBigExHasOverflow(const char* pszString, GIntBig nVal)
 {
@@ -1030,8 +1028,6 @@ static int CPLAtoGIntBigExHasOverflow(co
     return strcmp(szBuffer, pszString) != 0;
 }

-#endif
-
 /************************************************************************/
 /*                          CPLAtoGIntBigEx()                           */
 /************************************************************************/
@@ -1058,9 +1054,7 @@ GIntBig CPLAtoGIntBigEx( const char* psz
     GIntBig nVal = atol(pszString);
 #endif
     if( errno == ERANGE
-#if defined(__MINGW32__) || defined(__sun__)
         || CPLAtoGIntBigExHasOverflow(pszString, nVal)
-#endif
         )
     {
         if( pbOverflow )