This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][GOLD] Use PRIx64 to fix compile on 64-bit.


Hi,

This fixed bug 10949.

- Lei

http://sourceware.org/bugzilla/show_bug.cgi?id=10949
--- binutils-2.20/gold/output.cc.orig	2009-11-17 17:40:49.000000000 -0800
+++ binutils-2.20/gold/output.cc	2009-11-17 18:27:21.000000000 -0800
@@ -22,6 +22,10 @@
 
 #include "gold.h"
 
+#if !defined(__STDC_FORMAT_MACROS)
+#define __STDC_FORMAT_MACROS
+#endif
+
 #include <cstdlib>
 #include <cstring>
 #include <cerrno>
@@ -29,6 +33,7 @@
 #include <unistd.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
+#include <inttypes.h>
 #include <algorithm>
 #include "libiberty.h"
 
@@ -3505,11 +3510,11 @@
 		  Output_section* os = (*p)->output_section();
 		  if (os == NULL)
 		    gold_error(_("dot moves backward in linker script "
-				 "from 0x%llx to 0x%llx"),
+				 "from 0x%"PRIx64" to 0x%"PRIx64),
 			       addr + (off - startoff), (*p)->address());
 		  else
 		    gold_error(_("address of section '%s' moves backward "
-				 "from 0x%llx to 0x%llx"),
+				 "from 0x%"PRIx64" to 0x%"PRIx64),
 			       os->name(), addr + (off - startoff),
 			       (*p)->address());
 		}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]