Skip to content

Commit

Permalink
Fix builds for libffi on non-x86 platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed May 31, 2022
1 parent fff3415 commit ba57140
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 4 additions & 8 deletions libffi/src/gen/java/org/bytedeco/libffi/global/ffi.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,10 @@ a copy of this software and associated documentation files (the
public static final int FFI_CLOSURES = 1;
public static final int FFI_GO_CLOSURES = 1;

public static native @MemberGetter int FFI_TYPE_SMALL_STRUCT_1B();
public static final int FFI_TYPE_SMALL_STRUCT_1B = FFI_TYPE_SMALL_STRUCT_1B();
public static native @MemberGetter int FFI_TYPE_SMALL_STRUCT_2B();
public static final int FFI_TYPE_SMALL_STRUCT_2B = FFI_TYPE_SMALL_STRUCT_2B();
public static native @MemberGetter int FFI_TYPE_SMALL_STRUCT_4B();
public static final int FFI_TYPE_SMALL_STRUCT_4B = FFI_TYPE_SMALL_STRUCT_4B();
public static native @MemberGetter int FFI_TYPE_MS_STRUCT();
public static final int FFI_TYPE_MS_STRUCT = FFI_TYPE_MS_STRUCT();
// #define FFI_TYPE_SMALL_STRUCT_1B (FFI_TYPE_LAST + 1)
// #define FFI_TYPE_SMALL_STRUCT_2B (FFI_TYPE_LAST + 2)
// #define FFI_TYPE_SMALL_STRUCT_4B (FFI_TYPE_LAST + 3)
// #define FFI_TYPE_MS_STRUCT (FFI_TYPE_LAST + 4)

// #if defined (X86_64) || defined(X86_WIN64)
// || (defined (__x86_64__) && defined (X86_DARWIN))
Expand Down
4 changes: 2 additions & 2 deletions libffi/src/main/java/org/bytedeco/libffi/presets/ffi.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public void map(InfoMap infoMap) {
"defined(POWERPC_DARWIN) || defined(POWERPC_AIX)",
"defined (POWERPC_AIX)", "defined (POWERPC_DARWIN)").define(false).translate(true))
.put(new Info("FFI_TYPE_SMALL_STRUCT_1B", "FFI_TYPE_SMALL_STRUCT_2B",
"FFI_TYPE_SMALL_STRUCT_4B", "FFI_TYPE_MS_STRUCT", "FFI_TRAMPOLINE_SIZE",
"FFI_PPC_TYPE_LAST", "FFI_SIZEOF_ARG", "FFI_SIZEOF_JAVA_RAW").translate(false))
"FFI_TYPE_SMALL_STRUCT_4B", "FFI_TYPE_MS_STRUCT", "FFI_PPC_TYPE_LAST").cppTypes())
.put(new Info("FFI_TRAMPOLINE_SIZE", "FFI_SIZEOF_ARG", "FFI_SIZEOF_JAVA_RAW").translate(false))
.put(new Info("ffi_type_uchar", "ffi_type_schar", "ffi_type_ushort", "ffi_type_sshort",
"ffi_type_uint", "ffi_type_sint", "ffi_type_ulong", "ffi_type_slong",
"ffi_type_longdouble").cppTypes("ffi_type").translate(false))
Expand Down

0 comments on commit ba57140

Please sign in to comment.