From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AC8013858410; Tue, 28 Mar 2023 10:01:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC8013858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679997681; bh=7a4oxKrkkEowOLmMR1Jq7KOeEDy2HBiasF+NBsTdr20=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CRxBIul1naiDXDVjs3pw/Vd1EidvcGReDWfi42eidcMIWcoGTiLIGbzOgCsd5QNlx 0UN+qgvq/X0fN4DKkwv1DMv1xupg9eDGi1KSWPW2nPRyRZNizMcoItgY67p+9/HOr8 3xs9wmrZnI2YgSMeEAK4uD9n8I56tfaCb1KRV+A0= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/109293] [12 Regression] Missing memmem() prototype in fixincludes/fixfixes.c on Windows/MinGW-W64 Date: Tue, 28 Mar 2023 10:01:20 +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, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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 #10 from CVS Commits --- The releases/gcc-12 branch has been updated by Xi Ruoyao : https://gcc.gnu.org/g:743088c3c7c670f180978dd7b59a57fd9626c5a2 commit r12-9326-g743088c3c7c670f180978dd7b59a57fd9626c5a2 Author: Xi Ruoyao Date: Tue Mar 28 01:48:02 2023 +0800 fixincludes: Declare memmem if it's not declared in system headers [PR109293] memmem is not POSIX so the system may lack it. Then libiberty will provide an implementation, but it's a "supplemental function" and not declared in libiberty.h. We need to declare the prototype to use it then. See libiberty doc at https://gcc.gnu.org/onlinedocs/libiberty/Supplemental-Functions.html. Tested by bootstrapping GCC in the following container environments on x86_64-linux-gnu: 1. "Vanilla" system with memmem in Glibc. 2. memmem removed from string.h. 3. memmem removed from both string.h and libc.so. For 3, also verified that memmem from libiberty is linked into fixincl executable. Note that the backport does not contain a complete regeneration of configure and config.h.in (attempting such regeneration resulted in all the USED_FOR_TARGET conditional disappearing; this already happened in trunk at r13-2200). fixincludes/ChangeLog: PR other/109293 * configure.ac (AC_CHECK_DECLS): Add memmem. * configure: Regenerate. * config.h.in: Regenerate. * system.h (memmem): Declare if HAVE_DECL_MEMMEM is zero. (cherry picked from commit 21c74b6ea41d21ef96813b34bfa55c51a82d6c99)=