Skip to content
Snippets Groups Projects
Commit 08708435 authored by KIU Shueng Chuan's avatar KIU Shueng Chuan
Browse files

avoid defining macros already present on mingw32

parent 1c6036c3
No related branches found
No related tags found
No related merge requests found
...@@ -41,8 +41,15 @@ ...@@ -41,8 +41,15 @@
#include <windows.h> #include <windows.h>
#include <winsvc.h> #include <winsvc.h>
#include <shlobj.h> #include <shlobj.h>
#ifndef PATH_MAX
#define PATH_MAX MAX_PATH #define PATH_MAX MAX_PATH
#endif
#ifndef S_ISDIR
#define S_ISDIR(x) ((x) & _S_IFDIR) #define S_ISDIR(x) ((x) & _S_IFDIR)
#endif
#define DIRSEP '\\' #define DIRSEP '\\'
#define snprintf _snprintf #define snprintf _snprintf
#define vsnprintf _vsnprintf #define vsnprintf _vsnprintf
......
...@@ -139,7 +139,10 @@ typedef long off_t; ...@@ -139,7 +139,10 @@ typedef long off_t;
#define flockfile(x) EnterCriticalSection(&global_log_file_lock) #define flockfile(x) EnterCriticalSection(&global_log_file_lock)
#define funlockfile(x) LeaveCriticalSection(&global_log_file_lock) #define funlockfile(x) LeaveCriticalSection(&global_log_file_lock)
#define sleep(x) Sleep((x) * 1000) #define sleep(x) Sleep((x) * 1000)
#if !defined(va_copy)
#define va_copy(x, y) x = y #define va_copy(x, y) x = y
#endif // !va_copy MINGW #defines va_copy
#if !defined(fileno) #if !defined(fileno)
#define fileno(x) _fileno(x) #define fileno(x) _fileno(x)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment