PR 34486 opcodes fails to compile with mingw

Message ID aorPe2TpdPbHudHd@squeak.grove.modra.org
State New
Headers
Series PR 34486 opcodes fails to compile with mingw |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply

Commit Message

Alan Modra Aug. 23, 2026, 10:46 a.m. UTC
  Add the config machinery to ensure asprintf is supplied by libiberty
if missing.  While we're at it, check decls for some other functions
used in opcodes that may not be in C90 systems.

	* configure.ac: CHECK_DECLS for asprintf, snprintf, strtoull
	and vsnprintf.
	* configure: Regenerate.
	* config.in: Regenerate.
  

Patch

diff --git a/opcodes/configure.ac b/opcodes/configure.ac
index 2c2556598c9..c6d8972aa0a 100644
--- a/opcodes/configure.ac
+++ b/opcodes/configure.ac
@@ -96,7 +96,7 @@  BFD_64_BIT
 AC_SUBST(HDEFINES)
 AC_PROG_INSTALL
 
-AC_CHECK_DECLS([basename, stpcpy])
+AC_CHECK_DECLS([asprintf, basename, snprintf, stpcpy, strtoull, vsnprintf])
 
 # Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
 # since sigsetjmp might only be defined as a macro.