Commit cbc158bb by John David Anglin Committed by John David Anglin

collect2.c (pexecute_pid): Rename to pid.

	* collect2.c (pexecute_pid): Rename to pid.
	(collect_wait, collect_execute, scan_prog_file, scan_libraries): Use
	pid.

From-SVN: r62269
parent dcef1843
2003-02-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* collect2.c (pexecute_pid): Rename to pid.
(collect_wait, collect_execute, scan_prog_file, scan_libraries): Use
pid.
2003-02-01 Geoffrey Keating <geoffk@apple.com> 2003-02-01 Geoffrey Keating <geoffk@apple.com>
* doc/extend.texi (Function Attributes): Remove documentation * doc/extend.texi (Function Attributes): Remove documentation
......
/* Collect static initialization info into data structures that can be /* Collect static initialization info into data structures that can be
traversed by C++ initialization and finalization routines. traversed by C++ initialization and finalization routines.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002 Free Software Foundation, Inc. 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Chris Smith (csmith@convex.com). Contributed by Chris Smith (csmith@convex.com).
Heavily modified by Michael Meissner (meissner@cygnus.com), Heavily modified by Michael Meissner (meissner@cygnus.com),
Per Bothner (bothner@cygnus.com), and John Gilmore (gnu@cygnus.com). Per Bothner (bothner@cygnus.com), and John Gilmore (gnu@cygnus.com).
...@@ -235,8 +235,8 @@ static struct head frame_tables; /* list of frame unwind info tables */ ...@@ -235,8 +235,8 @@ static struct head frame_tables; /* list of frame unwind info tables */
struct obstack temporary_obstack; struct obstack temporary_obstack;
char * temporary_firstobj; char * temporary_firstobj;
/* Holds the return value of pexecute. */ /* Holds the return value of pexecute and fork. */
int pexecute_pid; int pid;
/* Structure to hold all the directories in which to search for files to /* Structure to hold all the directories in which to search for files to
execute. */ execute. */
...@@ -1500,7 +1500,7 @@ collect_wait (prog) ...@@ -1500,7 +1500,7 @@ collect_wait (prog)
{ {
int status; int status;
pwait (pexecute_pid, &status, 0); pwait (pid, &status, 0);
if (status) if (status)
{ {
if (WIFSIGNALED (status)) if (WIFSIGNALED (status))
...@@ -1589,9 +1589,8 @@ collect_execute (prog, argv, redir) ...@@ -1589,9 +1589,8 @@ collect_execute (prog, argv, redir)
dup2 (redir_handle, STDERR_FILENO); dup2 (redir_handle, STDERR_FILENO);
} }
pexecute_pid = pexecute (argv[0], argv, argv[0], NULL, pid = pexecute (argv[0], argv, argv[0], NULL, &errmsg_fmt, &errmsg_arg,
&errmsg_fmt, &errmsg_arg, (PEXECUTE_FIRST | PEXECUTE_LAST | PEXECUTE_SEARCH));
(PEXECUTE_FIRST | PEXECUTE_LAST | PEXECUTE_SEARCH));
if (redir) if (redir)
{ {
...@@ -1603,7 +1602,7 @@ collect_execute (prog, argv, redir) ...@@ -1603,7 +1602,7 @@ collect_execute (prog, argv, redir)
close (redir_handle); close (redir_handle);
} }
if (pexecute_pid == -1) if (pid == -1)
fatal_perror (errmsg_fmt, errmsg_arg); fatal_perror (errmsg_fmt, errmsg_arg);
} }
...@@ -2070,7 +2069,6 @@ scan_prog_file (prog_name, which_pass) ...@@ -2070,7 +2069,6 @@ scan_prog_file (prog_name, which_pass)
void (*quit_handler) PARAMS ((int)); void (*quit_handler) PARAMS ((int));
char *real_nm_argv[4]; char *real_nm_argv[4];
const char **nm_argv = (const char **) real_nm_argv; const char **nm_argv = (const char **) real_nm_argv;
int pid;
int argc = 0; int argc = 0;
int pipe_fd[2]; int pipe_fd[2];
char *p, buf[1024]; char *p, buf[1024];
...@@ -2515,7 +2513,6 @@ scan_libraries (prog_name) ...@@ -2515,7 +2513,6 @@ scan_libraries (prog_name)
void (*quit_handler) PARAMS ((int)); void (*quit_handler) PARAMS ((int));
char *real_ldd_argv[4]; char *real_ldd_argv[4];
const char **ldd_argv = (const char **) real_ldd_argv; const char **ldd_argv = (const char **) real_ldd_argv;
int pid;
int argc = 0; int argc = 0;
int pipe_fd[2]; int pipe_fd[2];
char buf[1024]; char buf[1024];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment