diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-03 16:46:00 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-03 16:46:00 +0000 |
commit | 60b8aedaf675746fa97711694ff868889b1acf7e (patch) | |
tree | 4f84a6682bd1aaed5aa99472dceeb58546c9315f /libiberty | |
parent | 8c3c665582f99fd2a54866b54f219dc1df572cad (diff) | |
download | gcc-60b8aedaf675746fa97711694ff868889b1acf7e.tar.gz |
2009-09-03 Ozkan Sezer <sezeroz@gmail.com>
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151386 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 9 | ||||
-rw-r--r-- | libiberty/config.in | 3 | ||||
-rwxr-xr-x | libiberty/configure | 11 | ||||
-rw-r--r-- | libiberty/configure.ac | 1 | ||||
-rw-r--r-- | libiberty/hashtab.c | 2 |
5 files changed, 25 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index be981b8389a..17fb033c6f9 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,12 @@ +2009-09-03 Ozkan Sezer <sezeroz@gmail.com> + + 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 <gingold@adacore.com> * vmsbuild.com: Removed as unused and superceeded by makefile.vms. diff --git a/libiberty/config.in b/libiberty/config.in index 514e73c2732..e962769e6a9 100644 --- a/libiberty/config.in +++ b/libiberty/config.in @@ -457,6 +457,9 @@ #undef inline #endif +/* Define to `long' if <sys/types.h> does not define. */ +#undef intptr_t + /* Define to `int' if <sys/types.h> does not define. */ #undef pid_t diff --git a/libiberty/configure b/libiberty/configure index 4a04e1f0794..9463f8f506f 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 f01d518e5e4..c34fc10b81b 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 3e649215f42..8c8bd3110ad 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. */ |