From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7CED53858C50; Tue, 28 Mar 2023 07:26:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7CED53858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679988399; bh=FSXRZIkw9lkiCW4ZT6mJe1TsgDG3o8zKHE9eOfC6aRc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FZWHP9pCVQQyTJziVEb9fAMeaCaOyPeBhHrfHcsYOq9TD8so7VPkyd95Imx04wtdR BUlrYb1ctC1g56Z0e+m05J2+oGk31IyevYz5+s8d20S2pQ3bH7kTbAs2KvSTOiJmQu +LFT7UyWKYSHEeaWV4M0kAVSq6znGibLuWsQjlbI= From: "cvs-commit 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: Tue, 28 Mar 2023 07:26:39 +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 #7 from CVS Commits --- The master branch has been updated by Xi Ruoyao : https://gcc.gnu.org/g:21c74b6ea41d21ef96813b34bfa55c51a82d6c99 commit r13-6888-g21c74b6ea41d21ef96813b34bfa55c51a82d6c99 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. Ok for trunk? 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.=