Compilation fix 4

This commit is contained in:
Nekotekina 2014-08-29 17:06:58 +04:00
parent 851ae920b9
commit 2c8b485ba0
3 changed files with 11 additions and 4 deletions

View File

@ -34,7 +34,6 @@ void strcpy_trunc(char (&dst)[size], const std::string& src)
#define _byteswap_ushort(x) __builtin_bswap16(x)
#define _byteswap_ulong(x) __builtin_bswap32(x)
#define _byteswap_uint64(x) __builtin_bswap64(x)
#define mkdir(x) mkdir(x, 0777)
#define INFINITE 0xFFFFFFFF
#define _CRT_ALIGN(x) __attribute__((aligned(x)))
#define InterlockedCompareExchange(ptr,new_val,old_val) __sync_val_compare_and_swap(ptr,old_val,new_val)

View File

@ -66,7 +66,11 @@ bool rIsDir(const std::string &filename) {
bool rMkdir(const std::string &dir)
{
return !mkdir(dir.c_str());
#ifdef _WIN32
return !_mkdir(dir.c_str());
#else
return !mkdir(dir.c_str(), 0777);
#endif
}
bool rMkpath(const std::string &path)
@ -83,7 +87,11 @@ bool rMkpath(const std::string &path)
start = pos;
if(dir.size() == 0)
continue;
if((ret = mkdir(dir.c_str())) && errno != EEXIST){
#ifdef _WIN32
if((ret = _mkdir(dir.c_str())) && errno != EEXIST){
#else
if((ret = mkdir(dir.c_str(), 0777)) && errno != EEXIST){
#endif
return !ret;
}
if (pos >= path.length())

View File

@ -48,7 +48,7 @@ std::string rPlatform::getConfigDir()
else // Just in case
dir = "./config";
dir = dir + "/rpcs3/";
mkdir(dir.c_str());
mkdir(dir.c_str(), 0777);
#endif
}
return dir;