wchar_t support for windows

This commit is contained in:
Jack Andersen
2015-07-02 10:37:07 -10:00
parent 5c736af2b0
commit b461f63ae4
10 changed files with 57 additions and 25 deletions

View File

@@ -7,11 +7,21 @@
namespace NOD
{
/* System char type */
/* filesystem char type */
#if _WIN32 && UNICODE
#include <wctype.h>
#include <direct.h>
#include <sys/stat.h>
#define NOD_UCS2 1
typedef struct _stat Sstat;
static inline int Mkdir(const wchar_t* path, int) {return _wmkdir(path);}
static inline int Stat(const wchar_t* path, Sstat* statout) {return _wstat(path, statout);}
#else
#include <ctype.h>
#include <sys/stat.h>
typedef struct stat Sstat;
static inline int Mkdir(const char* path, mode_t mode) {return mkdir(path, mode);}
static inline int Stat(const char* path, Sstat* statout) {return stat(path, statout);}
#endif
/* String Converters */