From e3512ac29149918bdff72064844ef83844e743c7 Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Mon, 1 Sep 1997 14:57:29 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 10 ++++++++ gcc/collect2.c | 2 +- gcc/config.in | 3 +++ gcc/config/alpha/xm-linux.h | 1 - gcc/config/i386/xm-bsd386.h | 6 ----- gcc/config/i386/xm-sysv4.h | 6 ----- gcc/config/mips/xm-sysv4.h | 6 ----- gcc/config/rs6000/xm-sysv4.h | 3 --- gcc/config/sparc/xm-sol2.h | 6 ----- gcc/config/xm-freebsd.h | 6 ----- gcc/config/xm-linux.h | 3 --- gcc/configure | 56 +++++++++++++++++++++++++++++++++++++------- gcc/configure.in | 2 ++ gcc/gcc.texi | 5 ---- gcc/mips-tfile.c | 2 +- 15 files changed, 64 insertions(+), 53 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 783e5ec..8c95015 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +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) * i386/go32-rtems.h, i386/rtems.h, i960/rtems.h, diff --git a/gcc/collect2.c b/gcc/collect2.c index 64d98d7..13cb593 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -213,7 +213,7 @@ enum pass { }; #ifndef NO_SYS_SIGLIST -#ifndef DONT_DECLARE_SYS_SIGLIST +#ifndef SYS_SIGLIST_DECLARED extern char *sys_siglist[]; #endif #endif diff --git a/gcc/config.in b/gcc/config.in index 504e1bb..f14c397 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -16,6 +16,9 @@ /* Whether free must be declared even if is included. */ #undef NEED_DECLARATION_FREE +/* Define if `sys_siglist' is declared by . */ +#undef SYS_SIGLIST_DECLARED + /* Define if you have the header file. */ #undef HAVE_STDDEF_H diff --git a/gcc/config/alpha/xm-linux.h b/gcc/config/alpha/xm-linux.h index 9426c4e..1333d21 100644 --- a/gcc/config/alpha/xm-linux.h +++ b/gcc/config/alpha/xm-linux.h @@ -1,3 +1,2 @@ #define HAVE_STRERROR -#define DONT_DECLARE_SYS_SIGLIST #define USE_BFD diff --git a/gcc/config/i386/xm-bsd386.h b/gcc/config/i386/xm-bsd386.h index 7a823b9..abcce3f 100644 --- a/gcc/config/i386/xm-bsd386.h +++ b/gcc/config/i386/xm-bsd386.h @@ -3,9 +3,3 @@ #include "i386/xm-i386.h" #define HAVE_STRERROR - -/* We have _sys_siglist, but the declaration in conflicts with - the declarations in collect2.c so disable the declarations - in those files. */ - -#define DONT_DECLARE_SYS_SIGLIST diff --git a/gcc/config/i386/xm-sysv4.h b/gcc/config/i386/xm-sysv4.h index cf111a0..49d52b4 100644 --- a/gcc/config/i386/xm-sysv4.h +++ b/gcc/config/i386/xm-sysv4.h @@ -14,9 +14,3 @@ /* Univel, at least, has a small ARG_MAX. Defining this is harmless except for causing extra stat calls in the driver program. */ #define SMALL_ARG_MAX - -/* We have _sys_siglist, but the declaration in conflicts with - the declarations in collect2.c and mips-tfile.c, so disable the declarations - in those files. */ - -#define DONT_DECLARE_SYS_SIGLIST diff --git a/gcc/config/mips/xm-sysv4.h b/gcc/config/mips/xm-sysv4.h index 490a772..bed4405 100644 --- a/gcc/config/mips/xm-sysv4.h +++ b/gcc/config/mips/xm-sysv4.h @@ -3,9 +3,3 @@ /* SVR4 provides no sys_siglist, but does offer the same data under another name. */ #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 diff --git a/gcc/config/rs6000/xm-sysv4.h b/gcc/config/rs6000/xm-sysv4.h index 5283dfc..3a13a57 100644 --- a/gcc/config/rs6000/xm-sysv4.h +++ b/gcc/config/rs6000/xm-sysv4.h @@ -56,9 +56,6 @@ extern char *alloca (); #define ONLY_INT_FIELDS #endif -/* Solaris has a different declaration of sys_siglist than collect uses. */ -#define DONT_DECLARE_SYS_SIGLIST - /* We have STRERROR */ #define HAVE_STRERROR diff --git a/gcc/config/sparc/xm-sol2.h b/gcc/config/sparc/xm-sol2.h index 234ed99..a799f12 100644 --- a/gcc/config/sparc/xm-sol2.h +++ b/gcc/config/sparc/xm-sol2.h @@ -4,9 +4,3 @@ #ifndef __GNUC__ #include #endif - -/* We have _sys_siglist, but the declaration in conflicts with - the declarations in collect2.c and mips-tfile.c, so disable the declarations - in those files. */ - -#define DONT_DECLARE_SYS_SIGLIST diff --git a/gcc/config/xm-freebsd.h b/gcc/config/xm-freebsd.h index f73c9aa..ab3aa114 100644 --- a/gcc/config/xm-freebsd.h +++ b/gcc/config/xm-freebsd.h @@ -25,9 +25,3 @@ Boston, MA 02111-1307, USA. */ /* FreeBSD has strerror. */ #define HAVE_STRERROR - -/* We have _sys_siglist, but the declaration in conflicts with - the declarations in collect2.c and mips-tfile.c, so disable the declarations - in those files. */ - -#define DONT_DECLARE_SYS_SIGLIST diff --git a/gcc/config/xm-linux.h b/gcc/config/xm-linux.h index 88b558c..4ccf001 100644 --- a/gcc/config/xm-linux.h +++ b/gcc/config/xm-linux.h @@ -31,9 +31,6 @@ Boston, MA 02111-1307, USA. */ #undef 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 have been doing that for a long time with USG defined. H.J. */ #define NO_STAB_H diff --git a/gcc/configure b/gcc/configure index 4444518..b91c782 100755 --- a/gcc/configure +++ b/gcc/configure @@ -1,7 +1,7 @@ #! /bin/sh # 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. # # This configure script is free software; the Free Software Foundation @@ -350,7 +350,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12.1" + echo "configure generated by autoconf version 2.12" exit 0 ;; -with-* | --with-*) @@ -704,7 +704,7 @@ esac # 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; } fi @@ -716,14 +716,14 @@ case "$host_alias" in NONE) case $nonopt in 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; } fi ;; *) host_alias=$nonopt ;; 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_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` @@ -741,7 +741,7 @@ NONE) 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_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` @@ -759,7 +759,7 @@ NONE) 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_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` @@ -1521,6 +1521,45 @@ EOF 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 < +#include +/* NetBSD declares sys_siglist in unistd.h. */ +#ifdef HAVE_UNISTD_H +#include +#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 manext='.1' objext='.o' @@ -4483,7 +4522,6 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma - # Echo that links are built if [ x$host = x$target ] then @@ -4605,7 +4643,7 @@ do 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 ;; -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 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; diff --git a/gcc/configure.in b/gcc/configure.in index 7027f31..cb2d6f1 100644 --- a/gcc/configure.in +++ b/gcc/configure.in @@ -140,6 +140,8 @@ GCC_NEED_DECLARATION(realloc) GCC_NEED_DECLARATION(calloc) GCC_NEED_DECLARATION(free) +AC_DECL_SYS_SIGLIST + # File extensions manext='.1' objext='.o' diff --git a/gcc/gcc.texi b/gcc/gcc.texi index 418dcbc..40767c2 100644 --- a/gcc/gcc.texi +++ b/gcc/gcc.texi @@ -3718,11 +3718,6 @@ system. Define this if your system @emph{does not} provide the variable @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 @item USE_PROTOTYPES Define this to be 1 if you know that the host compiler supports diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c index 4cd18d0..4fb2f31 100644 --- a/gcc/mips-tfile.c +++ b/gcc/mips-tfile.c @@ -1767,7 +1767,7 @@ extern int optind; extern int opterr; extern char *version_string; #ifndef NO_SYS_SIGLIST -#ifndef DONT_DECLARE_SYS_SIGLIST +#ifndef SYS_SIGLIST_DECLARED extern char *sys_siglist[NSIG + 1]; #endif #endif -- 2.7.4