From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BFD8B3858C5E; Mon, 27 Mar 2023 16:20:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BFD8B3858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679934044; bh=Vvd3Qgw6Cx0w7LmyccbGkSpItCvTHHKm1MBsAOGgUZM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KMqrnfUEwQ/8Qc0AxAwj3xV4+Euy6OvRO1DwRd85GzdKs9Rd2PdElt0yLHPCuFmT6 9pQ6RHKzgptDwxXTchCx8BGEdikO96tkujlKMQ+ScV6cTNFDy8zCVq4yvqHOZ1kbEj n/oLRNoBRHM8nHV0Ju4QfmC8Mj4Bn49m0jtEKbaI= From: "xry111 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/109293] [12/13 Regression] Missing memmem() prototype in fixincludes/fixfixes.c on Windows/MinGW-W64 Date: Mon, 27 Mar 2023 16:20:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: xry111 at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: xry111 at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109293 --- Comment #6 from Xi Ruoyao --- (In reply to Andrew Pinski from comment #5) > Something like this: > diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac > index 14813b910f1..00aeb1ce1d9 100644 > --- a/fixincludes/configure.ac > +++ b/fixincludes/configure.ac > @@ -89,6 +89,7 @@ define(fixincludes_UNLOCKED_FUNCS, clearerr_unlocked > feof_unlocked dnl > putchar_unlocked putc_unlocked) > AC_CHECK_FUNCS(fixincludes_UNLOCKED_FUNCS) > AC_CHECK_DECLS([abort, asprintf, basename(char *), errno, vasprintf]) > +AC_CHECK_DECLS([memmem]) > AC_CHECK_DECLS(m4_split(m4_normalize(fixincludes_UNLOCKED_FUNCS))) >=20 > # Checks for typedefs, structures, and compiler characteristics. > diff --git a/fixincludes/system.h b/fixincludes/system.h > index dca5d57b2e3..f7bbd0e952c 100644 > --- a/fixincludes/system.h > +++ b/fixincludes/system.h > @@ -209,6 +209,11 @@ extern int errno; > extern void abort (void); > #endif >=20 > +#if defined (HAVE_DECL_MEMMEM) && !HAVE_DECL_MEMMEM > +extern void *memmem (const void *, size_t, const void *, size_t); > +#endif > + > + > #if HAVE_SYS_STAT_H > # include > #endif Yes, I'm testing it in a container environment where I've removed memmem fr= om system string.h.=