OSDN Git Service

2003-11-21 Andreas Jaeger <aj@suse.de>
[pf3gnuchains/gcc-fork.git] / libffi / testsuite / libffi.call / closure_fn0.c
index f418f01..6d9b2cb 100644 (file)
@@ -45,11 +45,19 @@ typedef int (*closure_test_type0)(unsigned long long, int, unsigned long long,
 int main (void)
 {
   ffi_cif cif;
+#ifndef USING_MMAP
   static ffi_closure cl;
-  ffi_closure *pcl = &cl;
+#endif
+  ffi_closure *pcl;
   ffi_type * cl_arg_types[17];
   int res;
 
+#ifdef USING_MMAP
+  pcl = allocate_mmap (sizeof(ffi_closure));
+#else
+  pcl = &cl;
+#endif
+
   cl_arg_types[0] = &ffi_type_uint64;
   cl_arg_types[1] = &ffi_type_uint;
   cl_arg_types[2] = &ffi_type_uint64;