aboutsummaryrefslogtreecommitdiff
path: root/binutils/configure
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-10-21 12:16:31 +1030
committerAlan Modra <amodra@gmail.com>2024-10-24 17:58:00 +1030
commit86b26b453f65404b29ce035a2eb3d62671aa0612 (patch)
tree97309863b4b131ebbb0915a6bc943e9aad681ef4 /binutils/configure
parent8b5a212495371fbc9bea7f4ce6d632df3763723b (diff)
downloadbinutils-86b26b453f65404b29ce035a2eb3d62671aa0612.zip
binutils-86b26b453f65404b29ce035a2eb3d62671aa0612.tar.gz
binutils-86b26b453f65404b29ce035a2eb3d62671aa0612.tar.bz2
Replace uses of asprintf with xasprintf
xasprintf has a nicer interface and behaves like xmalloc as far as memory is concerned, ie. no need to check a return status and the program exits with an error on OOM. binutils/ * dwarf.c (load_debug_sup_file): Replace asprintf with xasprintf. * nm.c (get_elf_symbol_type, get_coff_symbol_type): Likewise. * objdump.c (dump_ctf_indent_lines): Likewise. * readelf.c (display_lto_symtab, dump_ctf_indent_lines): Likewise. * windres.c (main): Likewise. * configure.ac: Remove asprintf from AC_CHECK_DECLS. * config.in: Regenerate. * configure: Regenerate. gas/ * config/tc-kvx.c (kvx_emit_single_noop): Simplify. * config/tc-riscv.c (md_assemblef): Replace asprintf with xasprintf. * read.c (s_nop, do_s_func): Likewise. * stabs.c (stabs_generate_asm_func): Likewise. (stabs_generate_asm_endfunc): Likewise. * configure.ac: Remove asprintf from AC_CHECK_DECLS. * config.in: Regenerate. * configure: Regenerate. ld/ * ldlang.c (lang_leave_overlay_section): Replace xmalloc+sprintf with xasprintf. Localise vars. * lexsup.c (parse_args): Replace asprintf with xasprintf. * pe-dll.c (make_head, make_tail, make_one): Likewise. (make_singleton_name_thunk, make_import_fixup_entry): Likewise. (make_runtime_pseudo_reloc): Likewise. (pe_create_runtime_relocator_reference): Likewise. * configure.ac: Remove asprintf from AC_CHECK_DECLS. * config.in: Regenerate. * configure: Regenerate.
Diffstat (limited to 'binutils/configure')
-rwxr-xr-xbinutils/configure10
1 files changed, 0 insertions, 10 deletions
diff --git a/binutils/configure b/binutils/configure
index ac3de5e..41e41c6 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -15708,16 +15708,6 @@ $as_echo "#define HAVE_GOOD_UTIME_H 1" >>confdefs.h
fi
-ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
-if test "x$ac_cv_have_decl_asprintf" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ASPRINTF $ac_have_decl
-_ACEOF
ac_fn_c_check_decl "$LINENO" "environ" "ac_cv_have_decl_environ" "$ac_includes_default"
if test "x$ac_cv_have_decl_environ" = xyes; then :
ac_have_decl=1