OSDN Git Service

2003-11-21 Andreas Jaeger <aj@suse.de>
[pf3gnuchains/gcc-fork.git] / libffi / testsuite / libffi.call / cls_18byte.c
index 0b1d07f..50ce9ff 100644 (file)
@@ -46,13 +46,21 @@ cls_struct_18byte_gn(ffi_cif* cif, void* resp, void** args, void* userdata)
 int main (void)
 {
   ffi_cif cif;
+#ifndef USING_MMAP
   static ffi_closure cl;
-  ffi_closure *pcl = &cl;
+#endif
+  ffi_closure *pcl;
   void* args_dbl[3];
   ffi_type* cls_struct_fields[5];
   ffi_type cls_struct_type;
   ffi_type* dbl_arg_types[3];
 
+#ifdef USING_MMAP
+  pcl = allocate_mmap (sizeof(ffi_closure));
+#else
+  pcl = &cl;
+#endif
+
   cls_struct_type.size = 0;
   cls_struct_type.alignment = 0;
   cls_struct_type.type = FFI_TYPE_STRUCT;