From 373a08a0e0ec48096f5496a500923042ee8cff9e Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Sun, 25 Dec 2005 00:59:57 +0000 Subject: [PATCH] (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. --- include/misc.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/misc.h b/include/misc.h index 418c1884..ae17dd41 100644 --- a/include/misc.h +++ b/include/misc.h @@ -48,7 +48,7 @@ typedef long ssize_t; /* integral mismatch, due to misuse of sector short */ #pragma warning (disable : 4761 ) -#include +#include #include #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