1 Index: gcc-4.2.3/libmudflap/mf-hooks2.c
2 ===================================================================
3 --- gcc-4.2.3.orig/libmudflap/mf-hooks2.c 2005-09-23 23:58:39.000000000 +0200
4 +++ gcc-4.2.3/libmudflap/mf-hooks2.c 2008-05-21 13:45:50.653288577 +0200
7 TRACE ("%s\n", __PRETTY_FUNCTION__);
8 MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
15 TRACE ("%s\n", __PRETTY_FUNCTION__);
16 MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
17 MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
18 - bcopy (src, dest, n);
19 + memmove (dest, src, n);
24 TRACE ("%s\n", __PRETTY_FUNCTION__);
25 MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
26 MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
27 - return bcmp (s1, s2, n);
28 + return n == 0 ? 0 : memcmp (s1, s2, n);
33 size_t n = strlen (s);
34 TRACE ("%s\n", __PRETTY_FUNCTION__);
35 MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
36 - return index (s, c);
37 + return strchr (s, c);
42 size_t n = strlen (s);
43 TRACE ("%s\n", __PRETTY_FUNCTION__);
44 MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
45 - return rindex (s, c);
46 + return strrchr (s, c);
49 /* XXX: stpcpy, memccpy */