aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/libffi/testsuite/libffi.special/ffitestcxx.h
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2016-02-24 13:48:45 -0800
committerDan Albert <danalbert@google.com>2016-02-24 13:51:18 -0800
commitb9de1157289455b0ca26daff519d4a0ddcd1fa13 (patch)
tree4c56cc0a34b91f17033a40a455f26652304f7b8d /gcc-4.8.1/libffi/testsuite/libffi.special/ffitestcxx.h
parent098157a754787181cfa10e71325832448ddcea98 (diff)
downloadtoolchain_gcc-b9de1157289455b0ca26daff519d4a0ddcd1fa13.tar.gz
toolchain_gcc-b9de1157289455b0ca26daff519d4a0ddcd1fa13.tar.bz2
toolchain_gcc-b9de1157289455b0ca26daff519d4a0ddcd1fa13.zip
Update 4.8.1 to 4.8.3.
My previous drop was the wrong version. The platform mingw is currently using 4.8.3, not 4.8.1 (not sure how I got that wrong). From ftp://ftp.gnu.org/gnu/gcc/gcc-4.8.3/gcc-4.8.3.tar.bz2. Bug: http://b/26523949 Change-Id: Id85f1bdcbbaf78c7d0b5a69e74c798a08f341c35
Diffstat (limited to 'gcc-4.8.1/libffi/testsuite/libffi.special/ffitestcxx.h')
-rw-r--r--gcc-4.8.1/libffi/testsuite/libffi.special/ffitestcxx.h96
1 files changed, 0 insertions, 96 deletions
diff --git a/gcc-4.8.1/libffi/testsuite/libffi.special/ffitestcxx.h b/gcc-4.8.1/libffi/testsuite/libffi.special/ffitestcxx.h
deleted file mode 100644
index 83f544284..000000000
--- a/gcc-4.8.1/libffi/testsuite/libffi.special/ffitestcxx.h
+++ /dev/null
@@ -1,96 +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
-
-#ifdef USING_MMAP
-static inline void *
-allocate_mmap (size_t size)
-{
- void *page;
-#if defined (HAVE_MMAP_DEV_ZERO)
- static int dev_zero_fd = -1;
-#endif
-
-#ifdef HAVE_MMAP_DEV_ZERO
- if (dev_zero_fd == -1)
- {
- dev_zero_fd = open ("/dev/zero", O_RDONLY);
- if (dev_zero_fd == -1)
- {
- perror ("open /dev/zero: %m");
- exit (1);
- }
- }
-#endif
-
-
-#ifdef HAVE_MMAP_ANON
- page = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
-#endif
-#ifdef HAVE_MMAP_DEV_ZERO
- page = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,
- MAP_PRIVATE, dev_zero_fd, 0);
-#endif
-
- if (page == (char *) MAP_FAILED)
- {
- perror ("virtual memory exhausted");
- exit (1);
- }
-
- return page;
-}
-
-#endif