This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
[committed] Define PRIuPTR on PA HP-UX when necessary
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org, libffi-discuss at sourceware dot org
- Date: Tue, 15 Dec 2009 19:00:46 -0500 (EST)
- Subject: [committed] Define PRIuPTR on PA HP-UX when necessary
As with sparc, old versions of PA HP-UX don't define PRIuPTR (11.11 and
earlier). This change fixes a libffi testsuite compilation error. The
change is not needed on ia64.
Tested on hppa2.0w-hp-hpux11.11. Committed to trunk.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2009-12-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* testsuite/libffi.call/ffitest.h: Define PRIuPTR on PA HP-UX.
Index: testsuite/libffi.call/ffitest.h
===================================================================
--- testsuite/libffi.call/ffitest.h (revision 155189)
+++ testsuite/libffi.call/ffitest.h (working copy)
@@ -54,6 +54,11 @@
#define PRIuLL "llu"
#endif
+/* PA HP-UX kludge. */
+#if defined(__hppa__) && defined(__hpux__) && !defined(PRIuPTR)
+#define PRIuPTR "lu"
+#endif
+
/* Solaris < 10 kludge. */
#if defined(__sun__) && defined(__svr4__) && !defined(PRIuPTR)
#if defined(__arch64__) || defined (__x86_64__)