aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2017-02-04 14:55:36 -0600
committerRob Landley <rob@landley.net>2017-02-04 14:55:36 -0600
commitea9dd8ab7f5fd8ead278ed8d4fa2d96c4e4a67b9 (patch)
treecdc26c288d80616590acb5b17d1f81420d72e6a8 /lib
parent938901d7e2738be29b83331fb60a670afc20c602 (diff)
downloadtoybox-ea9dd8ab7f5fd8ead278ed8d4fa2d96c4e4a67b9.tar.gz
Posix says stdio.h should define 'stdout' as a macro, and bionic turns it into
an array index, which doesn't work as a local variable name. So rename it.
Diffstat (limited to 'lib')
-rw-r--r--lib/lib.h2
-rw-r--r--lib/xwrap.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/lib.h b/lib/lib.h
index e90e79f2..d3f9b1dd 100644
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -130,7 +130,7 @@ void xexec(char **argv);
pid_t xpopen_both(char **argv, int *pipes);
int xwaitpid(pid_t pid);
int xpclose_both(pid_t pid, int *pipes);
-pid_t xpopen(char **argv, int *pipe, int stdout);
+pid_t xpopen(char **argv, int *pipe, int isstdout);
pid_t xpclose(pid_t pid, int pipe);
int xrun(char **argv);
int xpspawn(char **argv, int*pipes);
diff --git a/lib/xwrap.c b/lib/xwrap.c
index 2e52d6b4..0281e701 100644
--- a/lib/xwrap.c
+++ b/lib/xwrap.c
@@ -281,14 +281,14 @@ int xpclose_both(pid_t pid, int *pipes)
}
// Wrapper to xpopen with a pipe for just one of stdin/stdout
-pid_t xpopen(char **argv, int *pipe, int stdout)
+pid_t xpopen(char **argv, int *pipe, int isstdout)
{
int pipes[2], pid;
- pipes[!stdout] = -1;
- pipes[!!stdout] = 0;
+ pipes[!isstdout] = -1;
+ pipes[!!isstdout] = 0;
pid = xpopen_both(argv, pipes);
- *pipe = pid ? pipes[!!stdout] : -1;
+ *pipe = pid ? pipes[!!isstdout] : -1;
return pid;
}