Changeset 14754

Show
Ignore:
Timestamp:
06/22/08 14:40:58 (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.4/gdal/gcore/gdalopeninfo.cpp

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