aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd-in.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/bfd-in.h')
-rw-r--r--bfd/bfd-in.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 2195ce3..a06cd74 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -91,6 +91,24 @@ typedef BFD_HOST_64_BIT bfd_int64_t;
typedef BFD_HOST_U_64_BIT bfd_uint64_t;
#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if BFD_HOST_64BIT_LONG
+# define BFD_PRI64 "l"
+# elif defined (__MSVCRT__)
+# define BFD_PRI64 "I64"
+# else
+# define BFD_PRI64 "ll"
+# endif
+# undef PRId64
+# define PRId64 BFD_PRI64 "d"
+# undef PRIu64
+# define PRIu64 BFD_PRI64 "u"
+# undef PRIx64
+# define PRIx64 BFD_PRI64 "x"
+#endif
+
#if BFD_ARCH_SIZE >= 64
#define BFD64
#endif