+Fri Jan 30 09:08:16 1998 Jeffrey A Law (law@cygnus.com)
+
+ * configure.in: Check for declaration of abort.
+ * toplev.c: Use NEED_DECLARATION_ABORT to determine if abort should
+ be declared.
+
Thu Jan 29 20:26:12 1998 Jeffrey A Law (law@cygnus.com)
* genattrtab.c (optimize): Define in case PRESERVE_DEATH_INFO_REGNO_P
/* Whether sbrk must be declared even if <unistd.h> is included. */
#undef NEED_DECLARATION_SBRK
+/* Whether abort must be declared even if <stdlib.h> is included. */
+#undef NEED_DECLARATION_ABORT
+
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
fi
+echo $ac_n "checking whether abort must be declared""... $ac_c" 1>&6
+echo "configure:3233: checking whether abort must be declared" >&5
+if eval "test \"`echo '$''{'gcc_cv_decl_needed_abort'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3238 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifndef HAVE_RINDEX
+#define rindex strrchr
+#endif
+#ifndef HAVE_INDEX
+#define index strchr
+#endif
+int main() {
+char *(*pfn) = (char *(*)) abort
+; return 0; }
+EOF
+if { (eval echo configure:3265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gcc_cv_decl_needed_abort=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gcc_cv_decl_needed_abort=yes
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gcc_cv_decl_needed_abort" 1>&6
+if test $gcc_cv_decl_needed_abort = yes; then
+ gcc_tr_decl=NEED_DECLARATION_`echo abort | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $gcc_tr_decl 1
+EOF
+
+fi
+
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:3234: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+echo "configure:3288: 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 3239 "configure"
+#line 3293 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
char *msg = *(sys_siglist + 1);
; return 0; }
EOF
-if { (eval echo configure:3251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_decl_sys_siglist=yes
else
void sorry PVPROTO((char *s, ...));
void really_sorry PVPROTO((char *s, ...));
void fancy_abort ();
-#ifndef abort
-void abort ();
-#endif
void set_target_switch ();
static char *decl_name ();
/* Length of line when printing switch values. */
#define MAX_LINE 75
+#ifdef NEED_DECLARATION_ABORT
+void abort ();
+#endif
+
#ifdef NEED_DECLARATION_SBRK
extern char *sbrk ();
#endif