From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 00BE23858C83; Mon, 27 Mar 2023 16:19:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 00BE23858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679933985; bh=REAvKzBsgYy3+WDz39oTGPdqiKp8rVEUHPDidqZpoZs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=erd/YqiKnCLBpT2XMHyz5bS5waO6BU7W1cR4ey17KDVnwDqSufsrJdnfK/+sW0xog Zt0bsZRv2sjrBpAr9XB5YX+xkHYlVWJrQFChBMTtOxkOC/pAzwjAa33Knwsyy4kVKe UAjCsjn6cJ0t4Fk1MAKwv7O42K9vufh8dz2/G8Iw= From: "pinskia 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:19:44 +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: pinskia 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 #5 from Andrew Pinski --- 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))) # 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 +#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=