ffi 1.16.3 → 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.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +59 -0
  4. data/Gemfile +11 -2
  5. data/README.md +1 -1
  6. data/Rakefile +19 -7
  7. data/ext/ffi_c/AbstractMemory.c +39 -38
  8. data/ext/ffi_c/ArrayType.c +2 -2
  9. data/ext/ffi_c/Buffer.c +4 -4
  10. data/ext/ffi_c/Call.c +12 -6
  11. data/ext/ffi_c/Call.h +3 -2
  12. data/ext/ffi_c/DynamicLibrary.c +2 -2
  13. data/ext/ffi_c/Function.c +52 -34
  14. data/ext/ffi_c/FunctionInfo.c +1 -1
  15. data/ext/ffi_c/LastError.c +4 -4
  16. data/ext/ffi_c/MemoryPointer.c +2 -2
  17. data/ext/ffi_c/Pointer.c +14 -11
  18. data/ext/ffi_c/Struct.c +11 -4
  19. data/ext/ffi_c/StructLayout.c +13 -13
  20. data/ext/ffi_c/Type.c +17 -16
  21. data/ext/ffi_c/Types.c +7 -1
  22. data/ext/ffi_c/Types.h +0 -1
  23. data/ext/ffi_c/Variadic.c +6 -3
  24. data/ext/ffi_c/libffi/.allow-ai-service +0 -0
  25. data/ext/ffi_c/libffi/.github/workflows/build.yml +34 -15
  26. data/ext/ffi_c/libffi/.github/workflows/emscripten.yml +50 -61
  27. data/ext/ffi_c/libffi/LICENSE +1 -1
  28. data/ext/ffi_c/libffi/Makefile.am +4 -3
  29. data/ext/ffi_c/libffi/Makefile.in +5 -25
  30. data/ext/ffi_c/libffi/README.md +28 -6
  31. data/ext/ffi_c/libffi/acinclude.m4 +6 -0
  32. data/ext/ffi_c/libffi/config.guess +80 -22
  33. data/ext/ffi_c/libffi/config.sub +161 -80
  34. data/ext/ffi_c/libffi/configure +46 -30
  35. data/ext/ffi_c/libffi/configure.ac +10 -9
  36. data/ext/ffi_c/libffi/configure.host +1 -6
  37. data/ext/ffi_c/libffi/doc/Makefile.in +1 -0
  38. data/ext/ffi_c/libffi/doc/libffi.texi +4 -4
  39. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  40. data/ext/ffi_c/libffi/fficonfig.h.in +3 -3
  41. data/ext/ffi_c/libffi/include/Makefile.in +1 -0
  42. data/ext/ffi_c/libffi/include/ffi.h.in +2 -11
  43. data/ext/ffi_c/libffi/include/ffi_cfi.h +2 -0
  44. data/ext/ffi_c/libffi/include/ffi_common.h +21 -2
  45. data/ext/ffi_c/libffi/libffi.map.in +5 -0
  46. data/ext/ffi_c/libffi/libtool-version +1 -1
  47. data/ext/ffi_c/libffi/ltmain.sh +8 -20
  48. data/ext/ffi_c/libffi/man/Makefile.in +1 -0
  49. data/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/ffi.h +1 -1
  50. data/ext/ffi_c/libffi/src/aarch64/ffi.c +33 -17
  51. data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +2 -2
  52. data/ext/ffi_c/libffi/src/aarch64/internal.h +63 -17
  53. data/ext/ffi_c/libffi/src/aarch64/sysv.S +213 -57
  54. data/ext/ffi_c/libffi/src/arc/arcompact.S +2 -2
  55. data/ext/ffi_c/libffi/src/arc/ffi.c +6 -2
  56. data/ext/ffi_c/libffi/src/closures.c +6 -6
  57. data/ext/ffi_c/libffi/src/debug.c +2 -2
  58. data/ext/ffi_c/libffi/src/dlmalloc.c +2 -1
  59. data/ext/ffi_c/libffi/src/loongarch64/ffi.c +3 -0
  60. data/ext/ffi_c/libffi/src/mips/ffi.c +12 -4
  61. data/ext/ffi_c/libffi/src/mips/ffitarget.h +2 -4
  62. data/ext/ffi_c/libffi/src/mips/n32.S +69 -14
  63. data/ext/ffi_c/libffi/src/mips/o32.S +4 -0
  64. data/ext/ffi_c/libffi/src/or1k/ffi.c +2 -2
  65. data/ext/ffi_c/libffi/src/powerpc/ffi.c +13 -0
  66. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +36 -24
  67. data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +26 -19
  68. data/ext/ffi_c/libffi/src/powerpc/ffi_sysv.c +26 -16
  69. data/ext/ffi_c/libffi/src/powerpc/internal.h +10 -0
  70. data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +47 -0
  71. data/ext/ffi_c/libffi/src/powerpc/ppc_closure.S +24 -0
  72. data/ext/ffi_c/libffi/src/prep_cif.c +1 -4
  73. data/ext/ffi_c/libffi/src/s390/ffi.c +28 -1
  74. data/ext/ffi_c/libffi/src/s390/internal.h +11 -0
  75. data/ext/ffi_c/libffi/src/s390/sysv.S +38 -0
  76. data/ext/ffi_c/libffi/src/sparc/ffi.c +16 -0
  77. data/ext/ffi_c/libffi/src/sparc/ffi64.c +7 -1
  78. data/ext/ffi_c/libffi/src/tramp.c +1 -1
  79. data/ext/ffi_c/libffi/src/types.c +4 -6
  80. data/ext/ffi_c/libffi/src/wasm32/ffi.c +23 -262
  81. data/ext/ffi_c/libffi/src/x86/ffi.c +4 -1
  82. data/ext/ffi_c/libffi/src/x86/ffi64.c +4 -1
  83. data/ext/ffi_c/libffi/src/x86/ffiw64.c +1 -1
  84. data/ext/ffi_c/libffi/testsuite/Makefile.am +80 -127
  85. data/ext/ffi_c/libffi/testsuite/Makefile.in +81 -127
  86. data/ext/ffi_c/libffi/testsuite/emscripten/build-tests.sh +4 -24
  87. data/ext/ffi_c/libffi/testsuite/emscripten/build.sh +8 -25
  88. data/ext/ffi_c/libffi/testsuite/emscripten/conftest.py +6 -0
  89. data/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh +3 -28
  90. data/ext/ffi_c/libffi/testsuite/libffi.call/callback.c +99 -0
  91. data/ext/ffi_c/libffi/testsuite/libffi.call/callback2.c +108 -0
  92. data/ext/ffi_c/libffi/testsuite/libffi.call/callback3.c +114 -0
  93. data/ext/ffi_c/libffi/testsuite/libffi.call/callback4.c +119 -0
  94. data/ext/ffi_c/libffi/testsuite/libffi.call/overread.c +54 -0
  95. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_int_float.c +88 -0
  96. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +1 -0
  97. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +1 -0
  98. data/ext/ffi_c/libffi/testsuite/libffi.call/x32.c +31 -0
  99. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshortchar.c +1 -1
  100. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushortchar.c +1 -1
  101. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_int.c +1 -1
  102. data/ext/ffi_c/libffi.darwin.mk +2 -2
  103. data/lib/ffi/autopointer.rb +1 -9
  104. data/lib/ffi/dynamic_library.rb +34 -5
  105. data/lib/ffi/enum.rb +0 -1
  106. data/lib/ffi/ffi.rb +59 -0
  107. data/lib/ffi/function.rb +1 -1
  108. data/lib/ffi/io.rb +2 -2
  109. data/lib/ffi/library.rb +23 -23
  110. data/lib/ffi/platform/aarch64-linux/types.conf +74 -3
  111. data/lib/ffi/pointer.rb +6 -6
  112. data/lib/ffi/struct.rb +4 -4
  113. data/lib/ffi/struct_layout.rb +2 -2
  114. data/lib/ffi/struct_layout_builder.rb +8 -8
  115. data/lib/ffi/types.rb +51 -49
  116. data/lib/ffi/version.rb +1 -1
  117. data/sig/ffi/abstract_memory.rbs +165 -0
  118. data/sig/ffi/auto_pointer.rbs +26 -0
  119. data/sig/ffi/buffer.rbs +18 -0
  120. data/sig/ffi/data_converter.rbs +10 -0
  121. data/sig/ffi/dynamic_library.rbs +9 -0
  122. data/sig/ffi/enum.rbs +38 -0
  123. data/sig/ffi/function.rbs +39 -0
  124. data/sig/ffi/library.rbs +42 -0
  125. data/sig/ffi/native_type.rbs +86 -0
  126. data/sig/ffi/pointer.rbs +42 -0
  127. data/sig/ffi/struct.rbs +76 -0
  128. data/sig/ffi/struct_by_reference.rbs +11 -0
  129. data/sig/ffi/struct_by_value.rbs +7 -0
  130. data/sig/ffi/struct_layout.rbs +9 -0
  131. data/sig/ffi/struct_layout_builder.rbs +5 -0
  132. data/sig/ffi/type.rbs +39 -0
  133. data/sig/ffi.rbs +26 -0
  134. data.tar.gz.sig +0 -0
  135. metadata +41 -22
  136. metadata.gz.sig +0 -0
  137. data/ext/ffi_c/libffi/.circleci/config.yml +0 -156
  138. data/ext/ffi_c/libffi/src/nios2/ffi.c +0 -304
  139. data/ext/ffi_c/libffi/src/nios2/ffitarget.h +0 -52
  140. data/ext/ffi_c/libffi/src/nios2/sysv.S +0 -136
@@ -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.4.
3
+ # Generated by GNU Autoconf 2.71 for libffi 3.4.8.
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.4'
625
- PACKAGE_STRING='libffi 3.4.4'
624
+ PACKAGE_VERSION='3.4.8'
625
+ PACKAGE_STRING='libffi 3.4.8'
626
626
  PACKAGE_BUGREPORT='http://github.com/libffi/libffi/issues'
627
627
  PACKAGE_URL=''
628
628
 
@@ -694,6 +694,7 @@ MAINT
694
694
  MAINTAINER_MODE_FALSE
695
695
  MAINTAINER_MODE_TRUE
696
696
  PRTDIAG
697
+ ac_ct_READELF
697
698
  READELF
698
699
  CXXCPP
699
700
  LT_SYS_LIBRARY_PATH
@@ -1412,7 +1413,7 @@ if test "$ac_init_help" = "long"; then
1412
1413
  # Omit some internal or obsolete options to make the list less imposing.
1413
1414
  # This message is too long to be a string in the A/UX 3.1 sh.
1414
1415
  cat <<_ACEOF
1415
- \`configure' configures libffi 3.4.4 to adapt to many kinds of systems.
1416
+ \`configure' configures libffi 3.4.8 to adapt to many kinds of systems.
1416
1417
 
1417
1418
  Usage: $0 [OPTION]... [VAR=VALUE]...
1418
1419
 
@@ -1484,7 +1485,7 @@ fi
1484
1485
 
1485
1486
  if test -n "$ac_init_help"; then
1486
1487
  case $ac_init_help in
1487
- short | recursive ) echo "Configuration of libffi 3.4.4:";;
1488
+ short | recursive ) echo "Configuration of libffi 3.4.8:";;
1488
1489
  esac
1489
1490
  cat <<\_ACEOF
1490
1491
 
@@ -1620,7 +1621,7 @@ fi
1620
1621
  test -n "$ac_init_help" && exit $ac_status
1621
1622
  if $ac_init_version; then
1622
1623
  cat <<\_ACEOF
1623
- libffi configure 3.4.4
1624
+ libffi configure 3.4.8
1624
1625
  generated by GNU Autoconf 2.71
1625
1626
 
1626
1627
  Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2194,7 +2195,7 @@ cat >config.log <<_ACEOF
2194
2195
  This file contains any messages produced by compilers while
2195
2196
  running configure, to aid debugging if configure makes a mistake.
2196
2197
 
2197
- It was created by libffi $as_me 3.4.4, which was
2198
+ It was created by libffi $as_me 3.4.8, which was
2198
2199
  generated by GNU Autoconf 2.71. Invocation command line was
2199
2200
 
2200
2201
  $ $0$ac_configure_args_raw
@@ -3913,7 +3914,7 @@ fi
3913
3914
 
3914
3915
  # Define the identity of the package.
3915
3916
  PACKAGE='libffi'
3916
- VERSION='3.4.4'
3917
+ VERSION='3.4.8'
3917
3918
 
3918
3919
 
3919
3920
  printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -5556,11 +5557,11 @@ if test x$ac_prog_cxx_stdcxx = xno
5556
5557
  then :
5557
5558
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
5558
5559
  printf %s "checking for $CXX option to enable C++11 features... " >&6; }
5559
- if test ${ac_cv_prog_cxx_11+y}
5560
+ if test ${ac_cv_prog_cxx_cxx11+y}
5560
5561
  then :
5561
5562
  printf %s "(cached) " >&6
5562
5563
  else $as_nop
5563
- ac_cv_prog_cxx_11=no
5564
+ ac_cv_prog_cxx_cxx11=no
5564
5565
  ac_save_CXX=$CXX
5565
5566
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5566
5567
  /* end confdefs.h. */
@@ -5602,11 +5603,11 @@ if test x$ac_prog_cxx_stdcxx = xno
5602
5603
  then :
5603
5604
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
5604
5605
  printf %s "checking for $CXX option to enable C++98 features... " >&6; }
5605
- if test ${ac_cv_prog_cxx_98+y}
5606
+ if test ${ac_cv_prog_cxx_cxx98+y}
5606
5607
  then :
5607
5608
  printf %s "(cached) " >&6
5608
5609
  else $as_nop
5609
- ac_cv_prog_cxx_98=no
5610
+ ac_cv_prog_cxx_cxx98=no
5610
5611
  ac_save_CXX=$CXX
5611
5612
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5612
5613
  /* end confdefs.h. */
@@ -17377,8 +17378,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
17377
17378
 
17378
17379
 
17379
17380
  if test -n "$ac_tool_prefix"; then
17380
- # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
17381
- set dummy ${ac_tool_prefix}readelf; ac_word=$2
17381
+ for ac_prog in readelf greadelf
17382
+ do
17383
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
17384
+ set dummy $ac_tool_prefix$ac_prog; ac_word=$2
17382
17385
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17383
17386
  printf %s "checking for $ac_word... " >&6; }
17384
17387
  if test ${ac_cv_prog_READELF+y}
@@ -17399,7 +17402,7 @@ do
17399
17402
  esac
17400
17403
  for ac_exec_ext in '' $ac_executable_extensions; do
17401
17404
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
17402
- ac_cv_prog_READELF="${ac_tool_prefix}readelf"
17405
+ ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
17403
17406
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
17404
17407
  break 2
17405
17408
  fi
@@ -17419,11 +17422,15 @@ printf "%s\n" "no" >&6; }
17419
17422
  fi
17420
17423
 
17421
17424
 
17425
+ test -n "$READELF" && break
17426
+ done
17422
17427
  fi
17423
- if test -z "$ac_cv_prog_READELF"; then
17428
+ if test -z "$READELF"; then
17424
17429
  ac_ct_READELF=$READELF
17425
- # Extract the first word of "readelf", so it can be a program name with args.
17426
- set dummy readelf; ac_word=$2
17430
+ for ac_prog in readelf greadelf
17431
+ do
17432
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
17433
+ set dummy $ac_prog; ac_word=$2
17427
17434
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17428
17435
  printf %s "checking for $ac_word... " >&6; }
17429
17436
  if test ${ac_cv_prog_ac_ct_READELF+y}
@@ -17444,7 +17451,7 @@ do
17444
17451
  esac
17445
17452
  for ac_exec_ext in '' $ac_executable_extensions; do
17446
17453
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
17447
- ac_cv_prog_ac_ct_READELF="readelf"
17454
+ ac_cv_prog_ac_ct_READELF="$ac_prog"
17448
17455
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
17449
17456
  break 2
17450
17457
  fi
@@ -17463,6 +17470,10 @@ else
17463
17470
  printf "%s\n" "no" >&6; }
17464
17471
  fi
17465
17472
 
17473
+
17474
+ test -n "$ac_ct_READELF" && break
17475
+ done
17476
+
17466
17477
  if test "x$ac_ct_READELF" = x; then
17467
17478
  READELF=""
17468
17479
  else
@@ -17474,8 +17485,6 @@ ac_tool_warned=yes ;;
17474
17485
  esac
17475
17486
  READELF=$ac_ct_READELF
17476
17487
  fi
17477
- else
17478
- READELF="$ac_cv_prog_READELF"
17479
17488
  fi
17480
17489
 
17481
17490
 
@@ -19238,7 +19247,7 @@ else $as_nop
19238
19247
  libffi_cv_as_s390_zarch=no
19239
19248
  echo 'void foo(void) { bar(); bar(); }' > conftest.c
19240
19249
  if $CC $CFLAGS -S conftest.c > /dev/null 2>&1; then
19241
- if grep -q brasl conftest.s; then
19250
+ if $GREP -q brasl conftest.s; then
19242
19251
  libffi_cv_as_s390_zarch=yes
19243
19252
  fi
19244
19253
  fi
@@ -19271,11 +19280,11 @@ main (void)
19271
19280
 
19272
19281
  #ifdef __clang__
19273
19282
  # if __has_feature(ptrauth_calls)
19274
- # define HAVE_PTRAUTH 1
19283
+ # define HAVE_ARM64E_PTRAUTH 1
19275
19284
  # endif
19276
19285
  #endif
19277
19286
 
19278
- #ifndef HAVE_PTRAUTH
19287
+ #ifndef HAVE_ARM64E_PTRAUTH
19279
19288
  # error Pointer authentication not supported
19280
19289
  #endif
19281
19290
 
@@ -19296,7 +19305,7 @@ fi
19296
19305
  printf "%s\n" "$libffi_cv_as_ptrauth" >&6; }
19297
19306
  if test "x$libffi_cv_as_ptrauth" = xyes; then
19298
19307
 
19299
- printf "%s\n" "#define HAVE_PTRAUTH 1" >>confdefs.h
19308
+ printf "%s\n" "#define HAVE_ARM64E_PTRAUTH 1" >>confdefs.h
19300
19309
 
19301
19310
  fi
19302
19311
 
@@ -19486,7 +19495,7 @@ else $as_nop
19486
19495
  libffi_cv_ro_eh_frame=yes
19487
19496
  echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
19488
19497
  if $CC $CFLAGS -c -fpic -fexceptions $libffi_cv_no_lto -o conftest.o conftest.c > /dev/null 2>&1; then
19489
- if $READELF -WS conftest.o 2>/dev/null | grep -q -n 'eh_frame .* WA'; then
19498
+ if $READELF -WS conftest.o 2>/dev/null | $GREP -q -n 'eh_frame .* WA'; then
19490
19499
  libffi_cv_ro_eh_frame=no
19491
19500
  fi
19492
19501
  fi
@@ -19523,7 +19532,7 @@ else $as_nop
19523
19532
  ac_status=$?
19524
19533
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19525
19534
  test $ac_status = 0; }; }; then
19526
- if $EGREP '(\.hidden|\.private_extern).*foo' conftest.s >/dev/null; then
19535
+ if $EGREP '(\.hidden|\.private_extern).*foo|foo.*,hidden' conftest.s >/dev/null; then
19527
19536
  libffi_cv_hidden_visibility_attribute=yes
19528
19537
  fi
19529
19538
  fi
@@ -19638,7 +19647,8 @@ printf "%s\n" "#define FFI_EXEC_STATIC_TRAMP 1" >>confdefs.h
19638
19647
 
19639
19648
  fi
19640
19649
  ;;
19641
- *arm*-*-linux-* | aarch64*-*-linux-* | i*86-*-linux-* | x86_64-*-linux-* | loongarch*-*-linux-*)
19650
+ *arm*-*-linux-* | aarch64*-*-linux-* | i*86-*-linux-* | x86_64-*-linux-* \
19651
+ | loongarch*-*-linux-* | s390x*-linux-* | powerpc*-linux-*)
19642
19652
 
19643
19653
  printf "%s\n" "#define FFI_EXEC_STATIC_TRAMP 1" >>confdefs.h
19644
19654
 
@@ -19733,6 +19743,10 @@ tmake_file="${tmake_file_}"
19733
19743
  if $LD --version 2>/dev/null | grep 'LLD '> /dev/null 2>&1; then
19734
19744
  libat_ld_is_lld=yes
19735
19745
  fi
19746
+ libat_ld_is_mold=no
19747
+ if $LD --version 2>/dev/null | grep 'mold '> /dev/null 2>&1; then
19748
+ libat_ld_is_mold=yes
19749
+ fi
19736
19750
 
19737
19751
  ldver=`$LD --version 2>/dev/null |
19738
19752
  sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'`
@@ -19941,6 +19955,8 @@ if test $enable_symvers != no && test $libat_shared_libgcc = yes; then
19941
19955
  enable_symvers=gnu
19942
19956
  elif test $libat_ld_is_lld = yes ; then
19943
19957
  enable_symvers=gnu
19958
+ elif test $libat_ld_is_mold = yes ; then
19959
+ enable_symvers=gnu
19944
19960
  else
19945
19961
  # The right tools, the right setup, but too old. Fallbacks?
19946
19962
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: === Linker version $libat_gnu_ld_version is too old for" >&5
@@ -20588,7 +20604,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20588
20604
  # report actual input values of CONFIG_FILES etc. instead of their
20589
20605
  # values after options handling.
20590
20606
  ac_log="
20591
- This file was extended by libffi $as_me 3.4.4, which was
20607
+ This file was extended by libffi $as_me 3.4.8, which was
20592
20608
  generated by GNU Autoconf 2.71. Invocation command line was
20593
20609
 
20594
20610
  CONFIG_FILES = $CONFIG_FILES
@@ -20656,7 +20672,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
20656
20672
  cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20657
20673
  ac_cs_config='$ac_cs_config_escaped'
20658
20674
  ac_cs_version="\\
20659
- libffi config.status 3.4.4
20675
+ libffi config.status 3.4.8
20660
20676
  configured by $0, generated by GNU Autoconf 2.71,
20661
20677
  with options \\"\$ac_cs_config\\"
20662
20678
 
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
2
2
 
3
3
  AC_PREREQ([2.71])
4
4
 
5
- AC_INIT([libffi],[3.4.4],[http://github.com/libffi/libffi/issues])
5
+ AC_INIT([libffi],[3.4.8],[http://github.com/libffi/libffi/issues])
6
6
  AC_CONFIG_HEADERS([fficonfig.h])
7
7
 
8
8
  AC_CANONICAL_TARGET
@@ -42,7 +42,7 @@ AC_PROG_EGREP
42
42
  LT_INIT
43
43
  AC_CONFIG_MACRO_DIR([m4])
44
44
 
45
- AC_CHECK_TOOL(READELF, readelf)
45
+ AC_CHECK_TOOLS([READELF], [readelf greadelf])
46
46
 
47
47
  # Test for 64-bit build.
48
48
  AC_CHECK_SIZEOF([size_t])
@@ -171,7 +171,7 @@ case "$TARGET" in
171
171
  libffi_cv_as_s390_zarch=no
172
172
  echo 'void foo(void) { bar(); bar(); }' > conftest.c
173
173
  if $CC $CFLAGS -S conftest.c > /dev/null 2>&1; then
174
- if grep -q brasl conftest.s; then
174
+ if $GREP -q brasl conftest.s; then
175
175
  libffi_cv_as_s390_zarch=yes
176
176
  fi
177
177
  fi
@@ -189,17 +189,17 @@ AC_CACHE_CHECK([whether compiler supports pointer authentication],
189
189
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
190
190
  #ifdef __clang__
191
191
  # if __has_feature(ptrauth_calls)
192
- # define HAVE_PTRAUTH 1
192
+ # define HAVE_ARM64E_PTRAUTH 1
193
193
  # endif
194
194
  #endif
195
195
 
196
- #ifndef HAVE_PTRAUTH
196
+ #ifndef HAVE_ARM64E_PTRAUTH
197
197
  # error Pointer authentication not supported
198
198
  #endif
199
199
  ]])],[libffi_cv_as_ptrauth=yes],[libffi_cv_as_ptrauth=no])
200
200
  ])
201
201
  if test "x$libffi_cv_as_ptrauth" = xyes; then
202
- AC_DEFINE(HAVE_PTRAUTH, 1,
202
+ AC_DEFINE(HAVE_ARM64E_PTRAUTH, 1,
203
203
  [Define if your compiler supports pointer authentication.])
204
204
  fi
205
205
 
@@ -277,7 +277,7 @@ if test "x$GCC" = "xyes"; then
277
277
  libffi_cv_ro_eh_frame=yes
278
278
  echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
279
279
  if $CC $CFLAGS -c -fpic -fexceptions $libffi_cv_no_lto -o conftest.o conftest.c > /dev/null 2>&1; then
280
- if $READELF -WS conftest.o 2>/dev/null | grep -q -n 'eh_frame .* WA'; then
280
+ if $READELF -WS conftest.o 2>/dev/null | $GREP -q -n 'eh_frame .* WA'; then
281
281
  libffi_cv_ro_eh_frame=no
282
282
  fi
283
283
  fi
@@ -298,7 +298,7 @@ if test "x$GCC" = "xyes"; then
298
298
  echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1 ; }' > conftest.c
299
299
  libffi_cv_hidden_visibility_attribute=no
300
300
  if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
301
- if $EGREP '(\.hidden|\.private_extern).*foo' conftest.s >/dev/null; then
301
+ if $EGREP '(\.hidden|\.private_extern).*foo|foo.*,hidden' conftest.s >/dev/null; then
302
302
  libffi_cv_hidden_visibility_attribute=yes
303
303
  fi
304
304
  fi
@@ -382,7 +382,8 @@ case "$target" in
382
382
  [Define this if you want statically defined trampolines])
383
383
  fi
384
384
  ;;
385
- *arm*-*-linux-* | aarch64*-*-linux-* | i*86-*-linux-* | x86_64-*-linux-* | loongarch*-*-linux-*)
385
+ *arm*-*-linux-* | aarch64*-*-linux-* | i*86-*-linux-* | x86_64-*-linux-* \
386
+ | loongarch*-*-linux-* | s390x*-linux-* | powerpc*-linux-*)
386
387
  AC_DEFINE(FFI_EXEC_STATIC_TRAMP, 1,
387
388
  [Define this if you want statically defined trampolines])
388
389
  ;;
@@ -185,11 +185,6 @@ case "${host}" in
185
185
  TARGET=MIPS; TARGETDIR=mips
186
186
  ;;
187
187
 
188
- nios2*-linux*)
189
- TARGET=NIOS2; TARGETDIR=nios2
190
- SOURCES="ffi.c sysv.S"
191
- ;;
192
-
193
188
  or1k*-*-*)
194
189
  TARGET=OR1K; TARGETDIR=or1k
195
190
  SOURCES="ffi.c sysv.S"
@@ -205,7 +200,7 @@ case "${host}" in
205
200
  powerpc-*-eabi*)
206
201
  TARGET=POWERPC; TARGETDIR=powerpc
207
202
  ;;
208
- powerpc-*-beos*)
203
+ powerpc-*-beos* | powerpc-*-haiku*)
209
204
  TARGET=POWERPC; TARGETDIR=powerpc
210
205
  ;;
211
206
  powerpc-*-darwin* | powerpc64-*-darwin*)
@@ -297,6 +297,7 @@ ac_ct_AR = @ac_ct_AR@
297
297
  ac_ct_CC = @ac_ct_CC@
298
298
  ac_ct_CXX = @ac_ct_CXX@
299
299
  ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
300
+ ac_ct_READELF = @ac_ct_READELF@
300
301
  am__include = @am__include@
301
302
  am__leading_dot = @am__leading_dot@
302
303
  am__quote = @am__quote@
@@ -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--2019, 2021, 2022 Anthony Green and Red Hat, Inc.
21
+ Copyright @copyright{} 2008--2024 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
@@ -263,14 +263,14 @@ int main()
263
263
  &ffi_type_sint, args) == FFI_OK)
264
264
  @{
265
265
  s = "Hello World!";
266
- ffi_call(&cif, puts, &rc, values);
266
+ ffi_call(&cif, (void(*)())puts, &rc, values);
267
267
  /* rc now holds the result of the call to puts */
268
268
 
269
269
  /* values holds a pointer to the function's arg, so to
270
270
  call puts() again all we need to do is change the
271
271
  value of s */
272
272
  s = "This is cool!";
273
- ffi_call(&cif, puts, &rc, values);
273
+ ffi_call(&cif, (void(*)())puts, &rc, values);
274
274
  @}
275
275
 
276
276
  return 0;
@@ -627,7 +627,7 @@ Here is the corresponding code to describe this struct to
627
627
 
628
628
  tm_type.size = tm_type.alignment = 0;
629
629
  tm_type.type = FFI_TYPE_STRUCT;
630
- tm_type.elements = &tm_type_elements;
630
+ tm_type.elements = tm_type_elements;
631
631
 
632
632
  for (i = 0; i < 9; i++)
633
633
  tm_type_elements[i] = &ffi_type_sint;
@@ -1,4 +1,4 @@
1
- @set UPDATED 23 October 2022
2
- @set UPDATED-MONTH October 2022
3
- @set EDITION 3.4.4
4
- @set VERSION 3.4.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
@@ -31,6 +31,9 @@
31
31
  /* Define to 1 if you have the <alloca.h> header file. */
32
32
  #undef HAVE_ALLOCA_H
33
33
 
34
+ /* Define if your compiler supports pointer authentication. */
35
+ #undef HAVE_ARM64E_PTRAUTH
36
+
34
37
  /* Define if your assembler supports .cfi_* directives. */
35
38
  #undef HAVE_AS_CFI_PSEUDO_OP
36
39
 
@@ -71,9 +74,6 @@
71
74
  /* Define to 1 if you have the `memfd_create' function. */
72
75
  #undef HAVE_MEMFD_CREATE
73
76
 
74
- /* Define if your compiler supports pointer authentication. */
75
- #undef HAVE_PTRAUTH
76
-
77
77
  /* Define if .eh_frame sections should be read-only. */
78
78
  #undef HAVE_RO_EH_FRAME
79
79
 
@@ -275,6 +275,7 @@ ac_ct_AR = @ac_ct_AR@
275
275
  ac_ct_CC = @ac_ct_CC@
276
276
  ac_ct_CXX = @ac_ct_CXX@
277
277
  ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
278
+ ac_ct_READELF = @ac_ct_READELF@
278
279
  am__include = @am__include@
279
280
  am__leading_dot = @am__leading_dot@
280
281
  am__quote = @am__quote@
@@ -1,6 +1,6 @@
1
1
  /* -----------------------------------------------------------------*-C-*-
2
2
  libffi @VERSION@
3
- - Copyright (c) 2011, 2014, 2019, 2021, 2022 Anthony Green
3
+ - Copyright (c) 2011, 2014, 2019, 2021, 2022, 2024 Anthony Green
4
4
  - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person
@@ -220,21 +220,12 @@ FFI_EXTERN ffi_type ffi_type_sint64;
220
220
  FFI_EXTERN ffi_type ffi_type_float;
221
221
  FFI_EXTERN ffi_type ffi_type_double;
222
222
  FFI_EXTERN ffi_type ffi_type_pointer;
223
-
224
- #if @HAVE_LONG_DOUBLE@
225
223
  FFI_EXTERN ffi_type ffi_type_longdouble;
226
- #else
227
- #define ffi_type_longdouble ffi_type_double
228
- #endif
229
224
 
230
225
  #ifdef FFI_TARGET_HAS_COMPLEX_TYPE
231
226
  FFI_EXTERN ffi_type ffi_type_complex_float;
232
227
  FFI_EXTERN ffi_type ffi_type_complex_double;
233
- #if @HAVE_LONG_DOUBLE@
234
228
  FFI_EXTERN ffi_type ffi_type_complex_longdouble;
235
- #else
236
- #define ffi_type_complex_longdouble ffi_type_complex_double
237
- #endif
238
229
  #endif
239
230
  #endif /* LIBFFI_HIDE_BASIC_TYPES */
240
231
 
@@ -464,7 +455,7 @@ ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
464
455
 
465
456
  #endif /* FFI_CLOSURES */
466
457
 
467
- #if FFI_GO_CLOSURES
458
+ #ifdef FFI_GO_CLOSURES
468
459
 
469
460
  typedef struct {
470
461
  void *tramp;
@@ -49,6 +49,7 @@
49
49
  # define cfi_personality(enc, exp) .cfi_personality enc, exp
50
50
  # define cfi_lsda(enc, exp) .cfi_lsda enc, exp
51
51
  # define cfi_escape(...) .cfi_escape __VA_ARGS__
52
+ # define cfi_window_save .cfi_window_save
52
53
 
53
54
  #else
54
55
 
@@ -71,6 +72,7 @@
71
72
  # define cfi_personality(enc, exp)
72
73
  # define cfi_lsda(enc, exp)
73
74
  # define cfi_escape(...)
75
+ # define cfi_window_save
74
76
 
75
77
  #endif /* HAVE_AS_CFI_PSEUDO_OP */
76
78
  #endif /* FFI_CFI_H */
@@ -49,8 +49,10 @@ extern "C" {
49
49
  # endif
50
50
  # endif
51
51
  # define MAYBE_UNUSED __attribute__((__unused__))
52
+ # define NORETURN __attribute__((__noreturn__))
52
53
  #else
53
54
  # define MAYBE_UNUSED
55
+ # define NORETURN
54
56
  # if HAVE_ALLOCA_H
55
57
  # include <alloca.h>
56
58
  # else
@@ -81,10 +83,27 @@ char *alloca ();
81
83
  #include <stdio.h>
82
84
  #endif
83
85
 
86
+ #ifndef __SANITIZE_ADDRESS__
87
+ # ifdef __clang__
88
+ # if __has_feature(address_sanitizer)
89
+ # define FFI_ASAN
90
+ # endif
91
+ # endif
92
+ #endif
93
+ #ifdef __SANITIZE_ADDRESS__
94
+ #define FFI_ASAN
95
+ #endif
96
+
97
+ #ifdef FFI_ASAN
98
+ #define FFI_ASAN_NO_SANITIZE __attribute__((no_sanitize_address))
99
+ #else
100
+ #define FFI_ASAN_NO_SANITIZE
101
+ #endif
102
+
84
103
  #ifdef FFI_DEBUG
85
- void ffi_assert(char *expr, char *file, int line);
104
+ NORETURN void ffi_assert(const char *expr, const char *file, int line);
86
105
  void ffi_stop_here(void);
87
- void ffi_type_test(ffi_type *a, char *file, int line);
106
+ void ffi_type_test(ffi_type *a, const char *file, int line);
88
107
 
89
108
  #define FFI_ASSERT(x) ((x) ? (void)0 : ffi_assert(#x, __FILE__,__LINE__))
90
109
  #define FFI_ASSERT_AT(x, f, l) ((x) ? 0 : ffi_assert(#x, (f), (l)))
@@ -33,7 +33,10 @@ LIBFFI_BASE_8.0 {
33
33
  ffi_raw_to_ptrarray;
34
34
  ffi_raw_size;
35
35
 
36
+ #if !FFI_NATIVE_RAW_API
36
37
  ffi_java_raw_call;
38
+ #endif
39
+
37
40
  ffi_java_ptrarray_to_raw;
38
41
  ffi_java_raw_to_ptrarray;
39
42
  ffi_java_raw_size;
@@ -62,8 +65,10 @@ LIBFFI_CLOSURE_8.0 {
62
65
  ffi_prep_closure_loc;
63
66
  ffi_prep_raw_closure;
64
67
  ffi_prep_raw_closure_loc;
68
+ #if !FFI_NATIVE_RAW_API
65
69
  ffi_prep_java_raw_closure;
66
70
  ffi_prep_java_raw_closure_loc;
71
+ #endif
67
72
  } LIBFFI_BASE_8.0;
68
73
  #endif
69
74
 
@@ -26,4 +26,4 @@
26
26
  # release, then set age to 0.
27
27
  #
28
28
  # CURRENT:REVISION:AGE
29
- 9:2:1
29
+ 9:4:1
@@ -31,7 +31,7 @@
31
31
 
32
32
  PROGRAM=libtool
33
33
  PACKAGE=libtool
34
- VERSION="2.4.7 Debian-2.4.7-5"
34
+ VERSION="2.4.7 Debian-2.4.7-7build1"
35
35
  package_revision=2.4.7
36
36
 
37
37
 
@@ -572,27 +572,15 @@ func_require_term_colors ()
572
572
  # ---------------------
573
573
  # Append VALUE onto the existing contents of VAR.
574
574
 
575
- # We should try to minimise forks, especially on Windows where they are
576
- # unreasonably slow, so skip the feature probes when bash or zsh are
577
- # being used:
578
- if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
579
- : ${_G_HAVE_ARITH_OP="yes"}
580
- : ${_G_HAVE_XSI_OPS="yes"}
581
- # The += operator was introduced in bash 3.1
582
- case $BASH_VERSION in
583
- [12].* | 3.0 | 3.0*) ;;
584
- *)
585
- : ${_G_HAVE_PLUSEQ_OP="yes"}
586
- ;;
587
- esac
588
- fi
589
-
590
575
  # _G_HAVE_PLUSEQ_OP
591
576
  # Can be empty, in which case the shell is probed, "yes" if += is
592
577
  # useable or anything else if it does not work.
593
- test -z "$_G_HAVE_PLUSEQ_OP" \
594
- && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
595
- && _G_HAVE_PLUSEQ_OP=yes
578
+ if test -z "$_G_HAVE_PLUSEQ_OP" && \
579
+ __PLUSEQ_TEST="a" && \
580
+ __PLUSEQ_TEST+=" b" 2>/dev/null && \
581
+ test "a b" = "$__PLUSEQ_TEST"; then
582
+ _G_HAVE_PLUSEQ_OP=yes
583
+ fi
596
584
 
597
585
  if test yes = "$_G_HAVE_PLUSEQ_OP"
598
586
  then
@@ -2308,7 +2296,7 @@ include the following information:
2308
2296
  compiler: $LTCC
2309
2297
  compiler flags: $LTCFLAGS
2310
2298
  linker: $LD (gnu? $with_gnu_ld)
2311
- version: $progname $scriptversion Debian-2.4.7-5
2299
+ version: $progname $scriptversion Debian-2.4.7-7build1
2312
2300
  automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
2313
2301
  autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
2314
2302
 
@@ -259,6 +259,7 @@ ac_ct_AR = @ac_ct_AR@
259
259
  ac_ct_CC = @ac_ct_CC@
260
260
  ac_ct_CXX = @ac_ct_CXX@
261
261
  ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
262
+ ac_ct_READELF = @ac_ct_READELF@
262
263
  am__include = @am__include@
263
264
  am__leading_dot = @am__leading_dot@
264
265
  am__quote = @am__quote@
@@ -429,7 +429,7 @@ ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
429
429
 
430
430
  #endif /* FFI_CLOSURES */
431
431
 
432
- #if FFI_GO_CLOSURES
432
+ #ifdef FFI_GO_CLOSURES
433
433
 
434
434
  typedef struct {
435
435
  void *tramp;