aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2003-06-19 20:05:36 +0000
committerDJ Delorie <dj@redhat.com>2003-06-19 20:05:36 +0000
commit5f73c3782d031631d1e193da1b4149af5eeb0728 (patch)
tree1d239761a57ade3c038a41180246350d88874058
parent1171114a94363af05f5b8489a2437e3ec5cc0528 (diff)
downloadfsf-binutils-gdb-5f73c3782d031631d1e193da1b4149af5eeb0728.zip
fsf-binutils-gdb-5f73c3782d031631d1e193da1b4149af5eeb0728.tar.gz
fsf-binutils-gdb-5f73c3782d031631d1e193da1b4149af5eeb0728.tar.bz2
merge from gcc
-rw-r--r--libiberty/ChangeLog9
-rw-r--r--libiberty/config.in3
-rwxr-xr-xlibiberty/configure31
-rw-r--r--libiberty/configure.in2
-rw-r--r--libiberty/hashtab.c4
5 files changed, 39 insertions, 10 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 75b6636..84d4bcd 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,12 @@
+2003-06-19 Dara Hazeghi <dhazeghi@yahoo.com>
+
+ * 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 <china@thewrittenword.com>
PR bootstrap/10974
diff --git a/libiberty/config.in b/libiberty/config.in
index 51d161a..50ed326 100644
--- a/libiberty/config.in
+++ b/libiberty/config.in
@@ -291,6 +291,9 @@
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
/* whether byteorder is bigendian */
#undef WORDS_BIGENDIAN
diff --git a/libiberty/configure b/libiberty/configure
index 9182fc3..77d5170 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 <fcntl.h>
#include <sys/mman.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# 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 <<EOF
-#line 3180 "configure"
+#line 3193 "configure"
#include "confdefs.h"
/* Test by Jim Wilson and Kaveh Ghazi.
@@ -3240,7 +3253,7 @@ main ()
}
EOF
-if { (eval echo configure:3244: \"$ac_link\") 1>&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 0eab855..5dca13e 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 3896328..cbf8259 100644
--- a/libiberty/hashtab.c
+++ b/libiberty/hashtab.c
@@ -45,6 +45,10 @@ Boston, MA 02111-1307, USA. */
#include <string.h>
#endif
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
#include <stdio.h>
#include "libiberty.h"