aboutsummaryrefslogblamecommitdiffstats
path: root/community/gdal/10-atoll.patch
blob: a114098612c522b2ca6ff15d1c8ed4039874769c (plain) (tree)
1
2
3
4
5
6
7
8
9



                                                               


                       

       
 




                                                                           
                     

                                             
 




                                                                           
                     








                                                       
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 @@
 #endif
 }
 
-#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()                           */
 /************************************************************************/
@@ -1065,9 +1061,7 @@
     GIntBig nVal = atol(pszString);
 #endif
     if( errno == ERANGE
-#if defined(__MINGW32__) || defined(__sun__)
         || CPLAtoGIntBigExHasOverflow(pszString, nVal)
-#endif
         )
     {
         if( pbOverflow )