Skip to content

Commit ba57140

Browse files
committed
Fix builds for libffi on non-x86 platforms
1 parent fff3415 commit ba57140

File tree

2 files changed

+6
-10
lines changed
  • libffi/src
    • gen/java/org/bytedeco/libffi/global
    • main/java/org/bytedeco/libffi/presets

2 files changed

+6
-10
lines changed

libffi/src/gen/java/org/bytedeco/libffi/global/ffi.java

+4-8
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,10 @@ a copy of this software and associated documentation files (the
105105
public static final int FFI_CLOSURES = 1;
106106
public static final int FFI_GO_CLOSURES = 1;
107107

108-
public static native @MemberGetter int FFI_TYPE_SMALL_STRUCT_1B();
109-
public static final int FFI_TYPE_SMALL_STRUCT_1B = FFI_TYPE_SMALL_STRUCT_1B();
110-
public static native @MemberGetter int FFI_TYPE_SMALL_STRUCT_2B();
111-
public static final int FFI_TYPE_SMALL_STRUCT_2B = FFI_TYPE_SMALL_STRUCT_2B();
112-
public static native @MemberGetter int FFI_TYPE_SMALL_STRUCT_4B();
113-
public static final int FFI_TYPE_SMALL_STRUCT_4B = FFI_TYPE_SMALL_STRUCT_4B();
114-
public static native @MemberGetter int FFI_TYPE_MS_STRUCT();
115-
public static final int FFI_TYPE_MS_STRUCT = FFI_TYPE_MS_STRUCT();
108+
// #define FFI_TYPE_SMALL_STRUCT_1B (FFI_TYPE_LAST + 1)
109+
// #define FFI_TYPE_SMALL_STRUCT_2B (FFI_TYPE_LAST + 2)
110+
// #define FFI_TYPE_SMALL_STRUCT_4B (FFI_TYPE_LAST + 3)
111+
// #define FFI_TYPE_MS_STRUCT (FFI_TYPE_LAST + 4)
116112

117113
// #if defined (X86_64) || defined(X86_WIN64)
118114
// || (defined (__x86_64__) && defined (X86_DARWIN))

libffi/src/main/java/org/bytedeco/libffi/presets/ffi.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ public void map(InfoMap infoMap) {
7070
"defined(POWERPC_DARWIN) || defined(POWERPC_AIX)",
7171
"defined (POWERPC_AIX)", "defined (POWERPC_DARWIN)").define(false).translate(true))
7272
.put(new Info("FFI_TYPE_SMALL_STRUCT_1B", "FFI_TYPE_SMALL_STRUCT_2B",
73-
"FFI_TYPE_SMALL_STRUCT_4B", "FFI_TYPE_MS_STRUCT", "FFI_TRAMPOLINE_SIZE",
74-
"FFI_PPC_TYPE_LAST", "FFI_SIZEOF_ARG", "FFI_SIZEOF_JAVA_RAW").translate(false))
73+
"FFI_TYPE_SMALL_STRUCT_4B", "FFI_TYPE_MS_STRUCT", "FFI_PPC_TYPE_LAST").cppTypes())
74+
.put(new Info("FFI_TRAMPOLINE_SIZE", "FFI_SIZEOF_ARG", "FFI_SIZEOF_JAVA_RAW").translate(false))
7575
.put(new Info("ffi_type_uchar", "ffi_type_schar", "ffi_type_ushort", "ffi_type_sshort",
7676
"ffi_type_uint", "ffi_type_sint", "ffi_type_ulong", "ffi_type_slong",
7777
"ffi_type_longdouble").cppTypes("ffi_type").translate(false))

0 commit comments

Comments
 (0)