aboutsummaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-04-22 23:52:06 +0000
committerChristopher Faylor <me@cgf.cx>2001-04-22 23:52:06 +0000
commitcb4cc28370e4d7d57307b8b917ac9557ab488669 (patch)
treea3f4400f598d6aeccfa2088ed37efadc0c13bc11 /newlib
parent1acf5c29c879cd956d7d0bf51c615526f6f1bc74 (diff)
downloadnewlib-cb4cc28370e4d7d57307b8b917ac9557ab488669.zip
newlib-cb4cc28370e4d7d57307b8b917ac9557ab488669.tar.gz
newlib-cb4cc28370e4d7d57307b8b917ac9557ab488669.tar.bz2
* libc/include/sys/unistd.h [X_OK]: Use better protection against Cygwin X_OK
definitions in sys/file.h.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/include/sys/unistd.h13
2 files changed, 12 insertions, 6 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index de33e60..07e2f03 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-22 Earnie Boyd <earnie@users.sourceforge.net>
+
+ * libc/include/sys/unistd.h [X_OK]: Use better protection against
+ Cygwin X_OK definitions in sys/file.h.
+
Fri Apr 20 23:17:51 2001 Christopher Faylor <cgf@cygnus.com>
* libc/include/sys/time.h: Define timercmp and other macros for
diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h
index fc8c25a..806cc06 100644
--- a/newlib/libc/include/sys/unistd.h
+++ b/newlib/libc/include/sys/unistd.h
@@ -128,13 +128,14 @@ int _EXFUN(readlink, (const char *__path, char *__buf, int __buflen));
int _EXFUN(symlink, (const char *__name1, const char *__name2));
#endif
-# define F_OK 0
-# define R_OK 4
-# define W_OK 2
-# define X_OK 1
+#define F_OK 0
+#define R_OK 4
+#define W_OK 2
-#if defined (__CYGWIN__) && !defined (__INSIDE_CYGWIN__)
-# undef X_OK
+#undef X_OK
+#if !defined (__CYGWIN__) || defined (__INSIDE_CYGWIN__)
+# define X_OK 1
+#else
# define X_OK _cygwin_X_OK
extern const unsigned _cygwin_X_OK;
#endif