[libc] Rewrite string functions

Some of the C library string functions have an unknown provenance.
Reimplement all such functions to avoid potential licensing
uncertainty.

Remove the inline-assembler versions of strlen(), memswap(), and
strncmp(); these save a minimal amount of space (around 40 bytes in
total) and are not performance-critical.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2015-02-16 17:59:11 +00:00
parent b54167b8b6
commit 8ee39f7432
6 changed files with 400 additions and 432 deletions

View File

@@ -75,7 +75,7 @@ static struct errortab * find_closest_error ( int errno ) {
* call to strerror().
*
*/
const char * strerror ( int errno ) {
char * strerror ( int errno ) {
static char errbuf[64];
struct errortab *errortab;