aboutsummaryrefslogtreecommitdiff
path: root/libiberty/pex-unix.c
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2007-08-24 07:40:35 +0000
committerKai Tietz <ktietz@gcc.gnu.org>2007-08-24 09:40:35 +0200
commit1651030c4233d2bc976a89a5ac746969de805162 (patch)
tree0404b66ffe5fcadd6ec7dc74194dfdaa583c6a0a /libiberty/pex-unix.c
parentaffb3cb2002b1e238f0ae6188742c543934ea270 (diff)
downloadgcc-1651030c4233d2bc976a89a5ac746969de805162.zip
gcc-1651030c4233d2bc976a89a5ac746969de805162.tar.gz
gcc-1651030c4233d2bc976a89a5ac746969de805162.tar.bz2
[patch]: libiberty pex for _WIN64.
From-SVN: r127761
Diffstat (limited to 'libiberty/pex-unix.c')
-rw-r--r--libiberty/pex-unix.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c
index a776041..366e96e 100644
--- a/libiberty/pex-unix.c
+++ b/libiberty/pex-unix.c
@@ -269,12 +269,12 @@ static void pex_child_error (struct pex_obj *, const char *, const char *, int)
ATTRIBUTE_NORETURN;
static int pex_unix_open_read (struct pex_obj *, const char *, int);
static int pex_unix_open_write (struct pex_obj *, const char *, int);
-static long pex_unix_exec_child (struct pex_obj *, int, const char *,
+static pid_t pex_unix_exec_child (struct pex_obj *, int, const char *,
char * const *, char * const *,
int, int, int, int,
const char **, int *);
static int pex_unix_close (struct pex_obj *, int);
-static int pex_unix_wait (struct pex_obj *, long, int *, struct pex_time *,
+static int pex_unix_wait (struct pex_obj *, pid_t, int *, struct pex_time *,
int, const char **, int *);
static int pex_unix_pipe (struct pex_obj *, int *, int);
static FILE *pex_unix_fdopenr (struct pex_obj *, int, int);
@@ -355,7 +355,7 @@ pex_child_error (struct pex_obj *obj, const char *executable,
extern char **environ;
-static long
+static pid_t
pex_unix_exec_child (struct pex_obj *obj, int flags, const char *executable,
char * const * argv, char * const * env,
int in, int out, int errdes,
@@ -384,7 +384,7 @@ pex_unix_exec_child (struct pex_obj *obj, int flags, const char *executable,
case -1:
*err = errno;
*errmsg = VFORK_STRING;
- return -1;
+ return (pid_t) -1;
case 0:
/* Child process. */
@@ -435,7 +435,7 @@ pex_unix_exec_child (struct pex_obj *obj, int flags, const char *executable,
}
/* NOTREACHED */
- return -1;
+ return (pid_t) -1;
default:
/* Parent process. */
@@ -445,7 +445,7 @@ pex_unix_exec_child (struct pex_obj *obj, int flags, const char *executable,
{
*err = errno;
*errmsg = "close";
- return -1;
+ return (pid_t) -1;
}
}
if (out != STDOUT_FILE_NO)
@@ -454,7 +454,7 @@ pex_unix_exec_child (struct pex_obj *obj, int flags, const char *executable,
{
*err = errno;
*errmsg = "close";
- return -1;
+ return (pid_t) -1;
}
}
if (errdes != STDERR_FILE_NO)
@@ -463,18 +463,18 @@ pex_unix_exec_child (struct pex_obj *obj, int flags, const char *executable,
{
*err = errno;
*errmsg = "close";
- return -1;
+ return (pid_t) -1;
}
}
- return (long) pid;
+ return pid;
}
}
/* Wait for a child process to complete. */
static int
-pex_unix_wait (struct pex_obj *obj, long pid, int *status,
+pex_unix_wait (struct pex_obj *obj, pid_t pid, int *status,
struct pex_time *time, int done, const char **errmsg,
int *err)
{