From 5f73c3782d031631d1e193da1b4149af5eeb0728 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Thu, 19 Jun 2003 20:05:36 +0000 Subject: [PATCH] merge from gcc --- libiberty/ChangeLog | 9 +++++++++ libiberty/config.in | 3 +++ libiberty/configure | 31 ++++++++++++++++++++++--------- libiberty/configure.in | 2 +- libiberty/hashtab.c | 4 ++++ 5 files changed, 39 insertions(+), 10 deletions(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 75b66361296..84d4bcdf16f 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,12 @@ +2003-06-19 Dara Hazeghi + + * configure.in: Add check for malloc.h needed by + m68k for function free(). + * configure: Regenerated. + * config.in: Add HAVE_MALLOC_H. + * hashtab.c: include malloc.h were available for + free(). + 2003-06-09 Albert Chin-A-Young PR bootstrap/10974 diff --git a/libiberty/config.in b/libiberty/config.in index 51d161a4606..50ed3266852 100644 --- a/libiberty/config.in +++ b/libiberty/config.in @@ -291,6 +291,9 @@ /* Define if you have the header file. */ #undef HAVE_UNISTD_H +/* Define if you have the header file. */ +#undef HAVE_MALLOC_H + /* whether byteorder is bigendian */ #undef WORDS_BIGENDIAN diff --git a/libiberty/configure b/libiberty/configure index 9182fc3f98e..77d5170a877 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -1492,7 +1492,7 @@ else fi echo "$ac_t""$CPP" 1>&6 -for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h +for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -2900,7 +2900,7 @@ case "${host}" in esac -for ac_hdr in unistd.h +for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -3032,11 +3032,24 @@ else #include #include +#if HAVE_SYS_TYPES_H +# include +#endif + +#if HAVE_STDLIB_H +# include +#endif + +#if HAVE_SYS_STAT_H +# include +#endif + +#if HAVE_UNISTD_H +# include +#endif + /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H @@ -3144,7 +3157,7 @@ main() } EOF -if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3168,7 +3181,7 @@ fi echo $ac_n "checking for working strncmp""... $ac_c" 1>&6 -echo "configure:3172: checking for working strncmp" >&5 +echo "configure:3185: checking for working strncmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3176,7 +3189,7 @@ else ac_cv_func_strncmp_works=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_strncmp_works=yes else diff --git a/libiberty/configure.in b/libiberty/configure.in index 0eab85513da..5dca13ed6f6 100644 --- a/libiberty/configure.in +++ b/libiberty/configure.in @@ -143,7 +143,7 @@ AC_SUBST_FILE(host_makefile_frag) # It's OK to check for header files. Although the compiler may not be # able to link anything, it had better be able to at least compile # something. -AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h) +AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h) AC_HEADER_SYS_WAIT AC_HEADER_TIME diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c index 3896328717a..cbf82592be1 100644 --- a/libiberty/hashtab.c +++ b/libiberty/hashtab.c @@ -45,6 +45,10 @@ Boston, MA 02111-1307, USA. */ #include #endif +#ifdef HAVE_MALLOC_H +#include +#endif + #include #include "libiberty.h" -- 2.30.2