aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-09-21 22:31:29 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-09-21 22:31:29 +0000
commit1eb14644246b11955d31f602ffd4551cfd9af2dd (patch)
treee96a43060e00e41ba881f4ab0fb88b8029be87bf /gcc/system.h
parentf5db61ef0b054bbdb86d1d0feceb066821288f19 (diff)
downloadgcc-1eb14644246b11955d31f602ffd4551cfd9af2dd.zip
gcc-1eb14644246b11955d31f602ffd4551cfd9af2dd.tar.gz
gcc-1eb14644246b11955d31f602ffd4551cfd9af2dd.tar.bz2
machmode.h (HOST_PTR_PRINTF): Move from here ...
* machmode.h (HOST_PTR_PRINTF): Move from here ... * system.h (HOST_PTR_PRINTF): ... to here. * mips-tfile.c: Don't include machmode.h. * Makefile.in (MACHMODE_H): New variable. Update to use it. (mips-tfile.o): Don't depend on machmode.h. From-SVN: r29568
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"