From 3539e3fa3e1f8ac6b4177476a424681e58c76af5 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Sun, 30 Nov 2014 19:43:57 +0000 Subject: restructure libc/string + libc/arch/*/string coperation regarding (potentially) MD versions (function dependent, not filename dependent) split out memcpy/memmove/bcopy and strchr/index/strrchr/rindex Bring back amd64 .S versions And the final touch: switch all architectures temporarily to MI memcpy.c, which contains syslog + abort for overlapping copies. A nice harsh undefined behaviour. We will clean the entire userland of the remaining issues in this catagory, then switch to the optimised memcpy which skips the memmove check. I tried to cut this change into pieces, but testing each sub-step on every architecture is too time consuming and mindnumbing. ok miod --- src/lib/libc/string/index.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/lib/libc/string/index.c') diff --git a/src/lib/libc/string/index.c b/src/lib/libc/string/index.c index 50e9ca35ab..ebae15afe7 100644 --- a/src/lib/libc/string/index.c +++ b/src/lib/libc/string/index.c @@ -1,4 +1,4 @@ -/* $OpenBSD: index.c,v 1.5 2005/08/08 08:05:37 espie Exp $ */ +/* $OpenBSD: index.c,v 1.6 2014/11/30 19:43:56 deraadt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -31,11 +31,7 @@ #include char * -#ifdef STRCHR -strchr(const char *p, int ch) -#else index(const char *p, int ch) -#endif { for (;; ++p) { if (*p == ch) -- cgit v1.2.3-55-g6feb