Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2007-01-24 11:27:12 +0300
committerDanny Smith <dannysmith@users.sourceforge.net>2007-01-24 11:27:12 +0300
commitc0c32634da05b48f57ec8209b5efd8f859f2b894 (patch)
treeb29187f7385bdeedf150247305e147fb3a944583 /winsup
parentf28f68cc4f21f6d50f560cf50c520f62cc7abe7d (diff)
* include/io.h (X_OK): Define to F_OK.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/mingw/ChangeLog4
-rw-r--r--winsup/mingw/include/io.h4
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index 72687d5d4..8487abbaa 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,7 @@
+2007-01-24 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * include/io.h (X_OK): Define to F_OK.
+
2007-01-19 Danny Smith <dannysmith@users.sourceforge.net>
* include/stdio.h (SEEK_SET, SEEK_CUR, SEEK_END): Define
diff --git a/winsup/mingw/include/io.h b/winsup/mingw/include/io.h
index c45d10650..45e04110f 100644
--- a/winsup/mingw/include/io.h
+++ b/winsup/mingw/include/io.h
@@ -180,7 +180,9 @@ _CRTIMP int __cdecl chmod (const char*, int);
/* Some defines for _access nAccessMode (MS doesn't define them, but
* it doesn't seem to hurt to add them). */
#define F_OK 0 /* Check for file existence */
-#define X_OK 1 /* Check for execute permission. */
+/* Well maybe it does hurt. On newer versions of MSVCRT, an access mode
+ of 1 causes invalid parameter error. */
+#define X_OK F_OK /* MS access() doesn't check for execute permission. */
#define W_OK 2 /* Check for write permission */
#define R_OK 4 /* Check for read permission */