FFI: Use __get_ffi_type_* functions only under MinGW jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 11 Mar 2016 22:36:14 +0000
branchjv
changeset 19333 b26c61158551
parent 19332 9686fae7951b
child 19353 2b04ee017e72
FFI: Use __get_ffi_type_* functions only under MinGW ... on Linux it works fine so those functions are note defined.
ExternalFunctionCallback.st
ExternalLibraryFunction.st
--- a/ExternalFunctionCallback.st	Fri Mar 11 10:06:30 2016 +0000
+++ b/ExternalFunctionCallback.st	Fri Mar 11 22:36:14 2016 +0000
@@ -27,7 +27,7 @@
 # include <ffi.h>
 # define MAX_ARGS    128
 
-# ifdef USE_STANDARD_FFI
+#if ! defined( __MINGW__ )
 #  define __get_ffi_type_sint() &ffi_type_sint
 #  define __get_ffi_type_sint8() &ffi_type_sint8
 #  define __get_ffi_type_sint16() &ffi_type_sint16
--- a/ExternalLibraryFunction.st	Fri Mar 11 10:06:30 2016 +0000
+++ b/ExternalLibraryFunction.st	Fri Mar 11 22:36:14 2016 +0000
@@ -27,11 +27,15 @@
 %{
 #define VERBOSE
 
+#ifdef VERBOSE
+# include <stdio.h>
+#endif
+
 #ifdef HAVE_FFI
 # include <ffi.h>
 # define MAX_ARGS    128
 
-# ifdef USE_STANDARD_FFI
+#if ! defined( __MINGW__ )
 #  define __get_ffi_type_sint() &ffi_type_sint
 #  define __get_ffi_type_sint8() &ffi_type_sint8
 #  define __get_ffi_type_sint16() &ffi_type_sint16