Windows now builds and runs selftest correctly, and fixed a Windows (and possibly other platforms) issue in Phy<>.
This commit is contained in:
parent
54954f5b88
commit
f5848972f9
12 changed files with 223 additions and 112 deletions
|
@ -45,6 +45,7 @@
|
|||
#ifdef __WINDOWS__
|
||||
#include <WinSock2.h>
|
||||
#include <Windows.h>
|
||||
#include <Shlwapi.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
@ -96,9 +97,15 @@ public:
|
|||
static inline bool mkdir(const char *path)
|
||||
throw()
|
||||
{
|
||||
#ifdef __WINDOWS__
|
||||
if (::PathIsDirectoryA(path))
|
||||
return true;
|
||||
return (::CreateDirectoryA(path,NULL) == TRUE);
|
||||
#else
|
||||
if (::mkdir(path,0755) != 0)
|
||||
return (errno == EEXIST);
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
static inline bool mkdir(const std::string &path) throw() { return OSUtils::mkdir(path.c_str()); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue