patches/gcc/4.3.4/300-libmudflap-susv3-legacy.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed May 18 23:00:46 2011 +0200 (2011-05-18)
changeset 2467 200836977ce6
permissions -rw-r--r--
config: rename variables that are arrays

Make it explicit that a variable is an array bu the name of the variable.
It will be used later when .config gets munged to allow both multiple
arguments and arguments with spaces at the same time to be passed from the
configuration down to the build scripts.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
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 */