Commit 0d28f992 authored by Sergey Lyubka's avatar Sergey Lyubka

wrapped pid_t and S_ISDIR definitions into ifndef for mingw build

parent a281e996
......@@ -51,7 +51,9 @@
#include <io.h> // For _lseeki64
#include <direct.h> // For _mkdir
typedef int socklen_t;
#ifndef pid_t
typedef HANDLE pid_t;
#endif
typedef SOCKET sock_t;
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
......@@ -75,7 +77,9 @@ typedef struct _stati64 file_stat_t;
#define mutex_lock(x) EnterCriticalSection(x)
#define mutex_unlock(x) LeaveCriticalSection(x)
#define get_thread_id() ((unsigned long) GetCurrentThreadId())
#ifndef S_ISDIR
#define S_ISDIR(x) ((x) & _S_IFDIR)
#endif
#define sleep(x) Sleep((x) * 1000)
#define stat(x, y) mg_stat((x), (y))
#define fopen(x, y) mg_fopen((x), (y))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment