]> git.pond.sub.org Git - empserver/commitdiff
(min, max) [_WIN32]: Change WIN32 to use windef.h.
authorRon Koenderink <rkoenderink@yahoo.ca>
Sun, 25 Dec 2005 00:59:57 +0000 (00:59 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Sun, 25 Dec 2005 00:59:57 +0000 (00:59 +0000)
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

index 418c1884cca6b1a0fd1f6b2057dfabbd086a1fe9..ae17dd41ff51999e23fdc95657cd6a679874eeb6 100644 (file)
@@ -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