OSDN Git Service

PR libffi/40701
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Jan 2010 20:35:33 +0000 (20:35 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Jan 2010 20:35:33 +0000 (20:35 +0000)
* testsuite/libffi.call/ffitest.h [__alpha__ && __osf__] (PRIdLL,
PRIuLL, PRId64, PRIu64, PRIuPTR): Define.
* testsuite/libffi.call/cls_align_sint64.c: Add -Wno-format on
alpha*-dec-osf*.
* testsuite/libffi.call/cls_align_uint64.c: Likewise.
* testsuite/libffi.call/cls_ulonglong.c: Likewise.
* testsuite/libffi.call/return_ll1.c: Likewise.
* testsuite/libffi.call/stret_medium2.c: Likewise.
* testsuite/libffi.special/ffitestcxx.h (allocate_mmap): Cast
MAP_FAILED to char *.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155710 138bc75d-0d04-0410-961f-82ee72b054a4

libffi/ChangeLog
libffi/testsuite/libffi.call/cls_align_sint64.c
libffi/testsuite/libffi.call/cls_align_uint64.c
libffi/testsuite/libffi.call/cls_ulonglong.c
libffi/testsuite/libffi.call/ffitest.h
libffi/testsuite/libffi.call/return_ll1.c
libffi/testsuite/libffi.call/stret_medium2.c
libffi/testsuite/libffi.special/ffitestcxx.h

index f9f55c9..57e72b8 100644 (file)
@@ -1,3 +1,17 @@
+2010-01-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR libffi/40701
+       * testsuite/libffi.call/ffitest.h [__alpha__ && __osf__] (PRIdLL,
+       PRIuLL, PRId64, PRIu64, PRIuPTR): Define.
+       * testsuite/libffi.call/cls_align_sint64.c: Add -Wno-format on
+       alpha*-dec-osf*.
+       * testsuite/libffi.call/cls_align_uint64.c: Likewise.
+       * testsuite/libffi.call/cls_ulonglong.c: Likewise.
+       * testsuite/libffi.call/return_ll1.c: Likewise.
+       * testsuite/libffi.call/stret_medium2.c: Likewise.
+       * testsuite/libffi.special/ffitestcxx.h (allocate_mmap): Cast
+       MAP_FAILED to char *.
+
 2010-01-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * src/mips/n32.S: Use .abicalls and .eh_frame with __GNUC__.
 2010-01-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * src/mips/n32.S: Use .abicalls and .eh_frame with __GNUC__.
index 2b15c98..31d53af 100644 (file)
@@ -5,6 +5,7 @@
    Originator: <hos@tamanegi.org> 20031203      */
 
 /* { dg-do run } */
    Originator: <hos@tamanegi.org> 20031203      */
 
 /* { dg-do run } */
+/* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */
 #include "ffitest.h"
 
 typedef struct cls_struct_align {
 #include "ffitest.h"
 
 typedef struct cls_struct_align {
index 215584f..495c79f 100644 (file)
@@ -6,6 +6,7 @@
 
 
 /* { dg-do run } */
 
 
 /* { dg-do run } */
+/* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */
 #include "ffitest.h"
 
 typedef struct cls_struct_align {
 #include "ffitest.h"
 
 typedef struct cls_struct_align {
index c3cf0d6..235ab44 100644 (file)
@@ -5,6 +5,7 @@
    Originator: <andreast@gcc.gnu.org> 20030828  */
 
 /* { dg-do run } */
    Originator: <andreast@gcc.gnu.org> 20030828  */
 
 /* { dg-do run } */
+/* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */
 #include "ffitest.h"
 
 static void cls_ret_ulonglong_fn(ffi_cif* cif __UNUSED__, void* resp,
 #include "ffitest.h"
 
 static void cls_ret_ulonglong_fn(ffi_cif* cif __UNUSED__, void* resp,
index 7b1c5ef..2cb9849 100644 (file)
 #define PRIuLL "llu"
 #endif
 
 #define PRIuLL "llu"
 #endif
 
+/* Tru64 UNIX kludge.  */
+#if defined(__alpha__) && defined(__osf__)
+/* Tru64 UNIX V4.0 doesn't support %lld/%lld, but long is 64-bit.  */
+#undef PRIdLL
+#define PRIdLL "ld"
+#undef PRIuLL
+#define PRIuLL "lu"
+#define PRId64 "ld"
+#define PRIu64 "lu"
+#define PRIuPTR "lu"
+#endif
+
 /* PA HP-UX kludge.  */
 #if defined(__hppa__) && defined(__hpux__) && !defined(PRIuPTR)
 #define PRIuPTR "lu"
 /* PA HP-UX kludge.  */
 #if defined(__hppa__) && defined(__hpux__) && !defined(PRIuPTR)
 #define PRIuPTR "lu"
index dad90c1..593e8a3 100644 (file)
@@ -5,6 +5,7 @@
    Originator: <andreast@gcc.gnu.org> 20050222  */
 
 /* { dg-do run } */
    Originator: <andreast@gcc.gnu.org> 20050222  */
 
 /* { dg-do run } */
+/* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */
 #include "ffitest.h"
 static long long return_ll(int ll0, long long ll1, int ll2)
 {
 #include "ffitest.h"
 static long long return_ll(int ll0, long long ll1, int ll2)
 {
index 1692c2d..cb2f2fb 100644 (file)
@@ -7,6 +7,7 @@
    Originator: Blake Chaffin   6/21/2007       */
 
 /* { dg-do run { xfail strongarm*-*-* xscale*-*-*  } } */
    Originator: Blake Chaffin   6/21/2007       */
 
 /* { dg-do run { xfail strongarm*-*-* xscale*-*-*  } } */
+/* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */
 #include "ffitest.h"
 
 typedef struct struct_72byte {
 #include "ffitest.h"
 
 typedef struct struct_72byte {
index e300cce..83f5442 100644 (file)
@@ -84,7 +84,7 @@ allocate_mmap (size_t size)
               MAP_PRIVATE, dev_zero_fd, 0);
 #endif
 
               MAP_PRIVATE, dev_zero_fd, 0);
 #endif
 
-  if (page == MAP_FAILED)
+  if (page == (char *) MAP_FAILED)
     {
       perror ("virtual memory exhausted");
       exit (1);
     {
       perror ("virtual memory exhausted");
       exit (1);