Changeset 901

Show
Ignore:
Timestamp:
03/19/08 18:52:53
Author:
robert
Message:

From Maciej Krol, "On Win XP VS2005 SP1 getcwd and chdir are deprecated. I have added them to FileUtils? (in the attachment)."

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/applications/osgdem/osgdem.cpp

    r887 r901  
    5656    if (arguments.read("--run-path",runPath)) 
    5757    { 
    58         chdir(runPath.c_str()); 
     58        vpb::chdir(runPath.c_str()); 
    5959    } 
    6060 
     
    100100            osg::notify(osg::NOTICE)<<"Error: osgdem running on \""<<vpb::getLocalHostName()<<"\", could not find source file \""<<sourceName<<"\""<<std::endl; 
    101101            char str[2048];  
    102             if (getcwd( str, sizeof(str) )) 
     102            if (vpb::getcwd( str, sizeof(str) )) 
    103103            { 
    104104                osg::notify(osg::NOTICE)<<"       current working directory at time of error = "<<str<<std::endl; 
  • trunk/applications/vpbmaster/vpbmaster.cpp

    r887 r901  
    5353    if (arguments.read("--run-path",runPath)) 
    5454    { 
    55         chdir(runPath.c_str()); 
     55        vpb::chdir(runPath.c_str()); 
    5656    } 
    5757 
  • trunk/include/vpb/FileUtils

    r865 r901  
    7070extern VPB_EXPORT int getdtablesize(); 
    7171extern VPB_EXPORT int mkdir(const char *path, int mode); 
     72extern VPB_EXPORT int chdir(const char *path); 
     73extern VPB_EXPORT char *getcwd(char *path, int len); 
    7274 
    7375extern VPB_EXPORT int mkpath(const char *path, int mode); 
  • trunk/src/vpb/FileUtils.cpp

    r885 r901  
    4343                                                                    return status; 
    4444                                                                  } 
     45    int     vpb::chdir(const char *path)                          { return ::_chdir(path); } 
     46    char *  vpb::getcwd(char *path, int nbyte)                    { return ::_getcwd(path, nbyte); } 
    4547 
    4648#else // WIN32 
     
    6567    int     vpb::getdtablesize()                                  { return ::getdtablesize(); } 
    6668    int     vpb::mkdir(const char *path, int mode)                { return ::mkdir(path,mode); } 
     69    int     vpb::chdir(const char *path)                          { return ::chdir(path); } 
     70    char *  vpb::getcwd(char *path, int nbyte)                    { return ::getcwd(path, nbyte); } 
    6771 
    6872#endif  // WIN32