ffi 1.17.0 → 1.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +17 -0
- data/Gemfile +3 -1
- data/Rakefile +2 -2
- data/ext/ffi_c/Function.c +52 -34
- data/ext/ffi_c/libffi/.github/workflows/emscripten.yml +48 -60
- data/ext/ffi_c/libffi/Makefile.am +4 -3
- data/ext/ffi_c/libffi/Makefile.in +5 -25
- data/ext/ffi_c/libffi/README.md +19 -2
- data/ext/ffi_c/libffi/acinclude.m4 +6 -0
- data/ext/ffi_c/libffi/config.guess +80 -22
- data/ext/ffi_c/libffi/config.sub +161 -80
- data/ext/ffi_c/libffi/configure +41 -25
- data/ext/ffi_c/libffi/configure.ac +9 -8
- data/ext/ffi_c/libffi/configure.host +0 -5
- data/ext/ffi_c/libffi/doc/Makefile.in +1 -0
- data/ext/ffi_c/libffi/doc/libffi.texi +3 -3
- data/ext/ffi_c/libffi/doc/version.texi +4 -4
- data/ext/ffi_c/libffi/fficonfig.h.in +3 -3
- data/ext/ffi_c/libffi/include/Makefile.in +1 -0
- data/ext/ffi_c/libffi/include/ffi_cfi.h +2 -0
- data/ext/ffi_c/libffi/include/ffi_common.h +17 -0
- data/ext/ffi_c/libffi/man/Makefile.in +1 -0
- data/ext/ffi_c/libffi/src/aarch64/ffi.c +7 -4
- data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +2 -2
- data/ext/ffi_c/libffi/src/aarch64/internal.h +63 -17
- data/ext/ffi_c/libffi/src/aarch64/sysv.S +16 -12
- data/ext/ffi_c/libffi/src/arc/arcompact.S +2 -2
- data/ext/ffi_c/libffi/src/arc/ffi.c +6 -2
- data/ext/ffi_c/libffi/src/closures.c +3 -3
- data/ext/ffi_c/libffi/src/dlmalloc.c +1 -0
- data/ext/ffi_c/libffi/src/mips/ffitarget.h +2 -4
- data/ext/ffi_c/libffi/src/mips/n32.S +4 -0
- data/ext/ffi_c/libffi/src/mips/o32.S +4 -0
- data/ext/ffi_c/libffi/src/or1k/ffi.c +2 -2
- data/ext/ffi_c/libffi/src/powerpc/ffi.c +13 -0
- data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +26 -19
- data/ext/ffi_c/libffi/src/powerpc/ffi_sysv.c +26 -16
- data/ext/ffi_c/libffi/src/powerpc/internal.h +10 -0
- data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +47 -0
- data/ext/ffi_c/libffi/src/powerpc/ppc_closure.S +24 -0
- data/ext/ffi_c/libffi/src/prep_cif.c +1 -4
- data/ext/ffi_c/libffi/src/s390/ffi.c +28 -1
- data/ext/ffi_c/libffi/src/s390/internal.h +11 -0
- data/ext/ffi_c/libffi/src/s390/sysv.S +38 -0
- data/ext/ffi_c/libffi/src/sparc/ffi.c +16 -0
- data/ext/ffi_c/libffi/src/wasm32/ffi.c +10 -262
- data/ext/ffi_c/libffi/src/x86/ffi.c +4 -1
- data/ext/ffi_c/libffi/src/x86/ffi64.c +4 -1
- data/ext/ffi_c/libffi/testsuite/Makefile.am +4 -3
- data/ext/ffi_c/libffi/testsuite/Makefile.in +5 -3
- data/ext/ffi_c/libffi/testsuite/emscripten/build-tests.sh +4 -24
- data/ext/ffi_c/libffi/testsuite/emscripten/build.sh +8 -25
- data/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh +3 -28
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback2.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback3.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/callback4.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.call/overread.c +54 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/struct_int_float.c +88 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +1 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +1 -0
- data/ext/ffi_c/libffi/testsuite/libffi.call/x32.c +31 -0
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshortchar.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushortchar.c +1 -1
- data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_int.c +1 -1
- data/lib/ffi/ffi.rb +59 -0
- data/lib/ffi/version.rb +1 -1
- data/sig/ffi/auto_pointer.rbs +0 -1
- data/sig/ffi/library.rbs +1 -1
- data.tar.gz.sig +0 -0
- metadata +18 -18
- metadata.gz.sig +0 -0
- data/ext/ffi_c/libffi/.circleci/config.yml +0 -156
- data/ext/ffi_c/libffi/src/nios2/ffi.c +0 -304
- data/ext/ffi_c/libffi/src/nios2/ffitarget.h +0 -52
- data/ext/ffi_c/libffi/src/nios2/sysv.S +0 -136
| @@ -1,10 +1,10 @@ | |
| 1 1 | 
             
            #! /bin/sh
         | 
| 2 2 | 
             
            # Attempt to guess a canonical system name.
         | 
| 3 | 
            -
            #   Copyright 1992- | 
| 3 | 
            +
            #   Copyright 1992-2024 Free Software Foundation, Inc.
         | 
| 4 4 |  | 
| 5 5 | 
             
            # shellcheck disable=SC2006,SC2268 # see below for rationale
         | 
| 6 6 |  | 
| 7 | 
            -
            timestamp=' | 
| 7 | 
            +
            timestamp='2024-01-01'
         | 
| 8 8 |  | 
| 9 9 | 
             
            # This file is free software; you can redistribute it and/or modify it
         | 
| 10 10 | 
             
            # under the terms of the GNU General Public License as published by
         | 
| @@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'` | |
| 47 47 | 
             
            usage="\
         | 
| 48 48 | 
             
            Usage: $0 [OPTION]
         | 
| 49 49 |  | 
| 50 | 
            -
            Output the configuration name of the system  | 
| 50 | 
            +
            Output the configuration name of the system '$me' is run on.
         | 
| 51 51 |  | 
| 52 52 | 
             
            Options:
         | 
| 53 53 | 
             
              -h, --help         print this help, then exit
         | 
| @@ -60,13 +60,13 @@ version="\ | |
| 60 60 | 
             
            GNU config.guess ($timestamp)
         | 
| 61 61 |  | 
| 62 62 | 
             
            Originally written by Per Bothner.
         | 
| 63 | 
            -
            Copyright 1992- | 
| 63 | 
            +
            Copyright 1992-2024 Free Software Foundation, Inc.
         | 
| 64 64 |  | 
| 65 65 | 
             
            This is free software; see the source for copying conditions.  There is NO
         | 
| 66 66 | 
             
            warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
         | 
| 67 67 |  | 
| 68 68 | 
             
            help="
         | 
| 69 | 
            -
            Try  | 
| 69 | 
            +
            Try '$me --help' for more information."
         | 
| 70 70 |  | 
| 71 71 | 
             
            # Parse command line
         | 
| 72 72 | 
             
            while test $# -gt 0 ; do
         | 
| @@ -102,8 +102,8 @@ GUESS= | |
| 102 102 | 
             
            # temporary files to be created and, as you can see below, it is a
         | 
| 103 103 | 
             
            # headache to deal with in a portable fashion.
         | 
| 104 104 |  | 
| 105 | 
            -
            # Historically,  | 
| 106 | 
            -
            # use  | 
| 105 | 
            +
            # Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
         | 
| 106 | 
            +
            # use 'HOST_CC' if defined, but it is deprecated.
         | 
| 107 107 |  | 
| 108 108 | 
             
            # Portable tmp directory creation inspired by the Autoconf team.
         | 
| 109 109 |  | 
| @@ -155,6 +155,9 @@ Linux|GNU|GNU/*) | |
| 155 155 |  | 
| 156 156 | 
             
            	set_cc_for_build
         | 
| 157 157 | 
             
            	cat <<-EOF > "$dummy.c"
         | 
| 158 | 
            +
            	#if defined(__ANDROID__)
         | 
| 159 | 
            +
            	LIBC=android
         | 
| 160 | 
            +
            	#else
         | 
| 158 161 | 
             
            	#include <features.h>
         | 
| 159 162 | 
             
            	#if defined(__UCLIBC__)
         | 
| 160 163 | 
             
            	LIBC=uclibc
         | 
| @@ -162,6 +165,8 @@ Linux|GNU|GNU/*) | |
| 162 165 | 
             
            	LIBC=dietlibc
         | 
| 163 166 | 
             
            	#elif defined(__GLIBC__)
         | 
| 164 167 | 
             
            	LIBC=gnu
         | 
| 168 | 
            +
            	#elif defined(__LLVM_LIBC__)
         | 
| 169 | 
            +
            	LIBC=llvm
         | 
| 165 170 | 
             
            	#else
         | 
| 166 171 | 
             
            	#include <stdarg.h>
         | 
| 167 172 | 
             
            	/* First heuristic to detect musl libc.  */
         | 
| @@ -169,6 +174,7 @@ Linux|GNU|GNU/*) | |
| 169 174 | 
             
            	LIBC=musl
         | 
| 170 175 | 
             
            	#endif
         | 
| 171 176 | 
             
            	#endif
         | 
| 177 | 
            +
            	#endif
         | 
| 172 178 | 
             
            	EOF
         | 
| 173 179 | 
             
            	cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
         | 
| 174 180 | 
             
            	eval "$cc_set_libc"
         | 
| @@ -459,7 +465,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in | |
| 459 465 | 
             
            		UNAME_RELEASE=`uname -v`
         | 
| 460 466 | 
             
            		;;
         | 
| 461 467 | 
             
            	esac
         | 
| 462 | 
            -
            	# Japanese Language versions have a version number like  | 
| 468 | 
            +
            	# Japanese Language versions have a version number like '4.1.3-JL'.
         | 
| 463 469 | 
             
            	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
         | 
| 464 470 | 
             
            	GUESS=sparc-sun-sunos$SUN_REL
         | 
| 465 471 | 
             
            	;;
         | 
| @@ -904,7 +910,7 @@ EOF | |
| 904 910 | 
             
            	fi
         | 
| 905 911 | 
             
            	;;
         | 
| 906 912 | 
             
                *:FreeBSD:*:*)
         | 
| 907 | 
            -
            	UNAME_PROCESSOR | 
| 913 | 
            +
            	UNAME_PROCESSOR=`uname -p`
         | 
| 908 914 | 
             
            	case $UNAME_PROCESSOR in
         | 
| 909 915 | 
             
            	    amd64)
         | 
| 910 916 | 
             
            		UNAME_PROCESSOR=x86_64 ;;
         | 
| @@ -966,11 +972,37 @@ EOF | |
| 966 972 | 
             
            	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
         | 
| 967 973 | 
             
            	GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
         | 
| 968 974 | 
             
            	;;
         | 
| 975 | 
            +
                x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
         | 
| 976 | 
            +
            	GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
         | 
| 977 | 
            +
            	;;
         | 
| 978 | 
            +
                *:[Mm]anagarm:*:*)
         | 
| 979 | 
            +
            	GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
         | 
| 980 | 
            +
            	;;
         | 
| 969 981 | 
             
                *:Minix:*:*)
         | 
| 970 982 | 
             
            	GUESS=$UNAME_MACHINE-unknown-minix
         | 
| 971 983 | 
             
            	;;
         | 
| 972 984 | 
             
                aarch64:Linux:*:*)
         | 
| 973 | 
            -
            	 | 
| 985 | 
            +
            	set_cc_for_build
         | 
| 986 | 
            +
            	CPU=$UNAME_MACHINE
         | 
| 987 | 
            +
            	LIBCABI=$LIBC
         | 
| 988 | 
            +
            	if test "$CC_FOR_BUILD" != no_compiler_found; then
         | 
| 989 | 
            +
            	    ABI=64
         | 
| 990 | 
            +
            	    sed 's/^	    //' << EOF > "$dummy.c"
         | 
| 991 | 
            +
            	    #ifdef __ARM_EABI__
         | 
| 992 | 
            +
            	    #ifdef __ARM_PCS_VFP
         | 
| 993 | 
            +
            	    ABI=eabihf
         | 
| 994 | 
            +
            	    #else
         | 
| 995 | 
            +
            	    ABI=eabi
         | 
| 996 | 
            +
            	    #endif
         | 
| 997 | 
            +
            	    #endif
         | 
| 998 | 
            +
            EOF
         | 
| 999 | 
            +
            	    cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
         | 
| 1000 | 
            +
            	    eval "$cc_set_abi"
         | 
| 1001 | 
            +
            	    case $ABI in
         | 
| 1002 | 
            +
            		eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
         | 
| 1003 | 
            +
            	    esac
         | 
| 1004 | 
            +
            	fi
         | 
| 1005 | 
            +
            	GUESS=$CPU-unknown-linux-$LIBCABI
         | 
| 974 1006 | 
             
            	;;
         | 
| 975 1007 | 
             
                aarch64_be:Linux:*:*)
         | 
| 976 1008 | 
             
            	UNAME_MACHINE=aarch64_be
         | 
| @@ -1036,7 +1068,16 @@ EOF | |
| 1036 1068 | 
             
                k1om:Linux:*:*)
         | 
| 1037 1069 | 
             
            	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
         | 
| 1038 1070 | 
             
            	;;
         | 
| 1039 | 
            -
                 | 
| 1071 | 
            +
                kvx:Linux:*:*)
         | 
| 1072 | 
            +
            	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
         | 
| 1073 | 
            +
            	;;
         | 
| 1074 | 
            +
                kvx:cos:*:*)
         | 
| 1075 | 
            +
            	GUESS=$UNAME_MACHINE-unknown-cos
         | 
| 1076 | 
            +
            	;;
         | 
| 1077 | 
            +
                kvx:mbr:*:*)
         | 
| 1078 | 
            +
            	GUESS=$UNAME_MACHINE-unknown-mbr
         | 
| 1079 | 
            +
            	;;
         | 
| 1080 | 
            +
                loongarch32:Linux:*:* | loongarch64:Linux:*:*)
         | 
| 1040 1081 | 
             
            	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
         | 
| 1041 1082 | 
             
            	;;
         | 
| 1042 1083 | 
             
                m32r*:Linux:*:*)
         | 
| @@ -1151,16 +1192,27 @@ EOF | |
| 1151 1192 | 
             
            	;;
         | 
| 1152 1193 | 
             
                x86_64:Linux:*:*)
         | 
| 1153 1194 | 
             
            	set_cc_for_build
         | 
| 1195 | 
            +
            	CPU=$UNAME_MACHINE
         | 
| 1154 1196 | 
             
            	LIBCABI=$LIBC
         | 
| 1155 1197 | 
             
            	if test "$CC_FOR_BUILD" != no_compiler_found; then
         | 
| 1156 | 
            -
            	     | 
| 1157 | 
            -
             | 
| 1158 | 
            -
             | 
| 1159 | 
            -
            	     | 
| 1160 | 
            -
             | 
| 1161 | 
            -
            	     | 
| 1198 | 
            +
            	    ABI=64
         | 
| 1199 | 
            +
            	    sed 's/^	    //' << EOF > "$dummy.c"
         | 
| 1200 | 
            +
            	    #ifdef __i386__
         | 
| 1201 | 
            +
            	    ABI=x86
         | 
| 1202 | 
            +
            	    #else
         | 
| 1203 | 
            +
            	    #ifdef __ILP32__
         | 
| 1204 | 
            +
            	    ABI=x32
         | 
| 1205 | 
            +
            	    #endif
         | 
| 1206 | 
            +
            	    #endif
         | 
| 1207 | 
            +
            EOF
         | 
| 1208 | 
            +
            	    cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
         | 
| 1209 | 
            +
            	    eval "$cc_set_abi"
         | 
| 1210 | 
            +
            	    case $ABI in
         | 
| 1211 | 
            +
            		x86) CPU=i686 ;;
         | 
| 1212 | 
            +
            		x32) LIBCABI=${LIBC}x32 ;;
         | 
| 1213 | 
            +
            	    esac
         | 
| 1162 1214 | 
             
            	fi
         | 
| 1163 | 
            -
            	GUESS=$ | 
| 1215 | 
            +
            	GUESS=$CPU-pc-linux-$LIBCABI
         | 
| 1164 1216 | 
             
            	;;
         | 
| 1165 1217 | 
             
                xtensa*:Linux:*:*)
         | 
| 1166 1218 | 
             
            	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
         | 
| @@ -1180,7 +1232,7 @@ EOF | |
| 1180 1232 | 
             
            	GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
         | 
| 1181 1233 | 
             
            	;;
         | 
| 1182 1234 | 
             
                i*86:OS/2:*:*)
         | 
| 1183 | 
            -
            	# If we were able to find  | 
| 1235 | 
            +
            	# If we were able to find 'uname', then EMX Unix compatibility
         | 
| 1184 1236 | 
             
            	# is probably installed.
         | 
| 1185 1237 | 
             
            	GUESS=$UNAME_MACHINE-pc-os2-emx
         | 
| 1186 1238 | 
             
            	;;
         | 
| @@ -1321,7 +1373,7 @@ EOF | |
| 1321 1373 | 
             
            		GUESS=ns32k-sni-sysv
         | 
| 1322 1374 | 
             
            	fi
         | 
| 1323 1375 | 
             
            	;;
         | 
| 1324 | 
            -
                PENTIUM:*:4.0*:*)	# Unisys  | 
| 1376 | 
            +
                PENTIUM:*:4.0*:*)	# Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
         | 
| 1325 1377 | 
             
            			# says <Richard.M.Bartel@ccMail.Census.GOV>
         | 
| 1326 1378 | 
             
            	GUESS=i586-unisys-sysv4
         | 
| 1327 1379 | 
             
            	;;
         | 
| @@ -1367,8 +1419,11 @@ EOF | |
| 1367 1419 | 
             
                BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
         | 
| 1368 1420 | 
             
            	GUESS=i586-pc-haiku
         | 
| 1369 1421 | 
             
            	;;
         | 
| 1370 | 
            -
                 | 
| 1371 | 
            -
            	GUESS= | 
| 1422 | 
            +
                ppc:Haiku:*:*)	# Haiku running on Apple PowerPC
         | 
| 1423 | 
            +
            	GUESS=powerpc-apple-haiku
         | 
| 1424 | 
            +
            	;;
         | 
| 1425 | 
            +
                *:Haiku:*:*)	# Haiku modern gcc (not bound by BeOS compat)
         | 
| 1426 | 
            +
            	GUESS=$UNAME_MACHINE-unknown-haiku
         | 
| 1372 1427 | 
             
            	;;
         | 
| 1373 1428 | 
             
                SX-4:SUPER-UX:*:*)
         | 
| 1374 1429 | 
             
            	GUESS=sx4-nec-superux$UNAME_RELEASE
         | 
| @@ -1540,6 +1595,9 @@ EOF | |
| 1540 1595 | 
             
                *:Unleashed:*:*)
         | 
| 1541 1596 | 
             
            	GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
         | 
| 1542 1597 | 
             
            	;;
         | 
| 1598 | 
            +
                *:Ironclad:*:*)
         | 
| 1599 | 
            +
            	GUESS=$UNAME_MACHINE-unknown-ironclad
         | 
| 1600 | 
            +
            	;;
         | 
| 1543 1601 | 
             
            esac
         | 
| 1544 1602 |  | 
| 1545 1603 | 
             
            # Do we have a guess based on uname results?
         |