Changeset 14753

Show
Ignore:
Timestamp:
06/22/08 14:38:50 (5 months ago)
Author:
warmerdam
Message:

Use EOVERFLOW if defined otherwise use hardcoded likely values (#2437)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.5/gdal/gcore/gdalopeninfo.cpp

    r13847 r14753  
    9595 
    9696                VSIRewind( fp ); 
    97             }  
     97            } 
     98            /* XXX: ENOENT is used to catch the case of virtual filesystem 
     99             * when we do not have a real file with such a name. Under some 
     100             * circumstances EINVAL reported instead of ENOENT in Windows 
     101             * (for filenames containing colon, e.g. "smth://name").  
     102             * See also: #2437 */ 
    98103            else if( errno == 27 /* "File to large" */  
    99                      || errno == ENOENT  
    100                      || errno == 79 /* EOVERFLOW - value too large */ ) 
     104                     || errno == ENOENT || errno == EINVAL 
     105#ifdef EOVERFLOW 
     106                     || errno == EOVERFLOW 
     107#else 
     108                     || errno == 75 /* Linux EOVERFLOW */ 
     109                     || errno == 79 /* Solaris EOVERFLOW */  
     110#endif 
     111                     ) 
    101112            { 
    102113                fp = VSIFOpenL( pszFilename, "rb" );