/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. DJGPP specialization.
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. DJGPP specialization.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005
- Free Software Foundation, Inc.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
-static int pex_djgpp_open_write (struct pex_obj *, const char *, int);
-static long pex_djgpp_exec_child (struct pex_obj *, int, const char *,
+static int pex_djgpp_open_write (struct pex_obj *, const char *, int, int);
+static pid_t pex_djgpp_exec_child (struct pex_obj *, int, const char *,
char * const *, char * const *,
int, int, int, int,
const char **, int *);
static int pex_djgpp_close (struct pex_obj *, int);
char * const *, char * const *,
int, int, int, int,
const char **, int *);
static int pex_djgpp_close (struct pex_obj *, int);
-static int pex_djgpp_wait (struct pex_obj *, long, int *, struct pex_time *,
+static pid_t pex_djgpp_wait (struct pex_obj *, pid_t, int *, struct pex_time *,
int, const char **, int *);
/* The list of functions we pass to the common routines. */
int, const char **, int *);
/* The list of functions we pass to the common routines. */
{
/* Note that we can't use O_EXCL here because gcc may have already
created the temporary file via make_temp_file. */
{
/* Note that we can't use O_EXCL here because gcc may have already
created the temporary file via make_temp_file. */
return open (name,
(O_WRONLY | O_CREAT | O_TRUNC
| (binary ? O_BINARY : O_TEXT)),
return open (name,
(O_WRONLY | O_CREAT | O_TRUNC
| (binary ? O_BINARY : O_TEXT)),
pex_djgpp_exec_child (struct pex_obj *obj, int flags, const char *executable,
char * const * argv, char * const * env,
int in, int out, int errdes,
pex_djgpp_exec_child (struct pex_obj *obj, int flags, const char *executable,
char * const * argv, char * const * env,
int in, int out, int errdes,
}
/* Wait for a child process to complete. Actually the child process
has already completed, and we just need to return the exit
status. */
}
/* Wait for a child process to complete. Actually the child process
has already completed, and we just need to return the exit
status. */
-static int
-pex_djgpp_wait (struct pex_obj *obj, long pid, int *status,
+static pid_t
+pex_djgpp_wait (struct pex_obj *obj, pid_t pid, int *status,
struct pex_time *time, int done ATTRIBUTE_UNUSED,
const char **errmsg ATTRIBUTE_UNUSED,
int *err ATTRIBUTE_UNUSED)
struct pex_time *time, int done ATTRIBUTE_UNUSED,
const char **errmsg ATTRIBUTE_UNUSED,
int *err ATTRIBUTE_UNUSED)