Commit c375c43b by Kaveh R. Ghazi Committed by Kaveh Ghazi

configure.in: Call AC_FUNC_VFORK.

        * configure.in: Call AC_FUNC_VFORK.
        * collect2.c: Define VFORK_STRING as a printable string for
        error messages (either "vfork" or "fork".)  If HAVE_VFORK_H is
        defined, include vfork.h.  If VMS is defined, define vfork()
        appropriately.  Remove vfork check on USG, we're using autoconf.
        (collect_execute): Pass VFORK_STRING to fatal_perror instead of
        checking locally what string to pass.
        (scan_prog_file): Likewise.
        (scan_libraries): Likewise.
        * gcc.c: Remove vfork check on USG, we're using autoconf.
        Besides, no calls to vfork/fork occur in this file.
        * protoize.c: Likewise.

From-SVN: r23498
parent 3ccc3a56
Mon Nov 2 10:10:35 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.in: Call AC_FUNC_VFORK.
* collect2.c: Define VFORK_STRING as a printable string for
error messages (either "vfork" or "fork".) If HAVE_VFORK_H is
defined, include vfork.h. If VMS is defined, define vfork()
appropriately. Remove vfork check on USG, we're using autoconf.
(collect_execute): Pass VFORK_STRING to fatal_perror instead of
checking locally what string to pass.
(scan_prog_file): Likewise.
(scan_libraries): Likewise.
* gcc.c: Remove vfork check on USG, we're using autoconf.
Besides, no calls to vfork/fork occur in this file.
* protoize.c: Likewise.
Mon Nov 2 07:52:28 1998 Alexandre Oliva <oliva@dcc.unicamp.br> Mon Nov 2 07:52:28 1998 Alexandre Oliva <oliva@dcc.unicamp.br>
* configure.in (DEFAULT_LINKER): renamed from LD * configure.in (DEFAULT_LINKER): renamed from LD
......
...@@ -30,6 +30,19 @@ Boston, MA 02111-1307, USA. */ ...@@ -30,6 +30,19 @@ Boston, MA 02111-1307, USA. */
#include <signal.h> #include <signal.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifdef vfork /* Autoconf may define this to fork for us. */
# define VFORK_STRING "fork"
#else
# define VFORK_STRING "vfork"
#endif
#ifdef HAVE_VFORK_H
#include <vfork.h>
#endif
#ifdef VMS
#define vfork() (decc$$alloc_vfork_blocks() >= 0 ? \
lib$get_current_invo_context(decc$$get_vfork_jmpbuf()) : -1)
#endif /* VMS */
#define COLLECT #define COLLECT
#include "demangle.h" #include "demangle.h"
...@@ -43,10 +56,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -43,10 +56,6 @@ Boston, MA 02111-1307, USA. */
#define obstack_chunk_alloc xmalloc #define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free #define obstack_chunk_free free
#ifdef USG
#define vfork fork
#endif
#ifndef WIFSIGNALED #ifndef WIFSIGNALED
#define WIFSIGNALED(S) (((S) & 0xff) != 0 && ((S) & 0xff) != 0x7f) #define WIFSIGNALED(S) (((S) & 0xff) != 0 && ((S) & 0xff) != 0x7f)
#endif #endif
...@@ -1716,13 +1725,7 @@ collect_execute (prog, argv, redir) ...@@ -1716,13 +1725,7 @@ collect_execute (prog, argv, redir)
#ifndef __CYGWIN32__ #ifndef __CYGWIN32__
pid = vfork (); pid = vfork ();
if (pid == -1) if (pid == -1)
{ fatal_perror (VFORK_STRING);
#ifdef vfork
fatal_perror ("fork");
#else
fatal_perror ("vfork");
#endif
}
if (pid == 0) /* child context */ if (pid == 0) /* child context */
{ {
...@@ -2243,13 +2246,7 @@ scan_prog_file (prog_name, which_pass) ...@@ -2243,13 +2246,7 @@ scan_prog_file (prog_name, which_pass)
/* Spawn child nm on pipe */ /* Spawn child nm on pipe */
pid = vfork (); pid = vfork ();
if (pid == -1) if (pid == -1)
{ fatal_perror (VFORK_STRING);
#ifdef vfork
fatal_perror ("fork");
#else
fatal_perror ("vfork");
#endif
}
if (pid == 0) /* child context */ if (pid == 0) /* child context */
{ {
...@@ -2685,13 +2682,7 @@ scan_libraries (prog_name) ...@@ -2685,13 +2682,7 @@ scan_libraries (prog_name)
/* Spawn child ldd on pipe */ /* Spawn child ldd on pipe */
pid = vfork (); pid = vfork ();
if (pid == -1) if (pid == -1)
{ fatal_perror (VFORK_STRING);
#ifdef vfork
fatal_perror ("fork");
#else
fatal_perror ("vfork");
#endif
}
if (pid == 0) /* child context */ if (pid == 0) /* child context */
{ {
......
...@@ -98,9 +98,15 @@ ...@@ -98,9 +98,15 @@
/* Define if you don't have vprintf but do have _doprnt. */ /* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT #undef HAVE_DOPRNT
/* Define if you have <vfork.h>. */
#undef HAVE_VFORK_H
/* Define if you have the vprintf function. */ /* Define if you have the vprintf function. */
#undef HAVE_VPRINTF #undef HAVE_VPRINTF
/* Define to `int' if <sys/types.h> doesn't define. */
#undef pid_t
/* Define if you have the ANSI C header files. */ /* Define if you have the ANSI C header files. */
#undef STDC_HEADERS #undef STDC_HEADERS
...@@ -110,6 +116,9 @@ ...@@ -110,6 +116,9 @@
/* Define if you can safely include both <sys/time.h> and <time.h>. */ /* Define if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME #undef TIME_WITH_SYS_TIME
/* Define vfork as fork if vfork does not work. */
#undef vfork
/* Define if you have the atoll function. */ /* Define if you have the atoll function. */
#undef HAVE_ATOLL #undef HAVE_ATOLL
......
...@@ -367,6 +367,7 @@ AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \ ...@@ -367,6 +367,7 @@ AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \
GCC_FUNC_VFPRINTF_DOPRNT GCC_FUNC_VFPRINTF_DOPRNT
GCC_FUNC_PRINTF_PTR GCC_FUNC_PRINTF_PTR
AC_FUNC_VFORK
GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \ GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \
index rindex getenv atol sbrk abort atof strerror getcwd getwd \ index rindex getenv atol sbrk abort atof strerror getcwd getwd \
......
...@@ -69,10 +69,6 @@ extern void set_std_prefix PROTO((char *, int)); ...@@ -69,10 +69,6 @@ extern void set_std_prefix PROTO((char *, int));
#define exit __posix_exit #define exit __posix_exit
#endif #endif
#ifdef USG
#define vfork fork
#endif /* USG */
/* Test if something is a normal file. */ /* Test if something is a normal file. */
#ifndef S_ISREG #ifndef S_ISREG
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
......
...@@ -182,12 +182,6 @@ extern int access (); ...@@ -182,12 +182,6 @@ extern int access ();
extern size_t strlen () extern size_t strlen ()
#endif #endif
/* Fork is not declared because the declaration caused a conflict
on the HPPA. */
#if !(defined (USG) || defined (VMS))
#define fork vfork
#endif /* (defined (USG) || defined (VMS)) */
#endif /* !defined (POSIX) */ #endif /* !defined (POSIX) */
/* Look for these where the `const' qualifier is intentionally cast aside. */ /* Look for these where the `const' qualifier is intentionally cast aside. */
......
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