1 --- a/libmudflap/mf-hooks2.c
2 +++ b/libmudflap/mf-hooks2.c
3 @@ -427,7 +427,7 @@ WRAPPER2(void, bzero, void *s, size_t n)
5 TRACE ("%s\n", __PRETTY_FUNCTION__);
6 MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
12 @@ -437,7 +437,7 @@ WRAPPER2(void, bcopy, const void *src, v
13 TRACE ("%s\n", __PRETTY_FUNCTION__);
14 MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
15 MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
16 - bcopy (src, dest, n);
17 + memmove (dest, src, n);
21 @@ -447,7 +447,7 @@ WRAPPER2(int, bcmp, const void *s1, cons
22 TRACE ("%s\n", __PRETTY_FUNCTION__);
23 MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
24 MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
25 - return bcmp (s1, s2, n);
26 + return n == 0 ? 0 : memcmp (s1, s2, n);
30 @@ -456,7 +456,7 @@ WRAPPER2(char *, index, const char *s, i
31 size_t n = strlen (s);
32 TRACE ("%s\n", __PRETTY_FUNCTION__);
33 MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
34 - return index (s, c);
35 + return strchr (s, c);
39 @@ -465,7 +465,7 @@ WRAPPER2(char *, rindex, const char *s,
40 size_t n = strlen (s);
41 TRACE ("%s\n", __PRETTY_FUNCTION__);
42 MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
43 - return rindex (s, c);
44 + return strrchr (s, c);
47 /* XXX: stpcpy, memccpy */