mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-20 16:01:10 +08:00
* pipe.cc (pipe): Just call _pipe with O_BINARY mode. Move code to
generate normalized pathnames from here... (_pipe): ...to here.
This commit is contained in:
parent
a2ffbf1e80
commit
56c387b1b3
@ -1,3 +1,9 @@
|
|||||||
|
2011-08-15 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* pipe.cc (pipe): Just call _pipe with O_BINARY mode. Move code to
|
||||||
|
generate normalized pathnames from here...
|
||||||
|
(_pipe): ...to here.
|
||||||
|
|
||||||
2011-08-13 Corinna Vinschen <corinna@vinschen.de>
|
2011-08-13 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* miscfuncs.cc (CreatePipeOverlapped): New function.
|
* miscfuncs.cc (CreatePipeOverlapped): New function.
|
||||||
|
@ -364,11 +364,11 @@ fhandler_pipe::fstatvfs (struct statvfs *sfs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
pipe (int filedes[2])
|
_pipe (int filedes[2], unsigned int psize, int mode)
|
||||||
{
|
{
|
||||||
fhandler_pipe *fhs[2];
|
fhandler_pipe *fhs[2];
|
||||||
int res = fhandler_pipe::create (fhs, DEFAULT_PIPEBUFSIZE, O_BINARY);
|
int res = fhandler_pipe::create (fhs, psize, mode);
|
||||||
if (res == 0)
|
if (!res)
|
||||||
{
|
{
|
||||||
cygheap_fdnew fdin;
|
cygheap_fdnew fdin;
|
||||||
cygheap_fdnew fdout (fdin, false);
|
cygheap_fdnew fdout (fdin, false);
|
||||||
@ -383,27 +383,13 @@ pipe (int filedes[2])
|
|||||||
filedes[1] = fdout;
|
filedes[1] = fdout;
|
||||||
debug_printf ("%d, %d", (int) fdin, (int) fdout);
|
debug_printf ("%d, %d", (int) fdin, (int) fdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
_pipe (int filedes[2], unsigned int psize, int mode)
|
pipe (int filedes[2])
|
||||||
{
|
{
|
||||||
fhandler_pipe *fhs[2];
|
return _pipe (filedes, DEFAULT_PIPEBUFSIZE, O_BINARY);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user