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>
* configure.in (DEFAULT_LINKER): renamed from LD
......
......@@ -30,6 +30,19 @@ Boston, MA 02111-1307, USA. */
#include <signal.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
#include "demangle.h"
......@@ -43,10 +56,6 @@ Boston, MA 02111-1307, USA. */
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
#ifdef USG
#define vfork fork
#endif
#ifndef WIFSIGNALED
#define WIFSIGNALED(S) (((S) & 0xff) != 0 && ((S) & 0xff) != 0x7f)
#endif
......@@ -1716,13 +1725,7 @@ collect_execute (prog, argv, redir)
#ifndef __CYGWIN32__
pid = vfork ();
if (pid == -1)
{
#ifdef vfork
fatal_perror ("fork");
#else
fatal_perror ("vfork");
#endif
}
fatal_perror (VFORK_STRING);
if (pid == 0) /* child context */
{
......@@ -2243,13 +2246,7 @@ scan_prog_file (prog_name, which_pass)
/* Spawn child nm on pipe */
pid = vfork ();
if (pid == -1)
{
#ifdef vfork
fatal_perror ("fork");
#else
fatal_perror ("vfork");
#endif
}
fatal_perror (VFORK_STRING);
if (pid == 0) /* child context */
{
......@@ -2685,13 +2682,7 @@ scan_libraries (prog_name)
/* Spawn child ldd on pipe */
pid = vfork ();
if (pid == -1)
{
#ifdef vfork
fatal_perror ("fork");
#else
fatal_perror ("vfork");
#endif
}
fatal_perror (VFORK_STRING);
if (pid == 0) /* child context */
{
......
......@@ -98,9 +98,15 @@
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
/* Define if you have <vfork.h>. */
#undef HAVE_VFORK_H
/* Define if you have the vprintf function. */
#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. */
#undef STDC_HEADERS
......@@ -110,6 +116,9 @@
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define vfork as fork if vfork does not work. */
#undef vfork
/* Define if you have the atoll function. */
#undef HAVE_ATOLL
......
......@@ -367,6 +367,7 @@ AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \
GCC_FUNC_VFPRINTF_DOPRNT
GCC_FUNC_PRINTF_PTR
AC_FUNC_VFORK
GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \
index rindex getenv atol sbrk abort atof strerror getcwd getwd \
......
......@@ -69,10 +69,6 @@ extern void set_std_prefix PROTO((char *, int));
#define exit __posix_exit
#endif
#ifdef USG
#define vfork fork
#endif /* USG */
/* Test if something is a normal file. */
#ifndef S_ISREG
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
......
......@@ -182,12 +182,6 @@ extern int access ();
extern size_t strlen ()
#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) */
/* 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