MSVC fixes.

This commit is contained in:
ehofman
2005-12-17 15:32:43 +00:00
parent c5737c5f74
commit 0911fa4fa2
2 changed files with 10 additions and 1 deletions

View File

@@ -30,7 +30,9 @@
#include <stdio.h>
#include <sys/stat.h>
#include <sys/stat.h>
#ifdef _MSC_VER
# include <direct.h>
#endif
#include "sg_path.hxx"
@@ -195,7 +197,11 @@ void SGPath::create_dir( mode_t mode ) {
}
for(;i < dirlist.size(); i++) {
string subdir = dirlist[i];
#ifdef _MSC_VER
if ( _mkdir( subdir.c_str()) ) {
#else
if ( mkdir( subdir.c_str(), mode) ) {
#endif
SG_LOG( SG_IO, SG_ALERT, "Error creating directory: " + dir.str() );
break;
}

View File

@@ -38,6 +38,9 @@
SG_USING_STD(string);
#ifdef _MSC_VER
typedef int mode_t;
#endif
/**
* A class to hide path separator difference across platforms and assist