(min, max) [_WIN32]: Change WIN32 to use windef.h.
It is present in both MSVC and MinGW environments. (F_OK, W_OK, R_OK) [_WIN32]: Add #ifndef to allow to operation in both MSVC and MinGW environments.
This commit is contained in:
parent
8b934d615b
commit
373a08a0e0
1 changed files with 7 additions and 1 deletions
|
@ -48,7 +48,7 @@ typedef long ssize_t;
|
|||
/* integral mismatch, due to misuse of sector short */
|
||||
#pragma warning (disable : 4761 )
|
||||
|
||||
#include <minmax.h>
|
||||
#include <windef.h>
|
||||
#include <io.h>
|
||||
|
||||
#define random rand
|
||||
|
@ -57,9 +57,15 @@ typedef long ssize_t;
|
|||
#define strncasecmp(s1, s2, s3) _strnicmp(s1, s2, s3)
|
||||
#define mkdir(dir,perm) _mkdir(dir)
|
||||
/* used for access */
|
||||
#ifndef F_OK
|
||||
#define F_OK 0 /* FILE existence */
|
||||
#endif
|
||||
#ifndef W_OK
|
||||
#define W_OK 02 /* Write permission */
|
||||
#endif
|
||||
#ifndef R_OK
|
||||
#define R_OK 04 /* Read permission */
|
||||
#endif
|
||||
|
||||
typedef int pid_t;
|
||||
#define vsnprintf _vsnprintf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue