public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/maskray/clang] String: Add __memcmpeq as build target
@ 2021-11-02 19:58 Fangrui Song
0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2021-11-02 19:58 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3592ccd472a47ec8be977b0ff33f841f4c175caf
commit 3592ccd472a47ec8be977b0ff33f841f4c175caf
Author: Noah Goldstein <goldstein.w.n@gmail.com>
Date: Tue Oct 26 19:42:59 2021 -0500
String: Add __memcmpeq as build target
No bug. This commit just adds __memcmpeq as a build target so that
implementations for __memcmpeq that are not just aliases to memcmp can
be supported.
Diff:
---
string/Makefile | 2 +-
string/memcmpeq.c | 24 ++++++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/string/Makefile b/string/Makefile
index 40d6fac133..2199dd30b7 100644
--- a/string/Makefile
+++ b/string/Makefile
@@ -34,7 +34,7 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \
strerror _strerror strlen strnlen \
strncat strncmp strncpy \
strrchr strpbrk strsignal strspn strstr strtok \
- strtok_r strxfrm memchr memcmp memmove memset \
+ strtok_r strxfrm memchr memcmp memcmpeq memmove memset \
mempcpy bcopy bzero ffs ffsll stpcpy stpncpy \
strcasecmp strncase strcasecmp_l strncase_l \
memccpy memcpy wordcopy strsep strcasestr \
diff --git a/string/memcmpeq.c b/string/memcmpeq.c
new file mode 100644
index 0000000000..08726325a8
--- /dev/null
+++ b/string/memcmpeq.c
@@ -0,0 +1,24 @@
+/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* This file is intentionally left empty. It exists so that both
+ architectures which implement __memcmpeq seperately from memcmp and
+ architectures which implement __memcmpeq by having it alias memcmp will
+ build.
+
+ The alias for __memcmpeq to memcmp for the C implementation is in
+ memcmp.c. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-02 19:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 19:58 [glibc/maskray/clang] String: Add __memcmpeq as build target Fangrui Song
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).