testsuite: Replace ffitestcxx.h with ffitest.h
ffitest.h contains a superset of the functionality of ffitestcxx.h; make the C++ tests include ffitest.h instead, and remove ffitestcxx.h.
This commit is contained in:
@@ -84,7 +84,7 @@ libffi.call/cls_align_uint64.c libffi.call/cls_4byte.c \
|
|||||||
libffi.call/strlen_win32.c libffi.call/cls_6_1_byte.c \
|
libffi.call/strlen_win32.c libffi.call/cls_6_1_byte.c \
|
||||||
libffi.call/cls_7_1_byte.c libffi.call/unwindtest.cc \
|
libffi.call/cls_7_1_byte.c libffi.call/unwindtest.cc \
|
||||||
libffi.call/unwindtest_ffi_call.cc \
|
libffi.call/unwindtest_ffi_call.cc \
|
||||||
libffi.call/ffitestcxx.h lib/wrapper.exp lib/target-libpath.exp \
|
lib/wrapper.exp lib/target-libpath.exp \
|
||||||
lib/libffi.exp libffi.call/cls_struct_va1.c \
|
lib/libffi.exp libffi.call/cls_struct_va1.c \
|
||||||
libffi.call/cls_uchar_va.c libffi.call/cls_uint_va.c \
|
libffi.call/cls_uchar_va.c libffi.call/cls_uint_va.c \
|
||||||
libffi.call/cls_ulong_va.c libffi.call/cls_ushort_va.c \
|
libffi.call/cls_ulong_va.c libffi.call/cls_ushort_va.c \
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <ffi.h>
|
|
||||||
#include "fficonfig.h"
|
|
||||||
|
|
||||||
#define MAX_ARGS 256
|
|
||||||
|
|
||||||
|
|
||||||
/* Define __UNUSED__ that also other compilers than gcc can run the tests. */
|
|
||||||
#undef __UNUSED__
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
#define __UNUSED__ __attribute__((__unused__))
|
|
||||||
#else
|
|
||||||
#define __UNUSED__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define CHECK(x) (!(x) ? abort() : (void)0)
|
|
||||||
|
|
||||||
/* Prefer MAP_ANON(YMOUS) to /dev/zero, since we don't need to keep a
|
|
||||||
file open. */
|
|
||||||
#ifdef HAVE_MMAP_ANON
|
|
||||||
# undef HAVE_MMAP_DEV_ZERO
|
|
||||||
|
|
||||||
# include <sys/mman.h>
|
|
||||||
# ifndef MAP_FAILED
|
|
||||||
# define MAP_FAILED -1
|
|
||||||
# endif
|
|
||||||
# if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
|
|
||||||
# define MAP_ANONYMOUS MAP_ANON
|
|
||||||
# endif
|
|
||||||
# define USING_MMAP
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_MMAP_DEV_ZERO
|
|
||||||
|
|
||||||
# include <sys/mman.h>
|
|
||||||
# ifndef MAP_FAILED
|
|
||||||
# define MAP_FAILED -1
|
|
||||||
# endif
|
|
||||||
# define USING_MMAP
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* MinGW kludge. */
|
|
||||||
#ifdef _WIN64
|
|
||||||
#define PRIdLL "I64d"
|
|
||||||
#define PRIuLL "I64u"
|
|
||||||
#else
|
|
||||||
#define PRIdLL "lld"
|
|
||||||
#define PRIuLL "llu"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -6,15 +6,7 @@
|
|||||||
|
|
||||||
/* { dg-do run } */
|
/* { dg-do run } */
|
||||||
|
|
||||||
#include "ffitestcxx.h"
|
#include "ffitest.h"
|
||||||
|
|
||||||
#if defined HAVE_STDINT_H
|
|
||||||
#include <stdint.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined HAVE_INTTYPES_H
|
|
||||||
#include <inttypes.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
void
|
||||||
closure_test_fn(ffi_cif* cif __UNUSED__, void* resp __UNUSED__,
|
closure_test_fn(ffi_cif* cif __UNUSED__, void* resp __UNUSED__,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
/* { dg-do run } */
|
/* { dg-do run } */
|
||||||
|
|
||||||
#include "ffitestcxx.h"
|
#include "ffitest.h"
|
||||||
|
|
||||||
static int checking(int a __UNUSED__, short b __UNUSED__,
|
static int checking(int a __UNUSED__, short b __UNUSED__,
|
||||||
signed char c __UNUSED__)
|
signed char c __UNUSED__)
|
||||||
|
|||||||
Reference in New Issue
Block a user