diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-08-15 16:05:13 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-08-15 16:05:13 +0000 |
commit | 56c387b1b32a36204de6071cc4d192561bb359ed (patch) | |
tree | 9e8281e98e60bc6b59d3f1c2fac6b010b1a97382 /winsup/cygwin/pipe.cc | |
parent | a2ffbf1e80332a2ebc22322ff14cb0b6e6bdd176 (diff) | |
download | newlib-56c387b1b32a36204de6071cc4d192561bb359ed.zip newlib-56c387b1b32a36204de6071cc4d192561bb359ed.tar.gz newlib-56c387b1b32a36204de6071cc4d192561bb359ed.tar.bz2 |
* pipe.cc (pipe): Just call _pipe with O_BINARY mode. Move code to
generate normalized pathnames from here...
(_pipe): ...to here.
Diffstat (limited to 'winsup/cygwin/pipe.cc')
-rw-r--r-- | winsup/cygwin/pipe.cc | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index 87f79bd..1dd2c32 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -364,11 +364,11 @@ fhandler_pipe::fstatvfs (struct statvfs *sfs) } extern "C" int -pipe (int filedes[2]) +_pipe (int filedes[2], unsigned int psize, int mode) { fhandler_pipe *fhs[2]; - int res = fhandler_pipe::create (fhs, DEFAULT_PIPEBUFSIZE, O_BINARY); - if (res == 0) + int res = fhandler_pipe::create (fhs, psize, mode); + if (!res) { cygheap_fdnew fdin; cygheap_fdnew fdout (fdin, false); @@ -383,27 +383,13 @@ pipe (int filedes[2]) filedes[1] = fdout; debug_printf ("%d, %d", (int) fdin, (int) fdout); } - return res; } extern "C" int -_pipe (int filedes[2], unsigned int psize, int mode) +pipe (int filedes[2]) { - fhandler_pipe *fhs[2]; - int res = fhandler_pipe::create (fhs, psize, mode); - /* This type of pipe is not interruptible so set the appropriate flag. */ - if (!res) - { - cygheap_fdnew fdin; - cygheap_fdnew fdout (fdin, false); - fdin = fhs[0]; - fdout = fhs[1]; - filedes[0] = fdin; - filedes[1] = fdout; - } - - return res; + return _pipe (filedes, DEFAULT_PIPEBUFSIZE, O_BINARY); } extern "C" int |