aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h
index 9252098..fe8cae1 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -517,6 +517,17 @@ extern void abort ();
# define mkdir(a,b) mkdir(a)
#endif
+/* Provide a way to print an address via printf. */
+#ifndef HOST_PTR_PRINTF
+# ifdef HAVE_PRINTF_PTR
+# define HOST_PTR_PRINTF "%p"
+# else
+# define HOST_PTR_PRINTF \
+ (sizeof (int) == sizeof (char *) ? "%x" \
+ : sizeof (long) == sizeof (char *) ? "%lx" : "%llx")
+# endif
+#endif /* ! HOST_PTR_PRINTF */
+
/* Get libiberty declarations. */
#include "libiberty.h"