patches/gcc/4.3.6/300-libmudflap-susv3-legacy.patch
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Tue Jul 31 22:27:29 2012 +0200 (2012-07-31)
changeset 3018 7776e8369284
parent 2124 5dd0b83ae528
permissions -rw-r--r--
complibs/cloog: create missing m4 dir

Because we now patch configure.in and configure, the Makefile quicks
in a re-build rule as the source files are now more recent than the
bundled generated files, and that fails because the m4 directory
is missing, although on some systems where aclocal is not installed,
the re-build rule does nothing (except a warning).

Always create tht directory.

Reported-by: Per Arnold Blaasmo <per-arnold.blaasmo@atmel.com>
[Also thanks to Thomas De Schampheleire <patrickdepinguin@gmail.com>
for some digging works on this issue]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.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 */