Page MenuHomeFreeBSD

D46417.id142386.diff
No OneTemporary

D46417.id142386.diff

diff --git a/lib/libc/aarch64/string/Makefile.inc b/lib/libc/aarch64/string/Makefile.inc
--- a/lib/libc/aarch64/string/Makefile.inc
+++ b/lib/libc/aarch64/string/Makefile.inc
@@ -20,6 +20,8 @@
strnlen \
strrchr
+MDSRCS+= strcat.c
+
#
# Add the above functions. Generate an asm file that includes the needed
# Arm Optimized Routines file defining the function name to the libc name.
diff --git a/lib/libc/aarch64/string/strcat.c b/lib/libc/aarch64/string/strcat.c
new file mode 100644
--- /dev/null
+++ b/lib/libc/aarch64/string/strcat.c
@@ -0,0 +1,20 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2024 Getz Mikalsen <getz@FreeBSD.org>
+*/
+
+#include <string.h>
+
+#undef strcat /* _FORTIFY_SOURCE */
+
+char *
+strcat(char * __restrict s, const char * __restrict append)
+{
+ char *save = s;
+
+ /* call into SIMD optimized functions */
+ stpcpy(s + strlen(s), append);
+
+ return(save);
+}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 5:54 PM (21 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14682861
Default Alt Text
D46417.id142386.diff (928 B)

Event Timeline