From 356390c14aa70a95c15845512f2381b627cf9a96 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Fri, 1 Oct 2021 17:18:32 +0000 Subject: [PATCH] Use libiberty snprintf and vsnprintf on hppa*-*-hpux*. libiberty/ChangeLog: PR target/100734 * configure.ac: Use libiberty snprintf and vsnprintf on hppa*-*-hpux*. * configure: Regenerate. --- libiberty/configure | 16 ++++++++++++++++ libiberty/configure.ac | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/libiberty/configure b/libiberty/configure index 2ea7c1198098..821cfa8d26de 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -6559,6 +6559,22 @@ if test -z "${setobjs}"; then ac_cv_func_getpagesize=yes ;; + hppa*-*-hpux*) + # Replace system snprintf and vsnprintf with libiberty implementations. + case " $LIBOBJS " in + *" snprintf.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" + ;; +esac + + case " $LIBOBJS " in + *" vsnprintf.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS vsnprintf.$ac_objext" + ;; +esac + + ;; + *-*-mingw32*) # Under mingw32, sys_nerr and sys_errlist exist, but they are # macros, so the test below won't find them. diff --git a/libiberty/configure.ac b/libiberty/configure.ac index ad952963971a..5faf48b8382a 100644 --- a/libiberty/configure.ac +++ b/libiberty/configure.ac @@ -611,6 +611,12 @@ if test -z "${setobjs}"; then ac_cv_func_getpagesize=yes ;; + hppa*-*-hpux*) + # Replace system snprintf and vsnprintf with libiberty implementations. + AC_LIBOBJ([snprintf]) + AC_LIBOBJ([vsnprintf]) + ;; + *-*-mingw32*) # Under mingw32, sys_nerr and sys_errlist exist, but they are # macros, so the test below won't find them. -- 2.47.2