Index: configure.in =================================================================== RCS file: /cvs/src/src/bfd/configure.in,v retrieving revision 1.226 diff -b -u -r1.226 configure.in --- configure.in 23 Mar 2007 02:51:30 -0000 1.226 +++ configure.in 11 Apr 2007 15:15:56 -0000 @@ -99,6 +99,7 @@ AC_PROG_INSTALL BFD_HOST_64BIT_LONG=0 +BFD_HOST_64BIT_LONG_LONG=0 BFD_HOST_LONG_LONG=0 BFD_HOST_64_BIT_DEFINED=0 BFD_HOST_64_BIT= @@ -114,11 +115,20 @@ fi AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(void *) if test "x${ac_cv_sizeof_long}" = "x8"; then host64=true BFD_HOST_64BIT_LONG=1 + if test "x${ac_cv_sizeof_void_p}" = "x${ac_cv_sizeof_long_long}"; then + BFD_HOST_64BIT_LONG_LONG=1 + fi test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" +elif test "x${ac_cv_sizeof_void_p}" = "x${ac_cv_sizeof_long_long}"; then + host64=true + BFD_HOST_64BIT_LONG_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" elif test "x${ac_cv_sizeof_long_long}" = "x8"; then test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" @@ -131,6 +141,7 @@ fi AC_SUBST(BFD_HOST_64BIT_LONG) +AC_SUBST(BFD_HOST_64BIT_LONG_LONG) AC_SUBST(BFD_HOST_LONG_LONG) AC_SUBST(BFD_HOST_64_BIT_DEFINED) AC_SUBST(BFD_HOST_64_BIT) Index: bfd-in.h =================================================================== RCS file: /cvs/src/src/bfd/bfd-in.h,v retrieving revision 1.126 diff -b -u -r1.126 bfd-in.h --- bfd-in.h 20 Mar 2007 20:19:07 -0000 1.126 +++ bfd-in.h 11 Apr 2007 15:16:10 -0000 @@ -76,6 +76,7 @@ #define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@ #define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@ +#define BFD_HOST_64BIT_LONG_LONG @BFD_HOST_64BIT_LONG_LONG@ #define BFD_HOST_LONG_LONG @BFD_HOST_LONG_LONG@ #if @BFD_HOST_64_BIT_DEFINED@ #define BFD_HOST_64_BIT @BFD_HOST_64_BIT@ @@ -96,6 +97,16 @@ #endif #endif +/* Declaring a type wide enough to hold a host long and a host pointer. */ +#if BFD_HOST_64BIT_LONG_LONG == 1 && BFD_HOST_64BIT_LONG == 0 +#undef BFD_HOSTPTR_T_PRINT +typedef unsigned long long bfd_hostptr_t; +#define BFD_HOSTPTR_T_PRT_X "%llx" +#else +typedef unsigned long bfd_hostptr_t; +#define BFD_HOSTPTR_T_PRT_X "%lx" +#endif + /* Forward declaration. */ typedef struct bfd bfd; @@ -129,6 +140,9 @@ #if BFD_HOST_64BIT_LONG #define sprintf_vma(s,x) sprintf (s, "%016lx", x) #define fprintf_vma(f,x) fprintf (f, "%016lx", x) +#elif BFD_HOST_64BIT_LONG_LONG +#define sprintf_vma(s,x) sprintf (s, "%016llx", x) +#define fprintf_vma(f,x) fprintf (f, "%016llx", x) #else #define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff))) #define _bfd_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff)) =