mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-16 17:43:11 +00:00
Compilation fix 4
This commit is contained in:
parent
851ae920b9
commit
2c8b485ba0
@ -34,7 +34,6 @@ void strcpy_trunc(char (&dst)[size], const std::string& src)
|
|||||||
#define _byteswap_ushort(x) __builtin_bswap16(x)
|
#define _byteswap_ushort(x) __builtin_bswap16(x)
|
||||||
#define _byteswap_ulong(x) __builtin_bswap32(x)
|
#define _byteswap_ulong(x) __builtin_bswap32(x)
|
||||||
#define _byteswap_uint64(x) __builtin_bswap64(x)
|
#define _byteswap_uint64(x) __builtin_bswap64(x)
|
||||||
#define mkdir(x) mkdir(x, 0777)
|
|
||||||
#define INFINITE 0xFFFFFFFF
|
#define INFINITE 0xFFFFFFFF
|
||||||
#define _CRT_ALIGN(x) __attribute__((aligned(x)))
|
#define _CRT_ALIGN(x) __attribute__((aligned(x)))
|
||||||
#define InterlockedCompareExchange(ptr,new_val,old_val) __sync_val_compare_and_swap(ptr,old_val,new_val)
|
#define InterlockedCompareExchange(ptr,new_val,old_val) __sync_val_compare_and_swap(ptr,old_val,new_val)
|
||||||
|
@ -66,7 +66,11 @@ bool rIsDir(const std::string &filename) {
|
|||||||
|
|
||||||
bool rMkdir(const std::string &dir)
|
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)
|
bool rMkpath(const std::string &path)
|
||||||
@ -83,7 +87,11 @@ bool rMkpath(const std::string &path)
|
|||||||
start = pos;
|
start = pos;
|
||||||
if(dir.size() == 0)
|
if(dir.size() == 0)
|
||||||
continue;
|
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;
|
return !ret;
|
||||||
}
|
}
|
||||||
if (pos >= path.length())
|
if (pos >= path.length())
|
||||||
|
@ -48,7 +48,7 @@ std::string rPlatform::getConfigDir()
|
|||||||
else // Just in case
|
else // Just in case
|
||||||
dir = "./config";
|
dir = "./config";
|
||||||
dir = dir + "/rpcs3/";
|
dir = dir + "/rpcs3/";
|
||||||
mkdir(dir.c_str());
|
mkdir(dir.c_str(), 0777);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return dir;
|
return dir;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user