patches/gcc/4.3.5/300-libmudflap-susv3-legacy.patch
author Johannes Stezenbach <js@sig21.net>
Tue Oct 30 00:36:20 2012 +0000 (2012-10-30)
changeset 3096 d1766c2273d1
parent 1461 35b30f8fb307
permissions -rw-r--r--
scripts/functions: use patch -i instead of IO redirection

This makes the patch name show up on the command line
logged by CT_DoExecLog so it's easier to see
what is going on. The -i for patch is specified
by Posix and supported by GNU patch and busybox patch.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
[yann.morin.1998@free.fr: remove now-useless debug message]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <20121030103620.GB8303@sig21.net>
Patchwork-Id: 195418
thomas@1461
     1
Original patch from: ../4.3.2/300-libmudflap-susv3-legacy.patch
thomas@1461
     2
thomas@1461
     3
-= BEGIN original header =-
thomas@1461
     4
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_305-libmudflap-susv3-legacy.patch
thomas@1461
     5
-= END original header =-
thomas@1461
     6
thomas@1461
     7
diff -durN gcc-4.3.3.orig/libmudflap/mf-hooks2.c gcc-4.3.3/libmudflap/mf-hooks2.c
thomas@1461
     8
--- gcc-4.3.3.orig/libmudflap/mf-hooks2.c	2005-09-23 23:58:39.000000000 +0200
thomas@1461
     9
+++ gcc-4.3.3/libmudflap/mf-hooks2.c	2009-01-27 22:25:45.000000000 +0100
thomas@1461
    10
@@ -427,7 +427,7 @@
thomas@1461
    11
 {
thomas@1461
    12
   TRACE ("%s\n", __PRETTY_FUNCTION__);
thomas@1461
    13
   MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
thomas@1461
    14
-  bzero (s, n);
thomas@1461
    15
+  memset (s, 0, n);
thomas@1461
    16
 }
thomas@1461
    17
 
thomas@1461
    18
 
thomas@1461
    19
@@ -437,7 +437,7 @@
thomas@1461
    20
   TRACE ("%s\n", __PRETTY_FUNCTION__);
thomas@1461
    21
   MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
thomas@1461
    22
   MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
thomas@1461
    23
-  bcopy (src, dest, n);
thomas@1461
    24
+  memmove (dest, src, n);
thomas@1461
    25
 }
thomas@1461
    26
 
thomas@1461
    27
 
thomas@1461
    28
@@ -447,7 +447,7 @@
thomas@1461
    29
   TRACE ("%s\n", __PRETTY_FUNCTION__);
thomas@1461
    30
   MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
thomas@1461
    31
   MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
thomas@1461
    32
-  return bcmp (s1, s2, n);
thomas@1461
    33
+  return memcmp (s1, s2, n);
thomas@1461
    34
 }
thomas@1461
    35
 
thomas@1461
    36
 
thomas@1461
    37
@@ -456,7 +456,7 @@
thomas@1461
    38
   size_t n = strlen (s);
thomas@1461
    39
   TRACE ("%s\n", __PRETTY_FUNCTION__);
thomas@1461
    40
   MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
thomas@1461
    41
-  return index (s, c);
thomas@1461
    42
+  return strchr (s, c);
thomas@1461
    43
 }
thomas@1461
    44
 
thomas@1461
    45
 
thomas@1461
    46
@@ -465,7 +465,7 @@
thomas@1461
    47
   size_t n = strlen (s);
thomas@1461
    48
   TRACE ("%s\n", __PRETTY_FUNCTION__);
thomas@1461
    49
   MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
thomas@1461
    50
-  return rindex (s, c);
thomas@1461
    51
+  return strrchr (s, c);
thomas@1461
    52
 }
thomas@1461
    53
 
thomas@1461
    54
 /* XXX:  stpcpy, memccpy */