diff options
author | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-13 10:45:58 +0000 |
---|---|---|
committer | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-13 10:45:58 +0000 |
commit | 486633f014c542bd25640632ab0ca482ecf09e2f (patch) | |
tree | 645bc54da810c66f07695088c570058ea7c950fc /libiberty/pex-win32.c | |
parent | 724518ff7b8d00e2cad390ccfa46ebbbcde93024 (diff) | |
download | gcc-486633f014c542bd25640632ab0ca482ecf09e2f.tar.gz |
2009-04-13 Ozkan Sezer <sezeroz@gmail.com>
PR target/39397
* pex-common.h (struct pex_obj): Store pid values as pid_t,
not as long (members *children and (*wait))
* pex-common.c (pex_run_in_environment): Likewise.
* pex-win32.c (pex_win32_wait): Return pid_t and properly check
returned pid value.
* pex-djgpp.c (pex_djgpp_wait): Return pid_t.
* pex-msdos.c (pex_msdos_wait): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146001 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/pex-win32.c')
-rw-r--r-- | libiberty/pex-win32.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c index 5897866347d..3f377519366 100644 --- a/libiberty/pex-win32.c +++ b/libiberty/pex-win32.c @@ -84,7 +84,7 @@ static pid_t pex_win32_exec_child (struct pex_obj *, int, const char *, int, int, int, int, const char **, int *); static int pex_win32_close (struct pex_obj *, int); -static int pex_win32_wait (struct pex_obj *, pid_t, int *, +static pid_t pex_win32_wait (struct pex_obj *, pid_t, int *, struct pex_time *, int, const char **, int *); static int pex_win32_pipe (struct pex_obj *, int *, int); static FILE *pex_win32_fdopenr (struct pex_obj *, int, int); @@ -705,7 +705,7 @@ spawn_script (const char *executable, char *const *argv, dwCreationFlags, si, pi); if (executable1 != newex) free ((char *) newex); - if ((long) pid < 0) + if (pid == (pid_t) -1) { newex = msys_rootify (executable1); if (newex != executable1) @@ -722,7 +722,7 @@ spawn_script (const char *executable, char *const *argv, } } } - if ((long) pid < 0) + if (pid == (pid_t) -1) errno = save_errno; return pid; } @@ -840,7 +840,7 @@ pex_win32_exec_child (struct pex_obj *obj ATTRIBUTE_UNUSED, int flags, status == 3. We fix the status code to conform to the usual WIF* macros. Note that WIFSIGNALED will never be true under CRTDLL. */ -static int +static pid_t pex_win32_wait (struct pex_obj *obj ATTRIBUTE_UNUSED, pid_t pid, int *status, struct pex_time *time, int done ATTRIBUTE_UNUSED, const char **errmsg, int *err) |