diff options
author | Anthony Green <green@moxielogic.com> | 2013-01-11 17:14:11 -0500 |
---|---|---|
committer | Anthony Green <green@moxielogic.com> | 2013-01-11 17:14:11 -0500 |
commit | f03eab08248f122ce3b623a18df9e19fae1b6e98 (patch) | |
tree | d806c493425c75d067bb825d2e53903bea48dda5 /testsuite/libffi.call/ffitest.h | |
parent | 05fbe1faedc7b2580d5f14010d00e9e3cee73951 (diff) | |
download | libffi-f03eab08248f122ce3b623a18df9e19fae1b6e98.tar.gz |
Remove obsolete inline test functions
Diffstat (limited to 'testsuite/libffi.call/ffitest.h')
-rw-r--r-- | testsuite/libffi.call/ffitest.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/testsuite/libffi.call/ffitest.h b/testsuite/libffi.call/ffitest.h index 5564b6d..830fcc7 100644 --- a/testsuite/libffi.call/ffitest.h +++ b/testsuite/libffi.call/ffitest.h @@ -127,44 +127,3 @@ #define PRId64 "I64d" #endif -#ifdef USING_MMAP -static 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 == (void *) MAP_FAILED) - { - perror ("virtual memory exhausted"); - exit (1); - } - - return page; -} - -#endif |