Changeset 11008

Show
Ignore:
Timestamp:
03/18/07 12:56:07 (2 years ago)
Author:
mloskot
Message:

Replaced strerror() with VSIStrerror().

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/ogr/ogrsf_frmts/shape/ogrshapelayer.cpp

    r10976 r11008  
    10101010    if( VSIRename( oTempFile, CPLResetExtension( pszFullName, "dbf" ) ) != 0 ) 
    10111011    { 
    1012         CPLDebug( "Shape", "Can not rename DBF file: %s", strerror( errno ) ); 
     1012        CPLDebug( "Shape", "Can not rename DBF file: %s", VSIStrerror( errno ) ); 
    10131013        return OGRERR_FAILURE; 
    10141014    } 
     
    10761076        if( VSIRename( oTempFile, CPLResetExtension( pszFullName, "shp" ) ) != 0 ) 
    10771077        { 
    1078             CPLDebug( "Shape", "Can not rename SHP file: %s", strerror( errno ) ); 
     1078            CPLDebug( "Shape", "Can not rename SHP file: %s", VSIStrerror( errno ) ); 
    10791079            return OGRERR_FAILURE; 
    10801080        } 
     
    10831083        if( VSIRename( oTempFile, CPLResetExtension( pszFullName, "shx" ) ) != 0 ) 
    10841084        { 
    1085             CPLDebug( "Shape", "Can not rename SHX file: %s", strerror( errno ) ); 
     1085            CPLDebug( "Shape", "Can not rename SHX file: %s", VSIStrerror( errno ) ); 
    10861086            return OGRERR_FAILURE; 
    10871087        } 
     
    10921092/*                                                                      */ 
    10931093/* We do not need to reimplement OGRShapeDataSource::OpenFile() here    */   
    1094 /* with the fully featured error checking. 
     1094/* with the fully featured error checking.                              */ 
    10951095/* If all operations above succeeded, then all necessery files are      */ 
    1096 /* in the right place and accessible. 
     1096/* in the right place and accessible.                                   */ 
    10971097/* -------------------------------------------------------------------- */ 
    10981098    CPLAssert( NULL == hSHP ); 
  • trunk/gdal/ogr/ogrsf_frmts/shape/shpopen.c

    r10975 r11008  
    206206#include <string.h> 
    207207#include <stdio.h> 
     208#ifdef USE_CPL 
     209#include <cpl_vsi.h> 
     210#endif 
    208211 
    209212SHP_CVSID("$Id: shpopen.c,v 1.51 2006/09/04 15:24:01 fwarmerdam Exp $") 
     
    344347#ifdef USE_CPL 
    345348        CPLError( CE_Failure, CPLE_OpenFailed,  
    346                   "Failure writing .shp header (%s)", strerror( errno ) ); 
     349                  "Failure writing .shp header (%s)", VSIStrerror( errno ) ); 
    347350#endif 
    348351        return; 
     
    361364#ifdef USE_CPL 
    362365        CPLError( CE_Failure, CPLE_OpenFailed,  
    363                   "Failure writing .shx header (%s)", strerror( errno ) ); 
     366                  "Failure writing .shx header (%s)", VSIStrerror( errno ) ); 
    364367#endif 
    365368        return; 
     
    384387#ifdef USE_CPL 
    385388        CPLError( CE_Failure, CPLE_OpenFailed,  
    386                   "Failure writing .shx contents (%s)", strerror( errno ) ); 
     389                  "Failure writing .shx contents (%s)", VSIStrerror( errno ) ); 
    387390#endif 
    388391    }