* strings.c (print_strings): Don't use %L, use %ll in printf

format strings.
This commit is contained in:
Alan Modra
2007-10-24 03:55:46 +00:00
parent 20737c135d
commit 50e3244d18
2 changed files with 11 additions and 12 deletions

View File

@@ -1,3 +1,8 @@
2007-10-24 Alan Modra <amodra@bigpond.net.au>
* strings.c (print_strings): Don't use %L, use %ll in printf
format strings.
2007-10-24 Tristan Gingold <gingold@adacore.com> 2007-10-24 Tristan Gingold <gingold@adacore.com>
Alan Modra <amodra@bigpond.net.au> Alan Modra <amodra@bigpond.net.au>

View File

@@ -593,14 +593,12 @@ print_strings (const char *filename, FILE *stream, file_off address,
case 8: case 8:
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
if (sizeof (start) > sizeof (long)) if (sizeof (start) > sizeof (long))
printf ("%7Lo ", (unsigned long long) start); printf ("%7llo ", (unsigned long long) start);
else else
#else #elif !BFD_HOST_64BIT_LONG
# if !BFD_HOST_64BIT_LONG
if (start != (unsigned long) start) if (start != (unsigned long) start)
printf ("++%7lo ", (unsigned long) start); printf ("++%7lo ", (unsigned long) start);
else else
# endif
#endif #endif
printf ("%7lo ", (unsigned long) start); printf ("%7lo ", (unsigned long) start);
break; break;
@@ -608,14 +606,12 @@ print_strings (const char *filename, FILE *stream, file_off address,
case 10: case 10:
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
if (sizeof (start) > sizeof (long)) if (sizeof (start) > sizeof (long))
printf ("%7Ld ", (unsigned long long) start); printf ("%7lld ", (unsigned long long) start);
else else
#else #elif !BFD_HOST_64BIT_LONG
# if !BFD_HOST_64BIT_LONG
if (start != (unsigned long) start) if (start != (unsigned long) start)
printf ("++%7ld ", (unsigned long) start); printf ("++%7ld ", (unsigned long) start);
else else
# endif
#endif #endif
printf ("%7ld ", (long) start); printf ("%7ld ", (long) start);
break; break;
@@ -623,15 +619,13 @@ print_strings (const char *filename, FILE *stream, file_off address,
case 16: case 16:
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
if (sizeof (start) > sizeof (long)) if (sizeof (start) > sizeof (long))
printf ("%7Lx ", (unsigned long long) start); printf ("%7llx ", (unsigned long long) start);
else else
#else #elif !BFD_HOST_64BIT_LONG
# if !BFD_HOST_64BIT_LONG
if (start != (unsigned long) start) if (start != (unsigned long) start)
printf ("%lx%8.8lx ", (unsigned long) (start >> 32), printf ("%lx%8.8lx ", (unsigned long) (start >> 32),
(unsigned long) (start & 0xffffffff)); (unsigned long) (start & 0xffffffff));
else else
# endif
#endif #endif
printf ("%7lx ", (unsigned long) start); printf ("%7lx ", (unsigned long) start);
break; break;