diff options
author | Ozkan Sezer <sezeroz@gmail.com> | 2009-09-04 14:33:16 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2009-09-04 07:33:16 -0700 |
commit | 0e497905ceeb7bdb724aee3027e09ba32ec80e25 (patch) | |
tree | 2c388d6661dfc9985b529fd452d81632a23bad4e /libiberty/configure | |
parent | 22fc64b4d9a300216a82f2160ffbac6fec872f16 (diff) | |
download | gcc-0e497905ceeb7bdb724aee3027e09ba32ec80e25.zip gcc-0e497905ceeb7bdb724aee3027e09ba32ec80e25.tar.gz gcc-0e497905ceeb7bdb724aee3027e09ba32ec80e25.tar.bz2 |
re PR target/39065 (libiberty hashtab.c:hash_pointer() needs intptr_t)
2009-09-04 Ozkan Sezer <sezeroz@gmail.com>
PR target/39065
* configure.ac: Replace AC_CHECK_TYPE() for intptr_t and uintptr_t
with AC_TYPE_INTPTR_T and AC_TYPE_UINTPTR_T.
* config.in: Regenerated.
* configure: Regenerated.
From-SVN: r151423
Diffstat (limited to 'libiberty/configure')
-rwxr-xr-x | libiberty/configure | 95 |
1 files changed, 72 insertions, 23 deletions
diff --git a/libiberty/configure b/libiberty/configure index 9463f8f..423e59b 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -5046,29 +5046,6 @@ _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 : - -else - -cat >>confdefs.h <<_ACEOF -#define uintptr_t unsigned long -_ACEOF - -fi - - # Look for a 64-bit type. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a 64-bit type" >&5 $as_echo_n "checking for a 64-bit type... " >&6; } @@ -5148,6 +5125,78 @@ _ACEOF fi + + 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 : + +$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h + +else + for ac_type in 'int' 'long int' 'long long int'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +cat >>confdefs.h <<_ACEOF +#define intptr_t $ac_type +_ACEOF + + ac_type= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -z "$ac_type" && break + done +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 : + +$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h + +else + for ac_type in 'unsigned int' 'unsigned long int' \ + 'unsigned long long int'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +cat >>confdefs.h <<_ACEOF +#define uintptr_t $ac_type +_ACEOF + + ac_type= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -z "$ac_type" && break + done +fi + + + # Given the above check, we always have uintptr_t or a fallback # definition. So define HAVE_UINTPTR_T in case any imported code # relies on it. |