diff options
author | Alan Modra <amodra@gmail.com> | 2014-12-11 16:02:35 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-12-11 17:07:46 +1030 |
commit | 4c219c2e69bb66a5535645e2c83fafda1362acea (patch) | |
tree | 10dd7e49bfa50e1c721ee6b938330e0c9884960e /binutils/strings.c | |
parent | 1b43a4392f2c979e77a9fef16877ec99b9cf26a3 (diff) | |
download | gdb-4c219c2e69bb66a5535645e2c83fafda1362acea.zip gdb-4c219c2e69bb66a5535645e2c83fafda1362acea.tar.gz gdb-4c219c2e69bb66a5535645e2c83fafda1362acea.tar.bz2 |
Use autoconf check for long long in binutils
Also fix a place where %lld was wrongly used to print a dwarf_vma.
* configure.ac: Check for long long and sizes of long long and long.
* elfcomm.h (HOST_WIDEST_INT): Test HAVE_LONG_LONG in place of
__STDC_VERSION__ and __GNUC__.
* strings.c (print_strings): Likewise.
* dwarf.c (DWARF_VMA_FMT, DWARF_VMA_FMT_LONG): Likewise.
(read_debug_line_header): Use dwarf_vmatoa to print warning.
* configure: Regenerate.
* config.in: Regenerate.
Diffstat (limited to 'binutils/strings.c')
-rw-r--r-- | binutils/strings.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/binutils/strings.c b/binutils/strings.c index 2cf046f..7346f55 100644 --- a/binutils/strings.c +++ b/binutils/strings.c @@ -578,14 +578,14 @@ print_strings (const char *filename, FILE *stream, file_ptr address, switch (address_radix) { case 8: -#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) +#ifdef HAVE_LONG_LONG if (sizeof (start) > sizeof (long)) { -#ifndef __MSVCRT__ +# ifndef __MSVCRT__ printf ("%7llo ", (unsigned long long) start); -#else +# else printf ("%7I64o ", (unsigned long long) start); -#endif +# endif } else #elif !BFD_HOST_64BIT_LONG @@ -597,14 +597,14 @@ print_strings (const char *filename, FILE *stream, file_ptr address, break; case 10: -#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) +#ifdef HAVE_LONG_LONG if (sizeof (start) > sizeof (long)) { -#ifndef __MSVCRT__ +# ifndef __MSVCRT__ printf ("%7lld ", (unsigned long long) start); -#else +# else printf ("%7I64d ", (unsigned long long) start); -#endif +# endif } else #elif !BFD_HOST_64BIT_LONG @@ -616,14 +616,14 @@ print_strings (const char *filename, FILE *stream, file_ptr address, break; case 16: -#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) +#ifdef HAVE_LONG_LONG if (sizeof (start) > sizeof (long)) { -#ifndef __MSVCRT__ +# ifndef __MSVCRT__ printf ("%7llx ", (unsigned long long) start); -#else +# else printf ("%7I64x ", (unsigned long long) start); -#endif +# endif } else #elif !BFD_HOST_64BIT_LONG |