Make index/rindex weak aliases of strchr/strrchr since they are notpart of the ISO C standard and have also been dropped from POSIX.OK guenther@ kettenis@
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
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/rindexBring back amd64 .S versionsAnd the final touch: switch all architectures temporarily to MImemcpy.c, which contains syslog + abort for overlapping copies. A niceharsh undefined behaviour. We will clean the entire userland of theremaining issues in this catagory, then switch to the optimised memcpywhich skips the memmove check.I tried to cut this change into pieces, but testing each sub-step onevery architecture is too time consuming and mindnumbing.ok miod
show more ...
It turns out that the so-called fast ffs(3) routines were wrong, as soon asmore than one bit is set, as the ff1 instruction counts from the highestorder.However, gcc/m88k with optimization enable
It turns out that the so-called fast ffs(3) routines were wrong, as soon asmore than one bit is set, as the ff1 instruction counts from the highestorder.However, gcc/m88k with optimization enabled would use a correct, shortsequence based upon ff1 and tweaks, to achieve the intended result, hencei did not catch this flaw initially.So revert to the C implementation - it is correct, still decently fast, andwill only be used when compiling at -O0.
Use libkern's fast ffs() in libc too.
Remove unused pieces and clean Makefile.inc
$OpenBSD$
missing parts from last commit
correted sigsetjmp, setjump. Fixed MACHINE_ARCH vs. MACHINE stuff.