mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-20 19:41:58 +00:00
wrapped pid_t and S_ISDIR definitions into ifndef for mingw build
This commit is contained in:
1 parent
a281e99661
commit
0d28f99275
1 file changed
+4
@@ -51,7 +51,9 @@
|
|||||||
#include <io.h> // For _lseeki64
|
#include <io.h> // For _lseeki64
|
||||||
#include <direct.h> // For _mkdir
|
#include <direct.h> // For _mkdir
|
||||||
typedef int socklen_t;
|
typedef int socklen_t;
|
||||||
|
#ifndef pid_t
|
||||||
typedef HANDLE pid_t;
|
typedef HANDLE pid_t;
|
||||||
|
#endif
|
||||||
typedef SOCKET sock_t;
|
typedef SOCKET sock_t;
|
||||||
typedef unsigned char uint8_t;
|
typedef unsigned char uint8_t;
|
||||||
typedef unsigned int uint32_t;
|
typedef unsigned int uint32_t;
|
||||||
@@ -75,7 +77,9 @@ typedef struct _stati64 file_stat_t;
|
|||||||
#define mutex_lock(x) EnterCriticalSection(x)
|
#define mutex_lock(x) EnterCriticalSection(x)
|
||||||
#define mutex_unlock(x) LeaveCriticalSection(x)
|
#define mutex_unlock(x) LeaveCriticalSection(x)
|
||||||
#define get_thread_id() ((unsigned long) GetCurrentThreadId())
|
#define get_thread_id() ((unsigned long) GetCurrentThreadId())
|
||||||
|
#ifndef S_ISDIR
|
||||||
#define S_ISDIR(x) ((x) & _S_IFDIR)
|
#define S_ISDIR(x) ((x) & _S_IFDIR)
|
||||||
|
#endif
|
||||||
#define sleep(x) Sleep((x) * 1000)
|
#define sleep(x) Sleep((x) * 1000)
|
||||||
#define stat(x, y) mg_stat((x), (y))
|
#define stat(x, y) mg_stat((x), (y))
|
||||||
#define fopen(x, y) mg_fopen((x), (y))
|
#define fopen(x, y) mg_fopen((x), (y))
|
||||||
|
|||||||
Reference in new issue
Block a user