]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: ffitest.h [__sgi] (PRId64, PRIu64): Define.
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Fri, 17 Dec 2010 14:41:08 +0000 (14:41 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Fri, 17 Dec 2010 14:41:08 +0000 (14:41 +0000)
Backport from mainline:
2010-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

* testsuite/libffi.call/ffitest.h [__sgi] (PRId64, PRIu64): Define.
(PRIuPTR): Define.

From-SVN: r167987

libffi/ChangeLog
libffi/testsuite/libffi.call/ffitest.h

index 87d8ef5c70720579ded5f2609a4145beac58d190..76d2c4aaa0279110e9db989979ebebfbcb5d2eda 100644 (file)
@@ -1,3 +1,11 @@
+2010-12-17  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       Backport from mainline:
+       2010-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * testsuite/libffi.call/ffitest.h [__sgi] (PRId64, PRIu64): Define.
+       (PRIuPTR): Define.
+
 2010-12-16  Release Manager
 
        * GCC 4.5.2 released.
index 2cb9849718f2b50d34803f1713bb97de5d1b9d27..59ef032ea51a3cacd9eec0a5987286ebfcd49d7b 100644 (file)
 #define PRIuPTR "lu"
 #endif
 
+/* IRIX kludge.  */
+#if defined(__sgi)
+/* IRIX 6.5 <inttypes.h> provides all definitions, but only for C99
+   compilations.  */
+#if (_MIPS_SZLONG == 32)
+#define PRId64 "lld"
+#define PRIu64 "llu"
+#endif
+/* This doesn't match <inttypes.h>, which always has "lld" here, but the
+   arguments are uint64_t, int64_t, which are unsigned long, long for
+   64-bit in <sgidefs.h>.  */
+#if (_MIPS_SZLONG == 64)
+#define PRId64 "ld"
+#define PRIu64 "lu"
+#endif
+/* This doesn't match <inttypes.h>, which has "u" here, but the arguments
+   are uintptr_t, which is always unsigned long.  */
+#define PRIuPTR "lu"
+#endif
+
 /* Solaris < 10 kludge.  */
 #if defined(__sun__) && defined(__svr4__) && !defined(PRIuPTR)
 #if defined(__arch64__) || defined (__x86_64__)