From b9c2301a739f3834f456902d283f4d11920c14f7 Mon Sep 17 00:00:00 2001 From: hjl Date: Thu, 3 Sep 2009 16:46:54 +0000 Subject: [PATCH] 2009-09-03 Ozkan Sezer PR target/39065 * configure.ac: Also check for intptr_t. * config.h.in: Regenerated. * configure: Regenerated. * hashtab.c (hash_pointer): Cast the pointer argument to intptr_t instead of of long. --- libiberty/ChangeLog | 17 +++++++++++++++++ libiberty/config.in | 3 +++ libiberty/configure | 11 +++++++++++ libiberty/configure.ac | 1 + libiberty/hashtab.c | 2 +- 5 files changed, 33 insertions(+), 1 deletion(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 8698a2d3ac..17fb033c6f 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,20 @@ +2009-09-03 Ozkan Sezer + + PR target/39065 + * configure.ac: Also check for intptr_t. + * config.h.in: Regenerated. + * configure: Regenerated. + * hashtab.c (hash_pointer): Cast the pointer argument to intptr_t + instead of of long. + +2009-09-02 Tristan Gingold + + * vmsbuild.com: Removed as unused and superceeded by makefile.vms. + * makefile.vms: Ported to Itanium VMS. Remove useless targets and + dependencies. Remove unused FORMAT variable. + * configure.com: New file to create build.com DCL script for + Itanium VMS or Alpha VMS. + 2009-08-24 Ralf Wildenhues * configure.ac (AC_PREREQ): Bump to 2.64. diff --git a/libiberty/config.in b/libiberty/config.in index 514e73c273..e962769e6a 100644 --- a/libiberty/config.in +++ b/libiberty/config.in @@ -457,6 +457,9 @@ #undef inline #endif +/* Define to `long' if does not define. */ +#undef intptr_t + /* Define to `int' if does not define. */ #undef pid_t diff --git a/libiberty/configure b/libiberty/configure index 4a04e1f079..9463f8f506 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -5046,6 +5046,17 @@ _ACEOF +ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" +if test "x$ac_cv_type_intptr_t" = x""yes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define intptr_t long +_ACEOF + +fi + ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" if test "x$ac_cv_type_uintptr_t" = x""yes; then : diff --git a/libiberty/configure.ac b/libiberty/configure.ac index f01d518e5e..c34fc10b81 100644 --- a/libiberty/configure.ac +++ b/libiberty/configure.ac @@ -254,6 +254,7 @@ libiberty_AC_DECLARE_ERRNO # Determine the size of an int for struct fibnode. AC_CHECK_SIZEOF([int]) +AC_CHECK_TYPE(intptr_t, long) AC_CHECK_TYPE(uintptr_t, unsigned long) # Look for a 64-bit type. diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c index 3e649215f4..8c8bd3110a 100644 --- a/libiberty/hashtab.c +++ b/libiberty/hashtab.c @@ -196,7 +196,7 @@ higher_prime_index (unsigned long n) static hashval_t hash_pointer (const PTR p) { - return (hashval_t) ((long)p >> 3); + return (hashval_t) ((intptr_t)p >> 3); } /* Returns non-zero if P1 and P2 are equal. */ -- 2.11.0