summaryrefslogtreecommitdiff
path: root/libiberty/pex-common.h
diff options
context:
space:
mode:
authorOzkan Sezer <sezeroz@gmail.com>2009-04-13 10:45:58 +0000
committerKai Tietz <ktietz@gcc.gnu.org>2009-04-13 12:45:58 +0200
commit92c3e7043a4af0a84bd326a043668d4aaa465931 (patch)
tree645bc54da810c66f07695088c570058ea7c950fc /libiberty/pex-common.h
parent266aa80543a9dbf9bc53d8d7123f847124740b73 (diff)
downloadgcc-92c3e7043a4af0a84bd326a043668d4aaa465931.tar.gz
re PR target/39397 (libiberty/pex-*, inconsistent/incorrect pid_t usage)
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. From-SVN: r146001
Diffstat (limited to 'libiberty/pex-common.h')
-rw-r--r--libiberty/pex-common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libiberty/pex-common.h b/libiberty/pex-common.h
index 5b7bfcc03ee..af338e6a34b 100644
--- a/libiberty/pex-common.h
+++ b/libiberty/pex-common.h
@@ -70,7 +70,7 @@ struct pex_obj
/* Number of child processes. */
int count;
/* PIDs of child processes; array allocated using malloc. */
- long *children;
+ pid_t *children;
/* Exit statuses of child processes; array allocated using malloc. */
int *status;
/* Time used by child processes; array allocated using malloc. */
@@ -126,7 +126,7 @@ struct pex_funcs
and time in *TIME (if it is not null). CHILD is from fork. DONE
is 1 if this is called via pex_free. ERRMSG and ERR are as in
fork. Return 0 on success, -1 on error. */
- int (*wait) (struct pex_obj *, pid_t /* child */, int * /* status */,
+ pid_t (*wait) (struct pex_obj *, pid_t /* child */, int * /* status */,
struct pex_time * /* time */, int /* done */,
const char ** /* errmsg */, int * /* err */);
/* Create a pipe (only called if PEX_USE_PIPES is set) storing two