summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/access.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/unix/access.c')
-rw-r--r--otherlibs/unix/access.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/otherlibs/unix/access.c b/otherlibs/unix/access.c
index 4041a1780..605adda2f 100644
--- a/otherlibs/unix/access.c
+++ b/otherlibs/unix/access.c
@@ -16,15 +16,22 @@
#include "unixsupport.h"
#ifdef HAS_UNISTD
-#include <unistd.h>
+# include <unistd.h>
#else
-#include <sys/file.h>
-#ifndef R_OK
-#define R_OK 4/* test for read permission */
-#define W_OK 2/* test for write permission */
-#define X_OK 1/* test for execute (search) permission */
-#define F_OK 0/* test for presence of file */
-#endif
+# ifndef _WIN32
+# include <sys/file.h>
+# ifndef R_OK
+# define R_OK 4/* test for read permission */
+# define W_OK 2/* test for write permission */
+# define X_OK 1/* test for execute (search) permission */
+# define F_OK 0/* test for presence of file */
+# endif
+# else
+# define R_OK 4/* test for read permission */
+# define W_OK 2/* test for write permission */
+# define X_OK 4/* test for execute (search) permission */
+# define F_OK 0/* test for presence of file */
+# endif
#endif
static int access_permission_table[] = {