summaryrefslogtreecommitdiff
path: root/binutils/strings.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2007-10-24 03:55:46 +0000
committerAlan Modra <amodra@bigpond.net.au>2007-10-24 03:55:46 +0000
commita4dcfdf4670d0612f3b224b45c58d6212a31286f (patch)
tree9a816771f2d4061a9b79329f3af8d2717e866b25 /binutils/strings.c
parent8c2b8214715131ff5f25cf37618e135f66b83c3b (diff)
downloadbinutils-redhat-a4dcfdf4670d0612f3b224b45c58d6212a31286f.tar.gz
* strings.c (print_strings): Don't use %L, use %ll in printf
format strings.
Diffstat (limited to 'binutils/strings.c')
-rw-r--r--binutils/strings.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/binutils/strings.c b/binutils/strings.c
index 11e7608942..c1e20770d1 100644
--- a/binutils/strings.c
+++ b/binutils/strings.c
@@ -593,14 +593,12 @@ print_strings (const char *filename, FILE *stream, file_off address,
case 8:
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
if (sizeof (start) > sizeof (long))
- printf ("%7Lo ", (unsigned long long) start);
+ printf ("%7llo ", (unsigned long long) start);
else
-#else
-# if !BFD_HOST_64BIT_LONG
+#elif !BFD_HOST_64BIT_LONG
if (start != (unsigned long) start)
printf ("++%7lo ", (unsigned long) start);
else
-# endif
#endif
printf ("%7lo ", (unsigned long) start);
break;
@@ -608,14 +606,12 @@ print_strings (const char *filename, FILE *stream, file_off address,
case 10:
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
if (sizeof (start) > sizeof (long))
- printf ("%7Ld ", (unsigned long long) start);
+ printf ("%7lld ", (unsigned long long) start);
else
-#else
-# if !BFD_HOST_64BIT_LONG
+#elif !BFD_HOST_64BIT_LONG
if (start != (unsigned long) start)
printf ("++%7ld ", (unsigned long) start);
else
-# endif
#endif
printf ("%7ld ", (long) start);
break;
@@ -623,15 +619,13 @@ print_strings (const char *filename, FILE *stream, file_off address,
case 16:
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
if (sizeof (start) > sizeof (long))
- printf ("%7Lx ", (unsigned long long) start);
+ printf ("%7llx ", (unsigned long long) start);
else
-#else
-# if !BFD_HOST_64BIT_LONG
+#elif !BFD_HOST_64BIT_LONG
if (start != (unsigned long) start)
printf ("%lx%8.8lx ", (unsigned long) (start >> 32),
(unsigned long) (start & 0xffffffff));
else
-# endif
#endif
printf ("%7lx ", (unsigned long) start);
break;