mirror of
https://github.com/AxioDL/nod.git
synced 2025-12-14 23:56:18 +00:00
wchar_t support for windows
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user