From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 23D783858C54; Mon, 27 Mar 2023 16:15:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 23D783858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679933738; bh=TBNwfl/axRQVmDxZHSoCrvLQWUATqGJyydzYJLTInAk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=w8M74xTTZyznw/xshNfI4ZuMzpTfrPE74O9x4Yc/0r2D6tIzlr2hMZWr9RTqCTcY0 oHeRavDuaLcYbWSJWMdngPHUNVRdZCmm/0mbwU09h9VgaTVIu6Sv/cSXUiNUpCH8ou fOz4KDkBdnguv1N2VA2cBqzKs2Atut7w0Mor8adQ= 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:15:37 +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 #4 from Xi Ruoyao --- (In reply to Andrew Pinski from comment #3) > (In reply to Xi Ruoyao from comment #2) > > I'll make a patch to check if memmem is declared in configure.ac. memm= em is > > not a POSIX function, so it may be undeclared on systems other than Min= GW as > > well. >=20 > memmem is included in libiberty so it is more just about the prototype not > being declared. libiberty configure.ac checked it with AC_CHECK_FUNCS, so if the system libc does not provide memmem, libiberty will build its copy. And we just need to declare the prototype to use it, as libiberty doc says: https://gcc.gnu.org/onlinedocs/libiberty/Supplemental-Functions.html=