summaryrefslogtreecommitdiff
path: root/gcc/machmode.h
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1998-07-06 18:17:41 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1998-07-06 18:17:41 +0000
commit1d9adefebc498d0a969e8aafc98fca0dd4918637 (patch)
tree231b03d6dc23f93e9b0d4854a0cb6f83ed72b158 /gcc/machmode.h
parentec6be638ef1ea4a7a282203ba5d399d9fd7190f0 (diff)
downloadgcc-1d9adefebc498d0a969e8aafc98fca0dd4918637.tar.gz
Redesign GCC_FUNC_PRINTF_PTR so that it doesn't define HOST_PTR_PRINTF
directly. Instead, autoconf will only determine whether "%p" works and its up to machmode.h to base its definition of HOST_PTR_PRINTF on that. This ensures that machmode.h is always included to get the definition of HOST_PTR_PRINTF for lossy hosts or cross compiles where "%p" is not found. * aclocal.m4 (GCC_FUNC_PRINTF_PTR): Don't define HOST_PTR_PRINTF. Instead, define a new macro HAVE_PRINTF_PTR which only signifies whether we have the %p format specifier or not. * acconfig.h: Delete stub for HOST_PTR_PRINTF, add HAVE_PRINTF_PTR. * machmode.h (HOST_PTR_PRINTF): When determining the definition, check HAVE_PRINTF_PTR to see whether "%p" is okay. * mips-tfile.c: Include machmode.h to get HOST_PTR_PRINTF. * Makefile.in (mips-tfile.o): Depend on machmode.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20953 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/machmode.h')
-rw-r--r--gcc/machmode.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/machmode.h b/gcc/machmode.h
index 451f4d1304c..5f8459df5e1 100644
--- a/gcc/machmode.h
+++ b/gcc/machmode.h
@@ -53,10 +53,14 @@ Boston, MA 02111-1307, USA. */
/* Provide a default way to print an address in hex via printf. */
#ifndef HOST_PTR_PRINTF
-#define HOST_PTR_PRINTF \
- (sizeof (int) == sizeof (char *) ? "%x" \
- : sizeof (long) == sizeof (char *) ? "%lx" : "%llx")
-#endif
+# 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 */
/* Provide defaults for the way to print a HOST_WIDE_INT
in various manners. */