summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-11-25 11:53:00 +0000
committerCorinna Vinschen <corinna@vinschen.de>2014-11-25 11:53:00 +0000
commit75e2565a570b40e88f87609a5c74ae9bfb98bd3c (patch)
treed34192d680ca5b9bb8dc3b874d6e2e9339d5d768
parentcda7e6ca2081df83e91415e14aeef1fa9b5adf59 (diff)
downloadcygnal-75e2565a570b40e88f87609a5c74ae9bfb98bd3c.tar.gz
cygnal-75e2565a570b40e88f87609a5c74ae9bfb98bd3c.tar.bz2
cygnal-75e2565a570b40e88f87609a5c74ae9bfb98bd3c.zip
* libc/include/sys/_default_fcntl.h: Move all Cygwin-specific open
flags from Cygwin's fcntl.h here. Remove check for WIN32. Remove Windows-specific macros.
-rw-r--r--newlib/ChangeLog6
-rw-r--r--newlib/libc/include/sys/_default_fcntl.h28
2 files changed, 18 insertions, 16 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index f9249de75..a852e9f19 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,9 @@
+2014-11-25 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/_default_fcntl.h: Move all Cygwin-specific open
+ flags from Cygwin's fcntl.h here. Remove check for WIN32. Remove
+ Windows-specific macros.
+
2014-11-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/sys/resource.h: Add prototype for getrusage()
diff --git a/newlib/libc/include/sys/_default_fcntl.h b/newlib/libc/include/sys/_default_fcntl.h
index b70e71e1e..eb674ae79 100644
--- a/newlib/libc/include/sys/_default_fcntl.h
+++ b/newlib/libc/include/sys/_default_fcntl.h
@@ -44,29 +44,25 @@ extern "C" {
#define O_NONBLOCK _FNONBLOCK
#define O_NOCTTY _FNOCTTY
/* For machines which care - */
-#if defined (_WIN32) || defined (__CYGWIN__)
+#if defined (__CYGWIN__)
#define _FBINARY 0x10000
#define _FTEXT 0x20000
#define _FNOINHERIT 0x40000
+#define _FDIRECT 0x80000
+#define _FNOFOLLOW 0x100000
+#define _FDIRECTORY 0x200000
+#define _FEXECSRCH 0x400000
#define O_BINARY _FBINARY
#define O_TEXT _FTEXT
-#define O_NOINHERIT _FNOINHERIT
-/* O_CLOEXEC is the Linux equivalent to O_NOINHERIT */
#define O_CLOEXEC _FNOINHERIT
-
-/* The windows header files define versions with a leading underscore. */
-#define _O_RDONLY O_RDONLY
-#define _O_WRONLY O_WRONLY
-#define _O_RDWR O_RDWR
-#define _O_APPEND O_APPEND
-#define _O_CREAT O_CREAT
-#define _O_TRUNC O_TRUNC
-#define _O_EXCL O_EXCL
-#define _O_TEXT O_TEXT
-#define _O_BINARY O_BINARY
-#define _O_RAW O_BINARY
-#define _O_NOINHERIT O_NOINHERIT
+#define O_DIRECT _FDIRECT
+#define O_NOFOLLOW _FNOFOLLOW
+#define O_DSYNC _FSYNC
+#define O_RSYNC _FSYNC
+#define O_DIRECTORY _FDIRECTORY
+#define O_EXEC _FEXECSRCH
+#define O_SEARCH _FEXECSRCH
#endif
#ifndef _POSIX_SOURCE