aboutsummaryrefslogtreecommitdiff
path: root/libiberty/pex-common.h
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2007-08-24 16:08:40 +0000
committerDJ Delorie <dj@redhat.com>2007-08-24 16:08:40 +0000
commit29d89e071e7c7d0ea3b13eb883e44498d8390aa0 (patch)
treebbe2c03a11530a05013ec0c145af8653e36e05c9 /libiberty/pex-common.h
parent59678365bc23c47485f4333b685ed0b902340af0 (diff)
downloadgdb-29d89e071e7c7d0ea3b13eb883e44498d8390aa0.zip
gdb-29d89e071e7c7d0ea3b13eb883e44498d8390aa0.tar.gz
gdb-29d89e071e7c7d0ea3b13eb883e44498d8390aa0.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/pex-common.h')
-rw-r--r--libiberty/pex-common.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/libiberty/pex-common.h b/libiberty/pex-common.h
index 8edc13b..5b7bfcc 100644
--- a/libiberty/pex-common.h
+++ b/libiberty/pex-common.h
@@ -26,6 +26,12 @@ Boston, MA 02110-1301, USA. */
#include "libiberty.h"
#include <stdio.h>
+/* pid_t is may defined by config.h or sys/types.h needs to be
+ included. */
+#if !defined(pid_t) && defined(HAVE_SYS_TYPES_H)
+#include <sys/types.h>
+#endif
+
#define install_error_msg "installation problem, cannot exec `%s'"
/* stdin file number. */
@@ -108,7 +114,7 @@ struct pex_funcs
closed in the child process. The function should handle the
PEX_STDERR_TO_STDOUT flag. Return >= 0 on success, or -1 on
error and set *ERRMSG and *ERR. */
- long (*exec_child) (struct pex_obj *, int /* flags */,
+ pid_t (*exec_child) (struct pex_obj *, int /* flags */,
const char */* executable */, char * const * /* argv */,
char * const * /* env */,
int /* in */, int /* out */, int /* errdes */,
@@ -120,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 *, long /* child */, int * /* status */,
+ int (*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