1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-09-01 02:34:55 +00:00

unistd-safer: Implement pipe_safer on native Windows.

* lib/pipe-safer.c (pipe_safer): Don't test HAVE_PIPE.
* modules/unistd-safer (Depends-on): Add pipe-posix.
This commit is contained in:
Bruno Haible
2020-12-25 02:16:18 +01:00
parent 4f766278c5
commit 8fede4db2d
3 changed files with 9 additions and 6 deletions
+6
View File
@@ -1,3 +1,9 @@
2020-12-24 Bruno Haible <bruno@clisp.org>
unistd-safer: Implement pipe_safer on native Windows.
* lib/pipe-safer.c (pipe_safer): Don't test HAVE_PIPE.
* modules/unistd-safer (Depends-on): Add pipe-posix.
2020-12-24 Bruno Haible <bruno@clisp.org>
execute: Use posix_spawn by default on native Windows.
+2 -6
View File
@@ -30,7 +30,6 @@
int
pipe_safer (int fd[2])
{
#if HAVE_PIPE
if (pipe (fd) == 0)
{
int i;
@@ -39,18 +38,15 @@ pipe_safer (int fd[2])
fd[i] = fd_safer (fd[i]);
if (fd[i] < 0)
{
int e = errno;
int saved_errno = errno;
close (fd[1 - i]);
errno = e;
errno = saved_errno;
return -1;
}
}
return 0;
}
#else
errno = ENOSYS;
#endif
return -1;
}
+1
View File
@@ -12,6 +12,7 @@ m4/unistd-safer.m4
Depends-on:
fcntl
unistd
pipe-posix
configure.ac:
gl_UNISTD_SAFER