Commit e3512ac2 by Jeffrey A Law Committed by Jeff Law

collect2.c: Change DONT_DECLARE_SYS_SIGLIST to SYS_SIGLIST_DECLARED.

        * collect2.c: Change DONT_DECLARE_SYS_SIGLIST to SYS_SIGLIST_DECLARED.
        * mips-tfile.c: Likewise.
        * gcc.texi: DONT_DECLARE_SYS_SIGLIST: Remove docs.
        * xm-linux.h (DONT_DECLARE_SYS_SIGLIST): Delete definition.
        * xm-freebsd.h, xm-bsd386.h, xm-sysv4.h, xm-sol2.h: Likewise.
        * configure.in: Check for sys_siglist declaration.
        * configure, config.in: Rebuilt.

Fix conflicting sys_siglist decls once and for all.

From-SVN: r15007
parent 5d84b57e
Mon Sep 1 08:29:46 1997 Jeffrey A Law (law@cygnus.com)
* collect2.c: Change DONT_DECLARE_SYS_SIGLIST to SYS_SIGLIST_DECLARED.
* mips-tfile.c: Likewise.
* gcc.texi: DONT_DECLARE_SYS_SIGLIST: Remove docs.
* xm-linux.h (DONT_DECLARE_SYS_SIGLIST): Delete definition.
* xm-freebsd.h, xm-bsd386.h, xm-sysv4.h, xm-sol2.h: Likewise.
* configure.in: Check for sys_siglist declaration.
* configure, config.in: Rebuilt.
Mon Sep 1 08:04:07 1997 Joel Sherrill (joel@OARcorp.com) Mon Sep 1 08:04:07 1997 Joel Sherrill (joel@OARcorp.com)
* i386/go32-rtems.h, i386/rtems.h, i960/rtems.h, * i386/go32-rtems.h, i386/rtems.h, i960/rtems.h,
......
...@@ -213,7 +213,7 @@ enum pass { ...@@ -213,7 +213,7 @@ enum pass {
}; };
#ifndef NO_SYS_SIGLIST #ifndef NO_SYS_SIGLIST
#ifndef DONT_DECLARE_SYS_SIGLIST #ifndef SYS_SIGLIST_DECLARED
extern char *sys_siglist[]; extern char *sys_siglist[];
#endif #endif
#endif #endif
......
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
/* Whether free must be declared even if <stdlib.h> is included. */ /* Whether free must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_FREE #undef NEED_DECLARATION_FREE
/* Define if `sys_siglist' is declared by <signal.h>. */
#undef SYS_SIGLIST_DECLARED
/* Define if you have the <stddef.h> header file. */ /* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H #undef HAVE_STDDEF_H
......
#define HAVE_STRERROR #define HAVE_STRERROR
#define DONT_DECLARE_SYS_SIGLIST
#define USE_BFD #define USE_BFD
...@@ -3,9 +3,3 @@ ...@@ -3,9 +3,3 @@
#include "i386/xm-i386.h" #include "i386/xm-i386.h"
#define HAVE_STRERROR #define HAVE_STRERROR
/* We have _sys_siglist, but the declaration in <signal.h> conflicts with
the declarations in collect2.c so disable the declarations
in those files. */
#define DONT_DECLARE_SYS_SIGLIST
...@@ -14,9 +14,3 @@ ...@@ -14,9 +14,3 @@
/* Univel, at least, has a small ARG_MAX. Defining this is harmless /* Univel, at least, has a small ARG_MAX. Defining this is harmless
except for causing extra stat calls in the driver program. */ except for causing extra stat calls in the driver program. */
#define SMALL_ARG_MAX #define SMALL_ARG_MAX
/* We have _sys_siglist, but the declaration in <signal.h> conflicts with
the declarations in collect2.c and mips-tfile.c, so disable the declarations
in those files. */
#define DONT_DECLARE_SYS_SIGLIST
...@@ -3,9 +3,3 @@ ...@@ -3,9 +3,3 @@
/* SVR4 provides no sys_siglist, /* SVR4 provides no sys_siglist,
but does offer the same data under another name. */ but does offer the same data under another name. */
#define sys_siglist _sys_siglist #define sys_siglist _sys_siglist
/* There is a declaration in /usr/include/signal.h that conflicts with the
declarations in collect2.c and mips-tfile.c, so disable gcc's declarations.
This is at least true for CDC's EP/IX 2.1.1. It is suspected to be true
for RISC/OS 5.x also. */
#define DONT_DECLARE_SYS_SIGLIST
...@@ -56,9 +56,6 @@ extern char *alloca (); ...@@ -56,9 +56,6 @@ extern char *alloca ();
#define ONLY_INT_FIELDS #define ONLY_INT_FIELDS
#endif #endif
/* Solaris has a different declaration of sys_siglist than collect uses. */
#define DONT_DECLARE_SYS_SIGLIST
/* We have STRERROR */ /* We have STRERROR */
#define HAVE_STRERROR #define HAVE_STRERROR
......
...@@ -4,9 +4,3 @@ ...@@ -4,9 +4,3 @@
#ifndef __GNUC__ #ifndef __GNUC__
#include <alloca.h> #include <alloca.h>
#endif #endif
/* We have _sys_siglist, but the declaration in <signal.h> conflicts with
the declarations in collect2.c and mips-tfile.c, so disable the declarations
in those files. */
#define DONT_DECLARE_SYS_SIGLIST
...@@ -25,9 +25,3 @@ Boston, MA 02111-1307, USA. */ ...@@ -25,9 +25,3 @@ Boston, MA 02111-1307, USA. */
/* FreeBSD has strerror. */ /* FreeBSD has strerror. */
#define HAVE_STRERROR #define HAVE_STRERROR
/* We have _sys_siglist, but the declaration in <signal.h> conflicts with
the declarations in collect2.c and mips-tfile.c, so disable the declarations
in those files. */
#define DONT_DECLARE_SYS_SIGLIST
...@@ -31,9 +31,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -31,9 +31,6 @@ Boston, MA 02111-1307, USA. */
#undef POSIX #undef POSIX
#define POSIX #define POSIX
#undef DONT_DECLARE_SYS_SIGLIST
#define DONT_DECLARE_SYS_SIGLIST
/* We do have one, but I'd like to use the one come with gcc since /* We do have one, but I'd like to use the one come with gcc since
we have been doing that for a long time with USG defined. H.J. */ we have been doing that for a long time with USG defined. H.J. */
#define NO_STAB_H #define NO_STAB_H
......
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12.1 # Generated automatically using autoconf version 2.12
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
# #
# This configure script is free software; the Free Software Foundation # This configure script is free software; the Free Software Foundation
...@@ -350,7 +350,7 @@ EOF ...@@ -350,7 +350,7 @@ EOF
verbose=yes ;; verbose=yes ;;
-version | --version | --versio | --versi | --vers) -version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.12.1" echo "configure generated by autoconf version 2.12"
exit 0 ;; exit 0 ;;
-with-* | --with-*) -with-* | --with-*)
...@@ -704,7 +704,7 @@ esac ...@@ -704,7 +704,7 @@ esac
# Make sure we can run config.sub. # Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : if $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi fi
...@@ -716,14 +716,14 @@ case "$host_alias" in ...@@ -716,14 +716,14 @@ case "$host_alias" in
NONE) NONE)
case $nonopt in case $nonopt in
NONE) NONE)
if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : if host_alias=`$ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;; fi ;;
*) host_alias=$nonopt ;; *) host_alias=$nonopt ;;
esac ;; esac ;;
esac esac
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host=`$ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
...@@ -741,7 +741,7 @@ NONE) ...@@ -741,7 +741,7 @@ NONE)
esac ;; esac ;;
esac esac
target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` target=`$ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
...@@ -759,7 +759,7 @@ NONE) ...@@ -759,7 +759,7 @@ NONE)
esac ;; esac ;;
esac esac
build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` build=`$ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
...@@ -1521,6 +1521,45 @@ EOF ...@@ -1521,6 +1521,45 @@ EOF
fi fi
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
echo "configure:1526: checking for sys_siglist declaration in signal.h or unistd.h" >&5
if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1531 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
/* NetBSD declares sys_siglist in unistd.h. */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int main() {
char *msg = *(sys_siglist + 1);
; return 0; }
EOF
if { (eval echo configure:1543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_decl_sys_siglist=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_decl_sys_siglist=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
if test $ac_cv_decl_sys_siglist = yes; then
cat >> confdefs.h <<\EOF
#define SYS_SIGLIST_DECLARED 1
EOF
fi
# File extensions # File extensions
manext='.1' manext='.1'
objext='.o' objext='.o'
...@@ -4483,7 +4522,6 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma ...@@ -4483,7 +4522,6 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma
# Echo that links are built # Echo that links are built
if [ x$host = x$target ] if [ x$host = x$target ]
then then
...@@ -4605,7 +4643,7 @@ do ...@@ -4605,7 +4643,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v) -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.12.1" echo "$CONFIG_STATUS generated by autoconf version 2.12"
exit 0 ;; exit 0 ;;
-help | --help | --hel | --he | --h) -help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;; echo "\$ac_cs_usage"; exit 0 ;;
......
...@@ -140,6 +140,8 @@ GCC_NEED_DECLARATION(realloc) ...@@ -140,6 +140,8 @@ GCC_NEED_DECLARATION(realloc)
GCC_NEED_DECLARATION(calloc) GCC_NEED_DECLARATION(calloc)
GCC_NEED_DECLARATION(free) GCC_NEED_DECLARATION(free)
AC_DECL_SYS_SIGLIST
# File extensions # File extensions
manext='.1' manext='.1'
objext='.o' objext='.o'
......
...@@ -3718,11 +3718,6 @@ system. ...@@ -3718,11 +3718,6 @@ system.
Define this if your system @emph{does not} provide the variable Define this if your system @emph{does not} provide the variable
@code{sys_siglist}. @code{sys_siglist}.
@findex DONT_DECLARE_SYS_SIGLIST
@item DONT_DECLARE_SYS_SIGLIST
Define this if your system has the variable @code{sys_siglist}, and
there is already a declaration of it in the system header files.
@findex USE_PROTOTYPES @findex USE_PROTOTYPES
@item USE_PROTOTYPES @item USE_PROTOTYPES
Define this to be 1 if you know that the host compiler supports Define this to be 1 if you know that the host compiler supports
......
...@@ -1767,7 +1767,7 @@ extern int optind; ...@@ -1767,7 +1767,7 @@ extern int optind;
extern int opterr; extern int opterr;
extern char *version_string; extern char *version_string;
#ifndef NO_SYS_SIGLIST #ifndef NO_SYS_SIGLIST
#ifndef DONT_DECLARE_SYS_SIGLIST #ifndef SYS_SIGLIST_DECLARED
extern char *sys_siglist[NSIG + 1]; extern char *sys_siglist[NSIG + 1];
#endif #endif
#endif #endif
......
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