/* Collect static initialization info into data structures that can be
traversed by C++ initialization and finalization routines.
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).
Heavily modified by Michael Meissner (meissner@cygnus.com),
Per Bothner (bothner@cygnus.com), and John Gilmore (gnu@cygnus.com).
struct obstack temporary_obstack;
char * temporary_firstobj;
-/* Holds the return value of pexecute. */
-int pexecute_pid;
+/* Holds the return value of pexecute and fork. */
+int pid;
/* Structure to hold all the directories in which to search for files to
execute. */
{
int status;
- pwait (pexecute_pid, &status, 0);
+ pwait (pid, &status, 0);
if (status)
{
if (WIFSIGNALED (status))
dup2 (redir_handle, STDERR_FILENO);
}
- pexecute_pid = pexecute (argv[0], argv, argv[0], NULL,
- &errmsg_fmt, &errmsg_arg,
- (PEXECUTE_FIRST | PEXECUTE_LAST | PEXECUTE_SEARCH));
+ pid = pexecute (argv[0], argv, argv[0], NULL, &errmsg_fmt, &errmsg_arg,
+ (PEXECUTE_FIRST | PEXECUTE_LAST | PEXECUTE_SEARCH));
if (redir)
{
close (redir_handle);
}
- if (pexecute_pid == -1)
+ if (pid == -1)
fatal_perror (errmsg_fmt, errmsg_arg);
}
void (*quit_handler) PARAMS ((int));
char *real_nm_argv[4];
const char **nm_argv = (const char **) real_nm_argv;
- int pid;
int argc = 0;
int pipe_fd[2];
char *p, buf[1024];
void (*quit_handler) PARAMS ((int));
char *real_ldd_argv[4];
const char **ldd_argv = (const char **) real_ldd_argv;
- int pid;
int argc = 0;
int pipe_fd[2];
char buf[1024];
}
#endif /* COLLECT_EXPORT_LIST */
-extern char *ldgetname PARAMS ((struct ldfile *, void *));
+#if defined (HAVE_DECL_LDGETNAME) && !HAVE_DECL_LDGETNAME
+extern char *ldgetname PARAMS ((LDFILE *, GCC_SYMENT *));
+#endif
/* COFF version to scan the name list of the loaded program for
the symbols g++ uses for static constructors and destructors.