From: law Date: Fri, 30 Jan 1998 08:08:31 +0000 (+0000) Subject: * configure.in: Check for declaration of abort. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=372657a6216fe3e660b49bc624830cda57a1c84b;p=platform%2Fupstream%2Flinaro-gcc.git * configure.in: Check for declaration of abort. * acconfig.h: Corresponding changes. * toplev.c: Use NEED_DECLARATION_ABORT to determine if abort should be declared. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17556 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7bc28a2..7a0d8b3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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 diff --git a/gcc/acconfig.h b/gcc/acconfig.h index 1a3c0d4..b1640d8 100644 --- a/gcc/acconfig.h +++ b/gcc/acconfig.h @@ -30,4 +30,7 @@ /* Whether sbrk must be declared even if is included. */ #undef NEED_DECLARATION_SBRK + +/* Whether abort must be declared even if is included. */ +#undef NEED_DECLARATION_ABORT @TOP@ diff --git a/gcc/config.in b/gcc/config.in index d854005..739c5be 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -32,6 +32,9 @@ /* Whether sbrk must be declared even if is included. */ #undef NEED_DECLARATION_SBRK +/* Whether abort must be declared even if is included. */ +#undef NEED_DECLARATION_ABORT + /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS diff --git a/gcc/configure b/gcc/configure index a9cae3b..f5c166b 100755 --- a/gcc/configure +++ b/gcc/configure @@ -3228,14 +3228,68 @@ EOF 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 < +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#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 <&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 < #include @@ -3247,7 +3301,7 @@ int main() { 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 diff --git a/gcc/configure.in b/gcc/configure.in index b4662cc..e7314cd 100644 --- a/gcc/configure.in +++ b/gcc/configure.in @@ -203,6 +203,7 @@ GCC_NEED_DECLARATION(rindex) GCC_NEED_DECLARATION(getenv) GCC_NEED_DECLARATION(atol) GCC_NEED_DECLARATION(sbrk) +GCC_NEED_DECLARATION(abort) AC_DECL_SYS_SIGLIST diff --git a/gcc/toplev.c b/gcc/toplev.c index 39c80ba..5ed2edd 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -192,9 +192,6 @@ void pedwarn_with_file_and_line PVPROTO((char *file, int line, char *s, ...)); 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 (); @@ -204,6 +201,10 @@ void print_switch_values (); /* 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