patches/gcc/4.2.0/210-libmudflap-susv3-legacy.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 02 18:26:53 2011 +0200 (2011-08-02)
changeset 2592 4908eb2b6f17
parent 111 2e16b9fc302d
permissions -rw-r--r--
scripts/functions: cvs retrieval first tries the mirror for tarballs

The cvs download helper looks for the local tarballs dir to see if it
can find a pre-downloaded tarball, and if it does not find it, does
the actual fetch to upstream via cvs.

In the process, it does not even try to get a tarball from the local
mirror, which can be useful if the mirror has been pre-populated
manually (or with a previously downloaded tree).

Fake a tarball get with the standard tarball-download helper, but
without specifying any upstream URL, which makes the helper directly
try the LAN mirror.

Of course, if no mirror is specified, no URL wil be available, and
the standard cvs retrieval will kick in.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 Index: gcc-4.2/libmudflap/mf-hooks2.c
     2 ===================================================================
     3 --- gcc-4.2/libmudflap/mf-hooks2.c	(revision 119834)
     4 +++ gcc-4.2/libmudflap/mf-hooks2.c	(working copy)
     5 @@ -427,7 +427,7 @@
     6  {
     7    TRACE ("%s\n", __PRETTY_FUNCTION__);
     8    MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
     9 -  bzero (s, n);
    10 +  memset (s, 0, n);
    11  }
    12  
    13  
    14 @@ -437,7 +437,7 @@
    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);
    20  }
    21  
    22  
    23 @@ -447,7 +447,7 @@
    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);
    29  }
    30  
    31  
    32 @@ -456,7 +456,7 @@
    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);
    38  }
    39  
    40  
    41 @@ -465,7 +465,7 @@
    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);
    47  }
    48  
    49  /* XXX:  stpcpy, memccpy */