ffi 1.17.2 → 1.17.3

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.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +25 -0
  4. data/Gemfile +7 -4
  5. data/README.md +1 -0
  6. data/Rakefile +7 -4
  7. data/Steepfile +8 -0
  8. data/ext/ffi_c/DynamicLibrary.c +1 -1
  9. data/ext/ffi_c/Function.c +2 -0
  10. data/ext/ffi_c/MethodHandle.c +4 -2
  11. data/ext/ffi_c/libffi/.ci/Containerfile.ppc64le +12 -0
  12. data/ext/ffi_c/libffi/.ci/build.sh +38 -33
  13. data/ext/ffi_c/libffi/.ci/install.sh +46 -50
  14. data/ext/ffi_c/libffi/.ci/site.exp +6 -0
  15. data/ext/ffi_c/libffi/.gail-labels +44 -0
  16. data/ext/ffi_c/libffi/.github/workflows/build.yml +212 -333
  17. data/ext/ffi_c/libffi/.github/workflows/emscripten.yml +58 -3
  18. data/ext/ffi_c/libffi/.github/workflows/label-new-issue.yaml +15 -0
  19. data/ext/ffi_c/libffi/.github/workflows/tarball.yml +55 -0
  20. data/ext/ffi_c/libffi/LICENSE +1 -1
  21. data/ext/ffi_c/libffi/Makefile.am +17 -13
  22. data/ext/ffi_c/libffi/Makefile.in +37 -30
  23. data/ext/ffi_c/libffi/README.md +22 -3
  24. data/ext/ffi_c/libffi/configure +105 -121
  25. data/ext/ffi_c/libffi/configure.ac +21 -8
  26. data/ext/ffi_c/libffi/configure.host +6 -1
  27. data/ext/ffi_c/libffi/doc/Makefile.in +3 -0
  28. data/ext/ffi_c/libffi/doc/libffi.texi +24 -1
  29. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  30. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +1 -28
  31. data/ext/ffi_c/libffi/include/Makefile.in +3 -0
  32. data/ext/ffi_c/libffi/include/ffi.h.in +19 -1
  33. data/ext/ffi_c/libffi/libffi.map.in +13 -1
  34. data/ext/ffi_c/libffi/libtool-version +1 -1
  35. data/ext/ffi_c/libffi/m4/asmcfi.m4 +28 -11
  36. data/ext/ffi_c/libffi/m4/ax_check_compile_flag.m4 +13 -3
  37. data/ext/ffi_c/libffi/man/Makefile.in +3 -0
  38. data/ext/ffi_c/libffi/src/aarch64/sysv.S +7 -1
  39. data/ext/ffi_c/libffi/src/arm/sysv.S +1 -1
  40. data/ext/ffi_c/libffi/src/pa/linux.S +4 -0
  41. data/ext/ffi_c/libffi/src/powerpc/ffi.c +6 -0
  42. data/ext/ffi_c/libffi/src/riscv/ffi.c +39 -16
  43. data/ext/ffi_c/libffi/src/riscv/internal.h +7 -0
  44. data/ext/ffi_c/libffi/src/riscv/sysv.S +24 -0
  45. data/ext/ffi_c/libffi/src/tramp.c +6 -1
  46. data/ext/ffi_c/libffi/src/types.c +23 -1
  47. data/ext/ffi_c/libffi/src/{wasm32 → wasm}/ffi.c +157 -54
  48. data/ext/ffi_c/libffi/src/{wasm32 → wasm}/ffitarget.h +17 -0
  49. data/ext/ffi_c/libffi/src/x86/ffitarget.h +0 -3
  50. data/ext/ffi_c/libffi/src/x86/sysv.S +1 -3
  51. data/ext/ffi_c/libffi/src/x86/sysv_intel.S +1 -3
  52. data/ext/ffi_c/libffi/testsuite/Makefile.am +3 -2
  53. data/ext/ffi_c/libffi/testsuite/Makefile.in +6 -2
  54. data/ext/ffi_c/libffi/testsuite/emscripten/build.sh +2 -2
  55. data/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh +4 -4
  56. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +269 -256
  57. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/testcases.c +1 -1
  58. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +3 -0
  59. data/ext/ffi_c/libffi/testsuite/libffi.call/longjmp.c +60 -0
  60. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_dbls_struct.c +1 -1
  61. data/ext/ffi_c/libffi/testsuite/libffi.closures/huge_struct.c +1 -2
  62. data/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest.cc +2 -0
  63. data/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest_ffi_call.cc +2 -0
  64. data/ext/ffi_c/libffi/testsuite/libffi.threads/ffitest.h +1 -0
  65. data/ext/ffi_c/libffi/testsuite/libffi.threads/threads.exp +50 -0
  66. data/ext/ffi_c/libffi/testsuite/libffi.threads/tsan.c +74 -0
  67. data/ext/ffi_c/libffi.mk +5 -0
  68. data/ffi.gemspec +4 -5
  69. data/lib/ffi/autopointer.rb +6 -0
  70. data/lib/ffi/compat.rb +11 -0
  71. data/lib/ffi/function.rb +23 -0
  72. data/lib/ffi/library.rb +19 -3
  73. data/lib/ffi/struct_by_reference.rb +1 -1
  74. data/lib/ffi/version.rb +1 -1
  75. data/samples/hello_ractor.rb +9 -1
  76. data/samples/qsort_ractor.rb +9 -1
  77. data/sig/ffi/auto_pointer.rbs +1 -1
  78. data/sig/ffi/errno.rbs +8 -0
  79. data/sig/ffi/platform.rbs +49 -0
  80. data/sig/ffi/struct.rbs +2 -2
  81. data/sig/ffi/struct_by_reference.rbs +1 -1
  82. data/sig/ffi.rbs +4 -1
  83. data.tar.gz.sig +0 -0
  84. metadata +33 -79
  85. metadata.gz.sig +0 -0
  86. data/ext/ffi_c/libffi/.appveyor/site.exp +0 -16
  87. data/ext/ffi_c/libffi/.appveyor.yml +0 -84
  88. data/lib/ffi/tools/types_generator.rb +0 -137
  89. data/rakelib/ffi_gem_helper.rb +0 -65
  90. /data/ext/ffi_c/libffi/{.appveyor → .ci}/unix-noexec.exp +0 -0
@@ -1,6 +1,6 @@
1
1
  #! /bin/sh
2
2
  # Guess values for system-dependent variables and create Makefiles.
3
- # Generated by GNU Autoconf 2.71 for libffi 3.4.8.
3
+ # Generated by GNU Autoconf 2.71 for libffi 3.5.2.
4
4
  #
5
5
  # Report bugs to <http://github.com/libffi/libffi/issues>.
6
6
  #
@@ -621,8 +621,8 @@ MAKEFLAGS=
621
621
  # Identity of this package.
622
622
  PACKAGE_NAME='libffi'
623
623
  PACKAGE_TARNAME='libffi'
624
- PACKAGE_VERSION='3.4.8'
625
- PACKAGE_STRING='libffi 3.4.8'
624
+ PACKAGE_VERSION='3.5.2'
625
+ PACKAGE_STRING='libffi 3.5.2'
626
626
  PACKAGE_BUGREPORT='http://github.com/libffi/libffi/issues'
627
627
  PACKAGE_URL=''
628
628
 
@@ -684,6 +684,7 @@ FFI_EXEC_TRAMPOLINE_TABLE
684
684
  FFI_EXEC_TRAMPOLINE_TABLE_FALSE
685
685
  FFI_EXEC_TRAMPOLINE_TABLE_TRUE
686
686
  sys_symbol_underscore
687
+ WASM64_MEMORY64
687
688
  HAVE_LONG_DOUBLE_VARIANT
688
689
  HAVE_LONG_DOUBLE
689
690
  AM_LTLDFLAGS
@@ -790,6 +791,8 @@ build_os
790
791
  build_vendor
791
792
  build_cpu
792
793
  build
794
+ FFI_VERSION_NUMBER
795
+ FFI_VERSION_STRING
793
796
  target_alias
794
797
  host_alias
795
798
  build_alias
@@ -864,7 +867,8 @@ CCAS
864
867
  CCASFLAGS
865
868
  LT_SYS_LIBRARY_PATH
866
869
  CXXCPP
867
- CPPFLAGS'
870
+ CPPFLAGS
871
+ WASM64_MEMORY64'
868
872
 
869
873
 
870
874
  # Initialize some variables set by options.
@@ -1413,7 +1417,7 @@ if test "$ac_init_help" = "long"; then
1413
1417
  # Omit some internal or obsolete options to make the list less imposing.
1414
1418
  # This message is too long to be a string in the A/UX 3.1 sh.
1415
1419
  cat <<_ACEOF
1416
- \`configure' configures libffi 3.4.8 to adapt to many kinds of systems.
1420
+ \`configure' configures libffi 3.5.2 to adapt to many kinds of systems.
1417
1421
 
1418
1422
  Usage: $0 [OPTION]... [VAR=VALUE]...
1419
1423
 
@@ -1485,7 +1489,7 @@ fi
1485
1489
 
1486
1490
  if test -n "$ac_init_help"; then
1487
1491
  case $ac_init_help in
1488
- short | recursive ) echo "Configuration of libffi 3.4.8:";;
1492
+ short | recursive ) echo "Configuration of libffi 3.5.2:";;
1489
1493
  esac
1490
1494
  cat <<\_ACEOF
1491
1495
 
@@ -1553,6 +1557,9 @@ Some influential environment variables:
1553
1557
  LT_SYS_LIBRARY_PATH
1554
1558
  User-defined run-time library search path.
1555
1559
  CXXCPP C++ preprocessor
1560
+ WASM64_MEMORY64
1561
+ Used only for the wasm64 target. Set to 1 (default) or 2 for
1562
+ Emscripten's -sMEMORY64 mode
1556
1563
 
1557
1564
  Use these variables to override the choices made by `configure' or to help
1558
1565
  it to find libraries and programs with nonstandard names/locations.
@@ -1621,7 +1628,7 @@ fi
1621
1628
  test -n "$ac_init_help" && exit $ac_status
1622
1629
  if $ac_init_version; then
1623
1630
  cat <<\_ACEOF
1624
- libffi configure 3.4.8
1631
+ libffi configure 3.5.2
1625
1632
  generated by GNU Autoconf 2.71
1626
1633
 
1627
1634
  Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2195,7 +2202,7 @@ cat >config.log <<_ACEOF
2195
2202
  This file contains any messages produced by compilers while
2196
2203
  running configure, to aid debugging if configure makes a mistake.
2197
2204
 
2198
- It was created by libffi $as_me 3.4.8, which was
2205
+ It was created by libffi $as_me 3.5.2, which was
2199
2206
  generated by GNU Autoconf 2.71. Invocation command line was
2200
2207
 
2201
2208
  $ $0$ac_configure_args_raw
@@ -3169,6 +3176,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
3169
3176
  ac_config_headers="$ac_config_headers fficonfig.h"
3170
3177
 
3171
3178
 
3179
+ FFI_VERSION_STRING="3.5.2"
3180
+ FFI_VERSION_NUMBER=30502
3181
+
3182
+
3183
+
3172
3184
 
3173
3185
 
3174
3186
 
@@ -3914,7 +3926,7 @@ fi
3914
3926
 
3915
3927
  # Define the identity of the package.
3916
3928
  PACKAGE='libffi'
3917
- VERSION='3.4.8'
3929
+ VERSION='3.5.2'
3918
3930
 
3919
3931
 
3920
3932
  printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -17633,15 +17645,18 @@ if test "x$ac_test_CFLAGS" = "x"; then
17633
17645
  xlc_opt="-qtune=auto"
17634
17646
  fi
17635
17647
  as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$xlc_opt" | $as_tr_sh`
17636
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $xlc_opt" >&5
17637
- printf %s "checking whether C compiler accepts $xlc_opt... " >&6; }
17648
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts $xlc_opt" >&5
17649
+ printf %s "checking whether the C compiler accepts $xlc_opt... " >&6; }
17638
17650
  if eval test \${$as_CACHEVAR+y}
17639
17651
  then :
17640
17652
  printf %s "(cached) " >&6
17641
17653
  else $as_nop
17642
17654
 
17643
17655
  ax_check_save_flags=$CFLAGS
17644
- CFLAGS="$CFLAGS $xlc_opt"
17656
+ if test x"$GCC" = xyes ; then
17657
+ add_gnu_werror="-Werror"
17658
+ fi
17659
+ CFLAGS="$CFLAGS $xlc_opt $add_gnu_werror"
17645
17660
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17646
17661
  /* end confdefs.h. */
17647
17662
 
@@ -17835,15 +17850,18 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
17835
17850
  if test "x$icc_flags" != x; then
17836
17851
  for flag in $icc_flags; do
17837
17852
  as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$flag" | $as_tr_sh`
17838
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
17839
- printf %s "checking whether C compiler accepts $flag... " >&6; }
17853
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts $flag" >&5
17854
+ printf %s "checking whether the C compiler accepts $flag... " >&6; }
17840
17855
  if eval test \${$as_CACHEVAR+y}
17841
17856
  then :
17842
17857
  printf %s "(cached) " >&6
17843
17858
  else $as_nop
17844
17859
 
17845
17860
  ax_check_save_flags=$CFLAGS
17846
- CFLAGS="$CFLAGS $flag"
17861
+ if test x"$GCC" = xyes ; then
17862
+ add_gnu_werror="-Werror"
17863
+ fi
17864
+ CFLAGS="$CFLAGS $flag $add_gnu_werror"
17847
17865
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17848
17866
  /* end confdefs.h. */
17849
17867
 
@@ -17901,15 +17919,18 @@ printf "%s\n" "$icc_archflag" >&6; }
17901
17919
  # AX_CHECK_COMPILE_FLAG(-malign-double, CFLAGS="$CFLAGS -malign-double")
17902
17920
 
17903
17921
  # -fstrict-aliasing for gcc-2.95+
17904
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fstrict-aliasing" >&5
17905
- printf %s "checking whether C compiler accepts -fstrict-aliasing... " >&6; }
17922
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fstrict-aliasing" >&5
17923
+ printf %s "checking whether the C compiler accepts -fstrict-aliasing... " >&6; }
17906
17924
  if test ${ax_cv_check_cflags___fstrict_aliasing+y}
17907
17925
  then :
17908
17926
  printf %s "(cached) " >&6
17909
17927
  else $as_nop
17910
17928
 
17911
17929
  ax_check_save_flags=$CFLAGS
17912
- CFLAGS="$CFLAGS -fstrict-aliasing"
17930
+ if test x"$GCC" = xyes ; then
17931
+ add_gnu_werror="-Werror"
17932
+ fi
17933
+ CFLAGS="$CFLAGS -fstrict-aliasing $add_gnu_werror"
17913
17934
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17914
17935
  /* end confdefs.h. */
17915
17936
 
@@ -17941,15 +17962,18 @@ fi
17941
17962
 
17942
17963
 
17943
17964
  # note that we enable "unsafe" fp optimization with other compilers, too
17944
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -ffast-math" >&5
17945
- printf %s "checking whether C compiler accepts -ffast-math... " >&6; }
17965
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -ffast-math" >&5
17966
+ printf %s "checking whether the C compiler accepts -ffast-math... " >&6; }
17946
17967
  if test ${ax_cv_check_cflags___ffast_math+y}
17947
17968
  then :
17948
17969
  printf %s "(cached) " >&6
17949
17970
  else $as_nop
17950
17971
 
17951
17972
  ax_check_save_flags=$CFLAGS
17952
- CFLAGS="$CFLAGS -ffast-math"
17973
+ if test x"$GCC" = xyes ; then
17974
+ add_gnu_werror="-Werror"
17975
+ fi
17976
+ CFLAGS="$CFLAGS -ffast-math $add_gnu_werror"
17953
17977
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17954
17978
  /* end confdefs.h. */
17955
17979
 
@@ -18338,15 +18362,18 @@ for flag_prefix in $flag_prefixes; do
18338
18362
  for arch in $ax_gcc_arch; do
18339
18363
  flag="$flag_prefix$arch"
18340
18364
  as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$flag" | $as_tr_sh`
18341
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
18342
- printf %s "checking whether C compiler accepts $flag... " >&6; }
18365
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts $flag" >&5
18366
+ printf %s "checking whether the C compiler accepts $flag... " >&6; }
18343
18367
  if eval test \${$as_CACHEVAR+y}
18344
18368
  then :
18345
18369
  printf %s "(cached) " >&6
18346
18370
  else $as_nop
18347
18371
 
18348
18372
  ax_check_save_flags=$CFLAGS
18349
- CFLAGS="$CFLAGS $flag"
18373
+ if test x"$GCC" = xyes ; then
18374
+ add_gnu_werror="-Werror"
18375
+ fi
18376
+ CFLAGS="$CFLAGS $flag $add_gnu_werror"
18350
18377
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18351
18378
  /* end confdefs.h. */
18352
18379
 
@@ -18420,15 +18447,18 @@ fi
18420
18447
  fi
18421
18448
 
18422
18449
  as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags__$CFLAGS" | $as_tr_sh`
18423
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $CFLAGS" >&5
18424
- printf %s "checking whether C compiler accepts $CFLAGS... " >&6; }
18450
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts $CFLAGS" >&5
18451
+ printf %s "checking whether the C compiler accepts $CFLAGS... " >&6; }
18425
18452
  if eval test \${$as_CACHEVAR+y}
18426
18453
  then :
18427
18454
  printf %s "(cached) " >&6
18428
18455
  else $as_nop
18429
18456
 
18430
18457
  ax_check_save_flags=$CFLAGS
18431
- CFLAGS="$CFLAGS $CFLAGS"
18458
+ if test x"$GCC" = xyes ; then
18459
+ add_gnu_werror="-Werror"
18460
+ fi
18461
+ CFLAGS="$CFLAGS $CFLAGS $add_gnu_werror"
18432
18462
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18433
18463
  /* end confdefs.h. */
18434
18464
 
@@ -18679,82 +18709,6 @@ fi
18679
18709
 
18680
18710
 
18681
18711
 
18682
- # Autoupdate added the next two lines to ensure that your configure
18683
- # script's behavior did not change. They are probably safe to remove.
18684
-
18685
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
18686
- printf %s "checking for egrep... " >&6; }
18687
- if test ${ac_cv_path_EGREP+y}
18688
- then :
18689
- printf %s "(cached) " >&6
18690
- else $as_nop
18691
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
18692
- then ac_cv_path_EGREP="$GREP -E"
18693
- else
18694
- if test -z "$EGREP"; then
18695
- ac_path_EGREP_found=false
18696
- # Loop through the user's path and test for each of PROGNAME-LIST
18697
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18698
- for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
18699
- do
18700
- IFS=$as_save_IFS
18701
- case $as_dir in #(((
18702
- '') as_dir=./ ;;
18703
- */) ;;
18704
- *) as_dir=$as_dir/ ;;
18705
- esac
18706
- for ac_prog in egrep
18707
- do
18708
- for ac_exec_ext in '' $ac_executable_extensions; do
18709
- ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
18710
- as_fn_executable_p "$ac_path_EGREP" || continue
18711
- # Check for GNU ac_path_EGREP and select it if it is found.
18712
- # Check for GNU $ac_path_EGREP
18713
- case `"$ac_path_EGREP" --version 2>&1` in
18714
- *GNU*)
18715
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
18716
- *)
18717
- ac_count=0
18718
- printf %s 0123456789 >"conftest.in"
18719
- while :
18720
- do
18721
- cat "conftest.in" "conftest.in" >"conftest.tmp"
18722
- mv "conftest.tmp" "conftest.in"
18723
- cp "conftest.in" "conftest.nl"
18724
- printf "%s\n" 'EGREP' >> "conftest.nl"
18725
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
18726
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
18727
- as_fn_arith $ac_count + 1 && ac_count=$as_val
18728
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
18729
- # Best one so far, save it but keep looking for a better one
18730
- ac_cv_path_EGREP="$ac_path_EGREP"
18731
- ac_path_EGREP_max=$ac_count
18732
- fi
18733
- # 10*(2^10) chars as input seems more than enough
18734
- test $ac_count -gt 10 && break
18735
- done
18736
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
18737
- esac
18738
-
18739
- $ac_path_EGREP_found && break 3
18740
- done
18741
- done
18742
- done
18743
- IFS=$as_save_IFS
18744
- if test -z "$ac_cv_path_EGREP"; then
18745
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
18746
- fi
18747
- else
18748
- ac_cv_path_EGREP=$EGREP
18749
- fi
18750
-
18751
- fi
18752
- fi
18753
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
18754
- printf "%s\n" "$ac_cv_path_EGREP" >&6; }
18755
- EGREP="$ac_cv_path_EGREP"
18756
-
18757
-
18758
18712
 
18759
18713
  ac_fn_c_check_func "$LINENO" "memcpy" "ac_cv_func_memcpy"
18760
18714
  if test "x$ac_cv_func_memcpy" = xyes
@@ -19094,24 +19048,32 @@ printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
19094
19048
  esac
19095
19049
 
19096
19050
 
19097
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking assembler .cfi pseudo-op support" >&5
19051
+
19052
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking assembler .cfi pseudo-op support" >&5
19098
19053
  printf %s "checking assembler .cfi pseudo-op support... " >&6; }
19099
19054
  if test ${gcc_cv_as_cfi_pseudo_op+y}
19100
19055
  then :
19101
19056
  printf %s "(cached) " >&6
19102
19057
  else $as_nop
19058
+ ac_ext=c
19059
+ ac_cpp='$CPP $CPPFLAGS'
19060
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19061
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19062
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
19103
19063
 
19104
- gcc_cv_as_cfi_pseudo_op=unknown
19105
19064
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19106
19065
  /* end confdefs.h. */
19107
- asm (".cfi_sections\n\t.cfi_startproc\n\t.cfi_endproc");
19108
- int
19109
- main (void)
19110
- {
19111
19066
 
19112
- ;
19113
- return 0;
19114
- }
19067
+ #ifdef _MSC_VER
19068
+ Nope.
19069
+ #endif
19070
+ int foo (void)
19071
+ {
19072
+ __asm__ (".cfi_remember_state\n\t"
19073
+ ".cfi_restore_state\n\t");
19074
+ return 0;
19075
+ }
19076
+
19115
19077
  _ACEOF
19116
19078
  if ac_fn_c_try_compile "$LINENO"
19117
19079
  then :
@@ -19120,15 +19082,24 @@ else $as_nop
19120
19082
  gcc_cv_as_cfi_pseudo_op=no
19121
19083
  fi
19122
19084
  rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19085
+ ac_ext=c
19086
+ ac_cpp='$CPP $CPPFLAGS'
19087
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19088
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19089
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
19090
+
19123
19091
 
19124
19092
  fi
19125
19093
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_cfi_pseudo_op" >&5
19126
19094
  printf "%s\n" "$gcc_cv_as_cfi_pseudo_op" >&6; }
19127
- if test "x$gcc_cv_as_cfi_pseudo_op" = xyes; then
19095
+
19096
+ if test "x$gcc_cv_as_cfi_pseudo_op" = xyes; then
19128
19097
 
19129
19098
  printf "%s\n" "#define HAVE_AS_CFI_PSEUDO_OP 1" >>confdefs.h
19130
19099
 
19131
- fi
19100
+ fi
19101
+
19102
+
19132
19103
 
19133
19104
 
19134
19105
  case "$TARGET" in
@@ -19261,6 +19232,15 @@ printf "%s\n" "#define HAVE_AS_S390_ZARCH 1" >>confdefs.h
19261
19232
 
19262
19233
  fi
19263
19234
  ;;
19235
+ wasm64)
19236
+ if test -z "$WASM64_MEMORY64"; then
19237
+ WASM64_MEMORY64=1
19238
+ fi
19239
+ CFLAGS="$CFLAGS -sMEMORY64=$WASM64_MEMORY64"
19240
+ ;;
19241
+ LOONGARCH64)
19242
+ CFLAGS="$CFLAGS -mcmodel=medium"
19243
+ ;;
19264
19244
  esac
19265
19245
 
19266
19246
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiler supports pointer authentication" >&5
@@ -19389,7 +19369,7 @@ case "$target" in
19389
19369
  printf "%s\n" "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h
19390
19370
 
19391
19371
  ;;
19392
- *-apple-* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris* | *-linux-android*)
19372
+ *-apple-* | *-*-dragonfly* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris* | *-linux-android*)
19393
19373
 
19394
19374
  printf "%s\n" "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
19395
19375
 
@@ -19446,15 +19426,18 @@ printf "%s\n" "#define HAVE_AS_X86_64_UNWIND_SECTION_TYPE 1" >>confdefs.h
19446
19426
  fi
19447
19427
 
19448
19428
  if test "x$GCC" = "xyes"; then
19449
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-lto" >&5
19450
- printf %s "checking whether C compiler accepts -fno-lto... " >&6; }
19429
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fno-lto" >&5
19430
+ printf %s "checking whether the C compiler accepts -fno-lto... " >&6; }
19451
19431
  if test ${ax_cv_check_cflags___fno_lto+y}
19452
19432
  then :
19453
19433
  printf %s "(cached) " >&6
19454
19434
  else $as_nop
19455
19435
 
19456
19436
  ax_check_save_flags=$CFLAGS
19457
- CFLAGS="$CFLAGS -fno-lto"
19437
+ if test x"$GCC" = xyes ; then
19438
+ add_gnu_werror="-Werror"
19439
+ fi
19440
+ CFLAGS="$CFLAGS -fno-lto $add_gnu_werror"
19458
19441
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19459
19442
  /* end confdefs.h. */
19460
19443
 
@@ -19648,7 +19631,8 @@ printf "%s\n" "#define FFI_EXEC_STATIC_TRAMP 1" >>confdefs.h
19648
19631
  fi
19649
19632
  ;;
19650
19633
  *arm*-*-linux-* | aarch64*-*-linux-* | i*86-*-linux-* | x86_64-*-linux-* \
19651
- | loongarch*-*-linux-* | s390x*-linux-* | powerpc*-linux-*)
19634
+ | loongarch*-*-linux-* | s390x*-linux-* | powerpc*-linux-* \
19635
+ | riscv*-linux-*)
19652
19636
 
19653
19637
  printf "%s\n" "#define FFI_EXEC_STATIC_TRAMP 1" >>confdefs.h
19654
19638
 
@@ -20604,7 +20588,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20604
20588
  # report actual input values of CONFIG_FILES etc. instead of their
20605
20589
  # values after options handling.
20606
20590
  ac_log="
20607
- This file was extended by libffi $as_me 3.4.8, which was
20591
+ This file was extended by libffi $as_me 3.5.2, which was
20608
20592
  generated by GNU Autoconf 2.71. Invocation command line was
20609
20593
 
20610
20594
  CONFIG_FILES = $CONFIG_FILES
@@ -20672,7 +20656,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
20672
20656
  cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20673
20657
  ac_cs_config='$ac_cs_config_escaped'
20674
20658
  ac_cs_version="\\
20675
- libffi config.status 3.4.8
20659
+ libffi config.status 3.5.2
20676
20660
  configured by $0, generated by GNU Autoconf 2.71,
20677
20661
  with options \\"\$ac_cs_config\\"
20678
20662
 
@@ -1,10 +1,15 @@
1
1
  dnl Process this with autoconf to create configure
2
2
 
3
- AC_PREREQ([2.71])
3
+ AC_PREREQ([2.68])
4
4
 
5
- AC_INIT([libffi],[3.4.8],[http://github.com/libffi/libffi/issues])
5
+ AC_INIT([libffi],[3.5.2],[http://github.com/libffi/libffi/issues])
6
6
  AC_CONFIG_HEADERS([fficonfig.h])
7
7
 
8
+ FFI_VERSION_STRING="3.5.2"
9
+ FFI_VERSION_NUMBER=30502
10
+ AC_SUBST(FFI_VERSION_STRING)
11
+ AC_SUBST(FFI_VERSION_NUMBER)
12
+
8
13
  AC_CANONICAL_TARGET
9
14
  target_alias=${target_alias-$host_alias}
10
15
 
@@ -89,10 +94,6 @@ m4_warn([obsolete],
89
94
  [The preprocessor macro `STDC_HEADERS' is obsolete.
90
95
  Except in unusual embedded environments, you can safely include all
91
96
  ISO C90 headers unconditionally.])dnl
92
- # Autoupdate added the next two lines to ensure that your configure
93
- # script's behavior did not change. They are probably safe to remove.
94
- AC_CHECK_INCLUDES_DEFAULT
95
- AC_PROG_EGREP
96
97
 
97
98
  AC_CHECK_FUNCS(memcpy)
98
99
  AC_CHECK_HEADERS(alloca.h)
@@ -122,6 +123,8 @@ AC_C_BIGENDIAN
122
123
 
123
124
  GCC_AS_CFI_PSEUDO_OP
124
125
 
126
+ AC_ARG_VAR([WASM64_MEMORY64], [Used only for the wasm64 target. Set to 1 (default) or 2 for Emscripten's -sMEMORY64 mode])
127
+
125
128
  case "$TARGET" in
126
129
  SPARC)
127
130
  AC_CACHE_CHECK([assembler and linker support unaligned pc related relocs],
@@ -181,6 +184,15 @@ case "$TARGET" in
181
184
  [Define if the compiler uses zarch features.])
182
185
  fi
183
186
  ;;
187
+ wasm64)
188
+ if test -z "$WASM64_MEMORY64"; then
189
+ WASM64_MEMORY64=1
190
+ fi
191
+ CFLAGS="$CFLAGS -sMEMORY64=$WASM64_MEMORY64"
192
+ ;;
193
+ LOONGARCH64)
194
+ CFLAGS="$CFLAGS -mcmodel=medium"
195
+ ;;
184
196
  esac
185
197
 
186
198
  AC_CACHE_CHECK([whether compiler supports pointer authentication],
@@ -229,7 +241,7 @@ case "$target" in
229
241
  [Cannot use PROT_EXEC on this target, so, we revert to
230
242
  alternative means])
231
243
  ;;
232
- *-apple-* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris* | *-linux-android*)
244
+ *-apple-* | *-*-dragonfly* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris* | *-linux-android*)
233
245
  AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1,
234
246
  [Cannot use malloc on this target, so, we revert to
235
247
  alternative means])
@@ -383,7 +395,8 @@ case "$target" in
383
395
  fi
384
396
  ;;
385
397
  *arm*-*-linux-* | aarch64*-*-linux-* | i*86-*-linux-* | x86_64-*-linux-* \
386
- | loongarch*-*-linux-* | s390x*-linux-* | powerpc*-linux-*)
398
+ | loongarch*-*-linux-* | s390x*-linux-* | powerpc*-linux-* \
399
+ | riscv*-linux-*)
387
400
  AC_DEFINE(FFI_EXEC_STATIC_TRAMP, 1,
388
401
  [Define this if you want statically defined trampolines])
389
402
  ;;
@@ -261,7 +261,12 @@ case "${host}" in
261
261
  ;;
262
262
 
263
263
  wasm32-*-*)
264
- TARGET=wasm32; TARGETDIR=wasm32
264
+ TARGET=wasm32; TARGETDIR=wasm
265
+ SOURCES="ffi.c"
266
+ ;;
267
+
268
+ wasm64-*-*)
269
+ TARGET=wasm64; TARGETDIR=wasm
265
270
  SOURCES="ffi.c"
266
271
  ;;
267
272
 
@@ -239,6 +239,8 @@ EGREP = @EGREP@
239
239
  ETAGS = @ETAGS@
240
240
  EXEEXT = @EXEEXT@
241
241
  FFI_EXEC_TRAMPOLINE_TABLE = @FFI_EXEC_TRAMPOLINE_TABLE@
242
+ FFI_VERSION_NUMBER = @FFI_VERSION_NUMBER@
243
+ FFI_VERSION_STRING = @FFI_VERSION_STRING@
242
244
  FGREP = @FGREP@
243
245
  FILECMD = @FILECMD@
244
246
  GREP = @GREP@
@@ -289,6 +291,7 @@ TARGET = @TARGET@
289
291
  TARGETDIR = @TARGETDIR@
290
292
  TARGET_OBJ = @TARGET_OBJ@
291
293
  VERSION = @VERSION@
294
+ WASM64_MEMORY64 = @WASM64_MEMORY64@
292
295
  abs_builddir = @abs_builddir@
293
296
  abs_srcdir = @abs_srcdir@
294
297
  abs_top_builddir = @abs_top_builddir@
@@ -18,7 +18,7 @@
18
18
  This manual is for libffi, a portable foreign function interface
19
19
  library.
20
20
 
21
- Copyright @copyright{} 2008--2024 Anthony Green and Red Hat, Inc.
21
+ Copyright @copyright{} 2008--2025 Anthony Green and Red Hat, Inc.
22
22
 
23
23
  Permission is hereby granted, free of charge, to any person obtaining
24
24
  a copy of this software and associated documentation files (the
@@ -236,6 +236,29 @@ object declared as @code{short}; but if the return type is
236
236
  a larger type -- usually @code{ffi_arg}.
237
237
  @end defun
238
238
 
239
+ @findex ffi_get_version
240
+ @defun {const char *} ffi_get_version (void)
241
+ Returns the library version as a string. This string is also
242
+ available at build time as the macro @code{FFI_VERSION_STRING}.
243
+ @end defun
244
+
245
+ @findex ffi_get_version_number
246
+ @defun {unsigned long} ffi_get_version_number (void)
247
+ Returns the library version as an unsigned long value where
248
+ version ``x.y.z'' is represented as the number x*10000+y*100+z.
249
+ This number is also available at build time as the macro
250
+ @code{FFI_VERSION_NUMBER}.
251
+ @end defun
252
+
253
+ @findex ffi_get_default_abi
254
+ @defun {unsigned int} ffi_get_default_abi (void)
255
+ Return the value of @code{FFI_DEFAULT_ABI}.
256
+ @end defun
257
+
258
+ @findex ffi_get_closure_size
259
+ @defun {size_t} ffi_get_closure_size (void)
260
+ Return @code{sizeof(ffi_closure)}.
261
+ @end defun
239
262
 
240
263
  @node Simple Example
241
264
  @section Simple Example
@@ -1,4 +1,4 @@
1
- @set UPDATED 27 March 2025
2
- @set UPDATED-MONTH March 2025
3
- @set EDITION 3.4.8
4
- @set VERSION 3.4.8
1
+ @set UPDATED 2 August 2025
2
+ @set UPDATED-MONTH August 2025
3
+ @set EDITION 3.5.2
4
+ @set VERSION 3.5.2