From: Jakub Jelinek Date: Wed, 30 Oct 2024 08:58:26 +0000 (+0100) Subject: genmatch: Fix build on hppa64-hpux [PR117348] X-Git-Tag: basepoints/gcc-16~4784 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd5535494c567c3dff4b935b7443d893914e9b9c;p=thirdparty%2Fgcc.git genmatch: Fix build on hppa64-hpux [PR117348] Apparently autoconf defines the HAVE_DECL_* macros to 0 rather than not defining them at all, so defined(HAVE_DECL_FMEMOPEN) test doesn't do much. The following patch fixes it by testing HAVE_DECL_FMEMOPEN for being non-zero instead. 2024-10-30 Jakub Jelinek PR middle-end/117348 * genmatch.cc: Replace defined(HAVE_DECL_FMEMOPEN) test with HAVE_DECL_FMEMOPEN. --- diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc index 170bf6162b5d..9a0817b8ee31 100644 --- a/gcc/genmatch.cc +++ b/gcc/genmatch.cc @@ -585,7 +585,7 @@ diag_vfprintf (FILE *f, int err_no, const char *msg, va_list *ap) fprintf (f, "%s", q); } -#if defined(GENMATCH_SELFTESTS) && defined(HAVE_DECL_FMEMOPEN) +#if defined(GENMATCH_SELFTESTS) && HAVE_DECL_FMEMOPEN #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsuggest-attribute=format"