attempt to support windows

This commit is contained in:
cathugger 2018-02-22 00:35:58 +00:00
parent a55b586df2
commit 0a3f40d5e7
2 changed files with 61 additions and 5 deletions

View file

@ -1,6 +1,18 @@
#ifndef _WIN32
typedef int FH;
#define FH_invalid -1
#else
#define UNICODE 1
#include <windows.h>
typedef HANDLE FH;
#define FH_invalid INVALID_HANDLE_VALUE
#endif
FH createfile(const char *path,int secret);
int closefile(FH fd);
int writeall(FH,const u8 *data,size_t len);