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/newlib
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-01-14 21:49:13 +0300
committerCorinna Vinschen <corinna@vinschen.de>2010-01-14 21:49:13 +0300
commit37671b5114b5b3614580a5cf1308d3c2e38bd8d3 (patch)
tree76ca1b3a2823d8e5be1c5bf9701b9d664b4bc328 /newlib
parente70fdfb99fb0e0a2558cd824ec37fd2fb2470335 (diff)
* libc/include/sys/_default_fcntl.h (O_CLOEXEC): Define as _FNOINHERIT.
(F_DUPFD_CLOEXEC): Define for Cygwin. * libc/include/sys/unistd.h (dup3): Define for Cygwin. (pipe2): Ditto.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog7
-rw-r--r--newlib/libc/include/sys/_default_fcntl.h5
-rw-r--r--newlib/libc/include/sys/unistd.h4
3 files changed, 16 insertions, 0 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 9dc75865f..cd9b52457 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,5 +1,12 @@
2010-01-14 Corinna Vinschen <corinna@vinschen.de>
+ * libc/include/sys/_default_fcntl.h (O_CLOEXEC): Define as _FNOINHERIT.
+ (F_DUPFD_CLOEXEC): Define for Cygwin.
+ * libc/include/sys/unistd.h (dup3): Define for Cygwin.
+ (pipe2): Ditto.
+
+2010-01-14 Corinna Vinschen <corinna@vinschen.de>
+
* libc/stdio/vfprintf.c (_VFPRINTF_R): Just wave bytes invalid in
the current charset through.
diff --git a/newlib/libc/include/sys/_default_fcntl.h b/newlib/libc/include/sys/_default_fcntl.h
index eb30e5cda..1884136cd 100644
--- a/newlib/libc/include/sys/_default_fcntl.h
+++ b/newlib/libc/include/sys/_default_fcntl.h
@@ -51,6 +51,8 @@ extern "C" {
#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
@@ -122,6 +124,9 @@ extern "C" {
#define F_CNVT 12 /* Convert a fhandle to an open fd */
#define F_RSETLKW 13 /* Set or Clear remote record-lock(Blocking) */
#endif /* !_POSIX_SOURCE */
+#ifdef __CYGWIN__
+#define F_DUPFD_CLOEXEC 14 /* As F_DUPFD, but set close-on-exec flag */
+#endif
/* fcntl(2) flags (l_type field of flock structure) */
#define F_RDLCK 1 /* read lock */
diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h
index 419300253..d6d9b41ea 100644
--- a/newlib/libc/include/sys/unistd.h
+++ b/newlib/libc/include/sys/unistd.h
@@ -38,6 +38,7 @@ int _EXFUN(daemon, (int nochdir, int noclose));
int _EXFUN(dup, (int __fildes ));
int _EXFUN(dup2, (int __fildes, int __fildes2 ));
#if defined(__CYGWIN__)
+int _EXFUN(dup3, (int __fildes, int __fildes2, int flags));
int _EXFUN(eaccess, (const char *__path, int __mode));
void _EXFUN(endusershell, (void));
int _EXFUN(euidaccess, (const char *__path, int __mode));
@@ -129,6 +130,9 @@ int _EXFUN(pause, (void ));
int _EXFUN(pthread_atfork, (void (*)(void), void (*)(void), void (*)(void)));
#endif
int _EXFUN(pipe, (int __fildes[2] ));
+#ifdef __CYGWIN__
+int _EXFUN(pipe2, (int __fildes[2], int flags));
+#endif
ssize_t _EXFUN(pread, (int __fd, void *__buf, size_t __nbytes, off_t __offset));
ssize_t _EXFUN(pwrite, (int __fd, const void *__buf, size_t __nbytes, off_t __offset));
_READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte ));