diff options
| author | Paul Eggert | 2013-07-09 10:16:21 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-07-09 10:16:21 -0700 |
| commit | 7b154deff5f593d056b54d81baf627dcea6bb149 (patch) | |
| tree | 087a09ad257f99b921051708179b74f2bc3dbebe /lib/pipe2.c | |
| parent | d74647c382d793c2df2eb5b4756b9742ea57c1cc (diff) | |
| download | emacs-7b154deff5f593d056b54d81baf627dcea6bb149.tar.gz emacs-7b154deff5f593d056b54d81baf627dcea6bb149.zip | |
Port recent close-on-exec changes to Cygwin.
* lib/binary-io.c, lib/binary-io.h: New files.
Merge from gnulib, incorporating:
2013-07-09 accept4, dup3, pipe2: port to Cygwin
* lib/pipe2.c: Update from gnulib, as part of this merge.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
Fixes: debbugs:14821
Diffstat (limited to 'lib/pipe2.c')
| -rw-r--r-- | lib/pipe2.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/pipe2.c b/lib/pipe2.c index 3858c328f76..211d75545c0 100644 --- a/lib/pipe2.c +++ b/lib/pipe2.c | |||
| @@ -22,10 +22,7 @@ | |||
| 22 | #include <errno.h> | 22 | #include <errno.h> |
| 23 | #include <fcntl.h> | 23 | #include <fcntl.h> |
| 24 | 24 | ||
| 25 | #if GNULIB_BINARY_IO | 25 | #include "binary-io.h" |
| 26 | # include "binary-io.h" | ||
| 27 | #endif | ||
| 28 | |||
| 29 | #include "verify.h" | 26 | #include "verify.h" |
| 30 | 27 | ||
| 31 | #if GNULIB_defined_O_NONBLOCK | 28 | #if GNULIB_defined_O_NONBLOCK |
| @@ -141,13 +138,13 @@ pipe2 (int fd[2], int flags) | |||
| 141 | # if O_BINARY | 138 | # if O_BINARY |
| 142 | if (flags & O_BINARY) | 139 | if (flags & O_BINARY) |
| 143 | { | 140 | { |
| 144 | setmode (fd[1], O_BINARY); | 141 | set_binary_mode (fd[1], O_BINARY); |
| 145 | setmode (fd[0], O_BINARY); | 142 | set_binary_mode (fd[0], O_BINARY); |
| 146 | } | 143 | } |
| 147 | else if (flags & O_TEXT) | 144 | else if (flags & O_TEXT) |
| 148 | { | 145 | { |
| 149 | setmode (fd[1], O_TEXT); | 146 | set_binary_mode (fd[1], O_TEXT); |
| 150 | setmode (fd[0], O_TEXT); | 147 | set_binary_mode (fd[0], O_TEXT); |
| 151 | } | 148 | } |
| 152 | # endif | 149 | # endif |
| 153 | 150 | ||