public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-109293-4-hLCejZOHvd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109293-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109293

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
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 <sys/stat.h>
 #endif

  parent reply	other threads:[~2023-03-27 16:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27  9:19 [Bug other/109293] New: " jdx at o2 dot pl
2023-03-27 15:42 ` [Bug other/109293] [12/13 Regression] " pinskia at gcc dot gnu.org
2023-03-27 16:02 ` xry111 at gcc dot gnu.org
2023-03-27 16:09 ` xry111 at gcc dot gnu.org
2023-03-27 16:13 ` pinskia at gcc dot gnu.org
2023-03-27 16:15 ` xry111 at gcc dot gnu.org
2023-03-27 16:19 ` pinskia at gcc dot gnu.org [this message]
2023-03-27 16:20 ` xry111 at gcc dot gnu.org
2023-03-28  7:26 ` cvs-commit at gcc dot gnu.org
2023-03-28  7:28 ` [Bug other/109293] [12 " xry111 at gcc dot gnu.org
2023-03-28  9:30 ` jdx at o2 dot pl
2023-03-28 10:01 ` cvs-commit at gcc dot gnu.org
2023-03-28 10:02 ` xry111 at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109293-4-hLCejZOHvd@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).