deps: update ffi to 3.4.6

This commit is contained in:
alexey.lysiuk 2024-12-03 10:00:13 +02:00
parent 64e59f87fc
commit df96c6c28e
5 changed files with 90 additions and 108 deletions

View file

@ -1,6 +1,6 @@
/* -----------------------------------------------------------------*-C-*- /* -----------------------------------------------------------------*-C-*-
libffi 3.4.2 libffi 3.4.6
- Copyright (c) 2011, 2014, 2019, 2021 Anthony Green - Copyright (c) 2011, 2014, 2019, 2021, 2022, 2024 Anthony Green
- Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc. - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
Permission is hereby granted, free of charge, to any person Permission is hereby granted, free of charge, to any person
@ -56,6 +56,31 @@ extern "C" {
/* ---- System configuration information --------------------------------- */ /* ---- System configuration information --------------------------------- */
/* If these change, update src/mips/ffitarget.h. */
#define FFI_TYPE_VOID 0
#define FFI_TYPE_INT 1
#define FFI_TYPE_FLOAT 2
#define FFI_TYPE_DOUBLE 3
#if 0
#define FFI_TYPE_LONGDOUBLE 4
#else
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
#endif
#define FFI_TYPE_UINT8 5
#define FFI_TYPE_SINT8 6
#define FFI_TYPE_UINT16 7
#define FFI_TYPE_SINT16 8
#define FFI_TYPE_UINT32 9
#define FFI_TYPE_SINT32 10
#define FFI_TYPE_UINT64 11
#define FFI_TYPE_SINT64 12
#define FFI_TYPE_STRUCT 13
#define FFI_TYPE_POINTER 14
#define FFI_TYPE_COMPLEX 15
/* This should always refer to the last type code (for sanity checks). */
#define FFI_TYPE_LAST FFI_TYPE_COMPLEX
#include <ffitarget.h> #include <ffitarget.h>
#ifndef LIBFFI_ASM #ifndef LIBFFI_ASM
@ -115,13 +140,11 @@ typedef struct _ffi_type
when using the static version of the library. when using the static version of the library.
Besides, as a workaround, they can define FFI_BUILDING if they Besides, as a workaround, they can define FFI_BUILDING if they
*know* they are going to link with the static library. */ *know* they are going to link with the static library. */
#if defined _MSC_VER #if defined _MSC_VER && !defined(FFI_STATIC_BUILD)
# if defined FFI_BUILDING_DLL /* Building libffi.DLL with msvcc.sh */ # if defined FFI_BUILDING_DLL /* Building libffi.DLL with msvcc.sh */
# define FFI_API __declspec(dllexport) # define FFI_API __declspec(dllexport)
# elif !defined FFI_BUILDING /* Importing libffi.DLL */ # else /* Importing libffi.DLL */
# define FFI_API __declspec(dllimport) # define FFI_API __declspec(dllimport)
# else /* Building/linking static library */
# define FFI_API
# endif # endif
#else #else
# define FFI_API # define FFI_API
@ -197,21 +220,12 @@ FFI_EXTERN ffi_type ffi_type_sint64;
FFI_EXTERN ffi_type ffi_type_float; FFI_EXTERN ffi_type ffi_type_float;
FFI_EXTERN ffi_type ffi_type_double; FFI_EXTERN ffi_type ffi_type_double;
FFI_EXTERN ffi_type ffi_type_pointer; FFI_EXTERN ffi_type ffi_type_pointer;
#if 0
FFI_EXTERN ffi_type ffi_type_longdouble; FFI_EXTERN ffi_type ffi_type_longdouble;
#else
#define ffi_type_longdouble ffi_type_double
#endif
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE #ifdef FFI_TARGET_HAS_COMPLEX_TYPE
FFI_EXTERN ffi_type ffi_type_complex_float; FFI_EXTERN ffi_type ffi_type_complex_float;
FFI_EXTERN ffi_type ffi_type_complex_double; FFI_EXTERN ffi_type ffi_type_complex_double;
#if 0
FFI_EXTERN ffi_type ffi_type_complex_longdouble; FFI_EXTERN ffi_type ffi_type_complex_longdouble;
#else
#define ffi_type_complex_longdouble ffi_type_complex_double
#endif
#endif #endif
#endif /* LIBFFI_HIDE_BASIC_TYPES */ #endif /* LIBFFI_HIDE_BASIC_TYPES */
@ -320,6 +334,9 @@ typedef struct {
ffi_cif *cif; ffi_cif *cif;
void (*fun)(ffi_cif*,void*,void**,void*); void (*fun)(ffi_cif*,void*,void**,void*);
void *user_data; void *user_data;
#if defined(_MSC_VER) && defined(_M_IX86)
void *padding;
#endif
} ffi_closure } ffi_closure
#ifdef __GNUC__ #ifdef __GNUC__
__attribute__((aligned (8))) __attribute__((aligned (8)))
@ -335,14 +352,6 @@ typedef struct {
FFI_API void *ffi_closure_alloc (size_t size, void **code); FFI_API void *ffi_closure_alloc (size_t size, void **code);
FFI_API void ffi_closure_free (void *); FFI_API void ffi_closure_free (void *);
#if defined(PA_LINUX) || defined(PA_HPUX)
#define FFI_CLOSURE_PTR(X) ((void *)((unsigned int)(X) | 2))
#define FFI_RESTORE_PTR(X) ((void *)((unsigned int)(X) & ~3))
#else
#define FFI_CLOSURE_PTR(X) (X)
#define FFI_RESTORE_PTR(X) (X)
#endif
FFI_API ffi_status FFI_API ffi_status
ffi_prep_closure (ffi_closure*, ffi_prep_closure (ffi_closure*,
ffi_cif *, ffi_cif *,
@ -360,7 +369,7 @@ ffi_prep_closure_loc (ffi_closure*,
ffi_cif *, ffi_cif *,
void (*fun)(ffi_cif*,void*,void**,void*), void (*fun)(ffi_cif*,void*,void**,void*),
void *user_data, void *user_data,
void*codeloc); void *codeloc);
#ifdef __sgi #ifdef __sgi
# pragma pack 8 # pragma pack 8
@ -378,7 +387,7 @@ typedef struct {
/* If this is enabled, then a raw closure has the same layout /* If this is enabled, then a raw closure has the same layout
as a regular closure. We use this to install an intermediate as a regular closure. We use this to install an intermediate
handler to do the transaltion, void** -> ffi_raw*. */ handler to do the translation, void** -> ffi_raw*. */
void (*translate_args)(ffi_cif*,void*,void**,void*); void (*translate_args)(ffi_cif*,void*,void**,void*);
void *this_closure; void *this_closure;
@ -446,7 +455,7 @@ ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
#endif /* FFI_CLOSURES */ #endif /* FFI_CLOSURES */
#if FFI_GO_CLOSURES #ifdef FFI_GO_CLOSURES
typedef struct { typedef struct {
void *tramp; void *tramp;
@ -489,38 +498,19 @@ FFI_API
ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type, ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type,
size_t *offsets); size_t *offsets);
/* Useful for eliminating compiler warnings. */ /* Convert between closure and function pointers. */
#if defined(PA_LINUX) || defined(PA_HPUX)
#define FFI_FN(f) ((void (*)(void))((unsigned int)(f) | 2))
#define FFI_CL(f) ((void *)((unsigned int)(f) & ~3))
#else
#define FFI_FN(f) ((void (*)(void))f) #define FFI_FN(f) ((void (*)(void))f)
#define FFI_CL(f) ((void *)(f))
#endif
/* ---- Definitions shared with assembly code ---------------------------- */ /* ---- Definitions shared with assembly code ---------------------------- */
#endif #endif
/* If these change, update src/mips/ffitarget.h. */
#define FFI_TYPE_VOID 0
#define FFI_TYPE_INT 1
#define FFI_TYPE_FLOAT 2
#define FFI_TYPE_DOUBLE 3
#if 0
#define FFI_TYPE_LONGDOUBLE 4
#else
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
#endif
#define FFI_TYPE_UINT8 5
#define FFI_TYPE_SINT8 6
#define FFI_TYPE_UINT16 7
#define FFI_TYPE_SINT16 8
#define FFI_TYPE_UINT32 9
#define FFI_TYPE_SINT32 10
#define FFI_TYPE_UINT64 11
#define FFI_TYPE_SINT64 12
#define FFI_TYPE_STRUCT 13
#define FFI_TYPE_POINTER 14
#define FFI_TYPE_COMPLEX 15
/* This should always refer to the last type code (for sanity checks). */
#define FFI_TYPE_LAST FFI_TYPE_COMPLEX
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -1,6 +1,6 @@
/* -----------------------------------------------------------------*-C-*- /* -----------------------------------------------------------------*-C-*-
libffi 3.4.2 libffi 3.4.6
- Copyright (c) 2011, 2014, 2019, 2021 Anthony Green - Copyright (c) 2011, 2014, 2019, 2021, 2022, 2024 Anthony Green
- Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc. - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
Permission is hereby granted, free of charge, to any person Permission is hereby granted, free of charge, to any person
@ -56,6 +56,31 @@ extern "C" {
/* ---- System configuration information --------------------------------- */ /* ---- System configuration information --------------------------------- */
/* If these change, update src/mips/ffitarget.h. */
#define FFI_TYPE_VOID 0
#define FFI_TYPE_INT 1
#define FFI_TYPE_FLOAT 2
#define FFI_TYPE_DOUBLE 3
#if 1
#define FFI_TYPE_LONGDOUBLE 4
#else
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
#endif
#define FFI_TYPE_UINT8 5
#define FFI_TYPE_SINT8 6
#define FFI_TYPE_UINT16 7
#define FFI_TYPE_SINT16 8
#define FFI_TYPE_UINT32 9
#define FFI_TYPE_SINT32 10
#define FFI_TYPE_UINT64 11
#define FFI_TYPE_SINT64 12
#define FFI_TYPE_STRUCT 13
#define FFI_TYPE_POINTER 14
#define FFI_TYPE_COMPLEX 15
/* This should always refer to the last type code (for sanity checks). */
#define FFI_TYPE_LAST FFI_TYPE_COMPLEX
#include <ffitarget.h> #include <ffitarget.h>
#ifndef LIBFFI_ASM #ifndef LIBFFI_ASM
@ -115,13 +140,11 @@ typedef struct _ffi_type
when using the static version of the library. when using the static version of the library.
Besides, as a workaround, they can define FFI_BUILDING if they Besides, as a workaround, they can define FFI_BUILDING if they
*know* they are going to link with the static library. */ *know* they are going to link with the static library. */
#if defined _MSC_VER #if defined _MSC_VER && !defined(FFI_STATIC_BUILD)
# if defined FFI_BUILDING_DLL /* Building libffi.DLL with msvcc.sh */ # if defined FFI_BUILDING_DLL /* Building libffi.DLL with msvcc.sh */
# define FFI_API __declspec(dllexport) # define FFI_API __declspec(dllexport)
# elif !defined FFI_BUILDING /* Importing libffi.DLL */ # else /* Importing libffi.DLL */
# define FFI_API __declspec(dllimport) # define FFI_API __declspec(dllimport)
# else /* Building/linking static library */
# define FFI_API
# endif # endif
#else #else
# define FFI_API # define FFI_API
@ -197,21 +220,12 @@ FFI_EXTERN ffi_type ffi_type_sint64;
FFI_EXTERN ffi_type ffi_type_float; FFI_EXTERN ffi_type ffi_type_float;
FFI_EXTERN ffi_type ffi_type_double; FFI_EXTERN ffi_type ffi_type_double;
FFI_EXTERN ffi_type ffi_type_pointer; FFI_EXTERN ffi_type ffi_type_pointer;
#if 1
FFI_EXTERN ffi_type ffi_type_longdouble; FFI_EXTERN ffi_type ffi_type_longdouble;
#else
#define ffi_type_longdouble ffi_type_double
#endif
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE #ifdef FFI_TARGET_HAS_COMPLEX_TYPE
FFI_EXTERN ffi_type ffi_type_complex_float; FFI_EXTERN ffi_type ffi_type_complex_float;
FFI_EXTERN ffi_type ffi_type_complex_double; FFI_EXTERN ffi_type ffi_type_complex_double;
#if 1
FFI_EXTERN ffi_type ffi_type_complex_longdouble; FFI_EXTERN ffi_type ffi_type_complex_longdouble;
#else
#define ffi_type_complex_longdouble ffi_type_complex_double
#endif
#endif #endif
#endif /* LIBFFI_HIDE_BASIC_TYPES */ #endif /* LIBFFI_HIDE_BASIC_TYPES */
@ -320,6 +334,9 @@ typedef struct {
ffi_cif *cif; ffi_cif *cif;
void (*fun)(ffi_cif*,void*,void**,void*); void (*fun)(ffi_cif*,void*,void**,void*);
void *user_data; void *user_data;
#if defined(_MSC_VER) && defined(_M_IX86)
void *padding;
#endif
} ffi_closure } ffi_closure
#ifdef __GNUC__ #ifdef __GNUC__
__attribute__((aligned (8))) __attribute__((aligned (8)))
@ -335,14 +352,6 @@ typedef struct {
FFI_API void *ffi_closure_alloc (size_t size, void **code); FFI_API void *ffi_closure_alloc (size_t size, void **code);
FFI_API void ffi_closure_free (void *); FFI_API void ffi_closure_free (void *);
#if defined(PA_LINUX) || defined(PA_HPUX)
#define FFI_CLOSURE_PTR(X) ((void *)((unsigned int)(X) | 2))
#define FFI_RESTORE_PTR(X) ((void *)((unsigned int)(X) & ~3))
#else
#define FFI_CLOSURE_PTR(X) (X)
#define FFI_RESTORE_PTR(X) (X)
#endif
FFI_API ffi_status FFI_API ffi_status
ffi_prep_closure (ffi_closure*, ffi_prep_closure (ffi_closure*,
ffi_cif *, ffi_cif *,
@ -360,7 +369,7 @@ ffi_prep_closure_loc (ffi_closure*,
ffi_cif *, ffi_cif *,
void (*fun)(ffi_cif*,void*,void**,void*), void (*fun)(ffi_cif*,void*,void**,void*),
void *user_data, void *user_data,
void*codeloc); void *codeloc);
#ifdef __sgi #ifdef __sgi
# pragma pack 8 # pragma pack 8
@ -378,7 +387,7 @@ typedef struct {
/* If this is enabled, then a raw closure has the same layout /* If this is enabled, then a raw closure has the same layout
as a regular closure. We use this to install an intermediate as a regular closure. We use this to install an intermediate
handler to do the transaltion, void** -> ffi_raw*. */ handler to do the translation, void** -> ffi_raw*. */
void (*translate_args)(ffi_cif*,void*,void**,void*); void (*translate_args)(ffi_cif*,void*,void**,void*);
void *this_closure; void *this_closure;
@ -446,7 +455,7 @@ ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
#endif /* FFI_CLOSURES */ #endif /* FFI_CLOSURES */
#if FFI_GO_CLOSURES #ifdef FFI_GO_CLOSURES
typedef struct { typedef struct {
void *tramp; void *tramp;
@ -489,38 +498,19 @@ FFI_API
ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type, ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type,
size_t *offsets); size_t *offsets);
/* Useful for eliminating compiler warnings. */ /* Convert between closure and function pointers. */
#if defined(PA_LINUX) || defined(PA_HPUX)
#define FFI_FN(f) ((void (*)(void))((unsigned int)(f) | 2))
#define FFI_CL(f) ((void *)((unsigned int)(f) & ~3))
#else
#define FFI_FN(f) ((void (*)(void))f) #define FFI_FN(f) ((void (*)(void))f)
#define FFI_CL(f) ((void *)(f))
#endif
/* ---- Definitions shared with assembly code ---------------------------- */ /* ---- Definitions shared with assembly code ---------------------------- */
#endif #endif
/* If these change, update src/mips/ffitarget.h. */
#define FFI_TYPE_VOID 0
#define FFI_TYPE_INT 1
#define FFI_TYPE_FLOAT 2
#define FFI_TYPE_DOUBLE 3
#if 1
#define FFI_TYPE_LONGDOUBLE 4
#else
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
#endif
#define FFI_TYPE_UINT8 5
#define FFI_TYPE_SINT8 6
#define FFI_TYPE_UINT16 7
#define FFI_TYPE_SINT16 8
#define FFI_TYPE_UINT32 9
#define FFI_TYPE_SINT32 10
#define FFI_TYPE_UINT64 11
#define FFI_TYPE_SINT64 12
#define FFI_TYPE_STRUCT 13
#define FFI_TYPE_POINTER 14
#define FFI_TYPE_COMPLEX 15
/* This should always refer to the last type code (for sanity checks). */
#define FFI_TYPE_LAST FFI_TYPE_COMPLEX
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -41,6 +41,9 @@
#if defined (X86_64) && defined (__i386__) #if defined (X86_64) && defined (__i386__)
#undef X86_64 #undef X86_64
#warning ******************************************************
#warning ********** X86 IS DEFINED ****************************
#warning ******************************************************
#define X86 #define X86
#endif #endif
@ -159,4 +162,3 @@ typedef enum ffi_abi {
#endif #endif
#endif #endif

BIN
deps/ffi/lib/libffi.a vendored

Binary file not shown.

View file

@ -6,6 +6,6 @@ includedir=${prefix}/include
Name: libffi Name: libffi
Description: Library supporting Foreign Function Interfaces Description: Library supporting Foreign Function Interfaces
Version: 3.4.2 Version: 3.4.6
Libs: -L${toolexeclibdir} -lffi Libs: -L${toolexeclibdir} -lffi
Cflags: -I${includedir} Cflags: -I${includedir}