+2012-02-22 Kai Tietz <ktietz@redhat.com>
+
+ PR lto/50616
+ * lto-plugin.c (PRI_LL): New macro.
+ (dump_symtab): Use PRI_LL instead of ll in print.
+ (process_symtab): Use PRI_LL instead of ll in scan.
+
2011-12-20 Andreas Schwab <schwab@linux-m68k.org>
* configure: Regenerate.
#include "simple-object.h"
#include "plugin-api.h"
+/* We need to use I64 instead of ll width-specifier on native Windows.
+ The reason for this is that older MS-runtimes don't support the ll. */
+#ifdef __MINGW32__
+#define PRI_LL "I64"
+#else
+#define PRI_LL "ll"
+#endif
+
/* Handle opening elf files on hosts, such as Windows, that may use
text file handling that will break binary access. */
#ifndef O_BINARY
assert (resolution != LDPR_UNKNOWN);
- fprintf (f, "%u %llx %s %s\n",
+ fprintf (f, "%u %" PRI_LL "x %s %s\n",
(unsigned int) slot, symtab->aux[j].id,
lto_resolution_str[resolution],
symtab->syms[j].name);
s = strrchr (name, '.');
if (s)
- sscanf (s, ".%llx", &obj->out->id);
+ sscanf (s, ".%" PRI_LL "x", &obj->out->id);
secdata = xmalloc (length);
offset += obj->file->offset;
if (offset != lseek (obj->file->fd, offset, SEEK_SET)