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 + + * 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 * 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