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/rindex.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/lib/libc/string/rindex.c') diff --git a/src/lib/libc/string/rindex.c b/src/lib/libc/string/rindex.c index bf9d6f7cf1..23716f6af3 100644 --- a/src/lib/libc/string/rindex.c +++ b/src/lib/libc/string/rindex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rindex.c,v 1.6 2005/08/08 08:05:37 espie Exp $ */ +/* $OpenBSD: rindex.c,v 1.7 2014/11/30 19:43:56 deraadt Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. * All rights reserved. @@ -31,11 +31,7 @@ #include char * -#ifdef STRRCHR -strrchr(const char *p, int ch) -#else rindex(const char *p, int ch) -#endif { char *save; -- cgit v1.2.3-55-g6feb