diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2011-01-27 04:51:32 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2011-01-27 04:51:32 +0000 |
commit | dc512c36861afadef9ccf3e513dd1406b8a0cc56 (patch) | |
tree | 9e5c06dcedcb386a7c71a5c7cde99dfa636014ab /dev-util/valgrind/files | |
parent | Version bump via perl-bump experimental tool. (diff) | |
download | gentoo-2-dc512c36861afadef9ccf3e513dd1406b8a0cc56.tar.gz gentoo-2-dc512c36861afadef9ccf3e513dd1406b8a0cc56.tar.bz2 gentoo-2-dc512c36861afadef9ccf3e513dd1406b8a0cc56.zip |
Fix compability with recent glibc release.
(Portage version: 2.2.0_alpha19/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/valgrind/files')
-rw-r--r-- | dev-util/valgrind/files/valgrind-3.6.0-glibc-2.13.patch | 56 | ||||
-rw-r--r-- | dev-util/valgrind/files/valgrind-3.6.0-strcasecmp.patch | 116 |
2 files changed, 172 insertions, 0 deletions
diff --git a/dev-util/valgrind/files/valgrind-3.6.0-glibc-2.13.patch b/dev-util/valgrind/files/valgrind-3.6.0-glibc-2.13.patch new file mode 100644 index 000000000000..efe75b495a79 --- /dev/null +++ b/dev-util/valgrind/files/valgrind-3.6.0-glibc-2.13.patch @@ -0,0 +1,56 @@ +http://pkgs.fedoraproject.org/gitweb/?p=valgrind.git;a=summary + +--- valgrind/configure.in ++++ valgrind/configure.in +@@ -649,6 +649,16 @@ _ACEOF + GLIBC_VERSION="`$CPP conftest.$ac_ext | $SED -n 's/^glibc version is: //p' | $SED 's/ /./g'`" + fi + ++AC_EGREP_CPP([GLIBC_213], [ ++#include <features.h> ++#ifdef __GNU_LIBRARY__ ++ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 13) ++ GLIBC_213 ++ #endif ++#endif ++], ++GLIBC_VERSION="2.13") ++ + AC_EGREP_CPP([AIX5_LIBC], [ + #include <standards.h> + #if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530) +@@ -749,6 +759,13 @@ case "${GLIBC_VERSION}" in + DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" + DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" + ;; ++ 2.13) ++ AC_MSG_RESULT(2.13 family) ++ AC_DEFINE([GLIBC_2_13], 1, [Define to 1 if you're using glibc 2.13.x]) ++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" ++ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" ++ ;; + aix5) + AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3) + AC_DEFINE([AIX5_LIBC], 1, [Define to 1 if you're using AIX 5.1 or 5.2 or 5.3]) +@@ -762,7 +779,7 @@ case "${GLIBC_VERSION}" in + + *) + AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}]) +- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.12]) ++ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.13]) + AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION]) + AC_MSG_ERROR([or Darwin libc]) + ;; +--- valgrind/config.h.in ++++ valgrind/config.h.in +@@ -33,6 +33,9 @@ + /* Define to 1 if you're using glibc 2.12.x */ + #undef GLIBC_2_12 + ++/* Define to 1 if you're using glibc 2.13.x */ ++#undef GLIBC_2_13 ++ + /* Define to 1 if you're using glibc 2.2.x */ + #undef GLIBC_2_2 + diff --git a/dev-util/valgrind/files/valgrind-3.6.0-strcasecmp.patch b/dev-util/valgrind/files/valgrind-3.6.0-strcasecmp.patch new file mode 100644 index 000000000000..c406dfbaaad4 --- /dev/null +++ b/dev-util/valgrind/files/valgrind-3.6.0-strcasecmp.patch @@ -0,0 +1,116 @@ +http://pkgs.fedoraproject.org/gitweb/?p=valgrind.git;a=summary + +--- valgrind/memcheck/mc_replace_strmem.c ++++ valgrind/memcheck/mc_replace_strmem.c +@@ -431,6 +430,111 @@ STRCMP(VG_Z_LD64_SO_1, strcmp + #endif + + ++#if defined(VGO_linux) ++extern int tolower (int); ++ ++#define STRCASECMP(soname, fnname) \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2 ); \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2 ) \ ++ { \ ++ register unsigned char c1; \ ++ register unsigned char c2; \ ++ while (True) { \ ++ c1 = tolower(*(unsigned char *)s1); \ ++ c2 = tolower(*(unsigned char *)s2); \ ++ if (c1 != c2) break; \ ++ if (c1 == 0) break; \ ++ s1++; s2++; \ ++ } \ ++ if (c1 < c2) return -1; \ ++ if (c1 > c2) return 1; \ ++ return 0; \ ++ } ++ ++STRCASECMP(VG_Z_LIBC_SONAME, strcasecmp) ++STRCASECMP(VG_Z_LIBC_SONAME, __GI_strcasecmp) ++ ++ ++#define STRNCASECMP(soname, fnname) \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2, SizeT nmax ); \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2, SizeT nmax ) \ ++ { \ ++ register unsigned char c1; \ ++ register unsigned char c2; \ ++ SizeT n = 0; \ ++ while (True) { \ ++ if (n >= nmax) return 0; \ ++ if (*s1 == 0 && *s2 == 0) return 0; \ ++ if (*s1 == 0) return -1; \ ++ if (*s2 == 0) return 1; \ ++ c1 = tolower(*(unsigned char*)s1); \ ++ c2 = tolower(*(unsigned char*)s2); \ ++ if (c1 < c2) return -1; \ ++ if (c1 > c2) return 1; \ ++ s1++; s2++; n++; \ ++ } \ ++ } ++ ++STRNCASECMP(VG_Z_LIBC_SONAME, strncasecmp) ++STRNCASECMP(VG_Z_LIBC_SONAME, __GI_strncasecmp) ++ ++extern int tolower_l (int, void *) __attribute__((weak)); ++ ++#define STRCASECMP_L(soname, fnname) \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2, void* l ); \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2, void* l ) \ ++ { \ ++ register unsigned char c1; \ ++ register unsigned char c2; \ ++ while (True) { \ ++ c1 = tolower_l(*(unsigned char *)s1, l); \ ++ c2 = tolower_l(*(unsigned char *)s2, l); \ ++ if (c1 != c2) break; \ ++ if (c1 == 0) break; \ ++ s1++; s2++; \ ++ } \ ++ if (c1 < c2) return -1; \ ++ if (c1 > c2) return 1; \ ++ return 0; \ ++ } ++ ++STRCASECMP_L(VG_Z_LIBC_SONAME, strcasecmp_l) ++STRCASECMP_L(VG_Z_LIBC_SONAME, __GI_strcasecmp_l) ++ ++ ++#define STRNCASECMP_L(soname, fnname) \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2, SizeT nmax, void* l ); \ ++ int VG_REPLACE_FUNCTION_ZU(soname,fnname) \ ++ ( const char* s1, const char* s2, SizeT nmax, void* l ) \ ++ { \ ++ register unsigned char c1; \ ++ register unsigned char c2; \ ++ SizeT n = 0; \ ++ while (True) { \ ++ if (n >= nmax) return 0; \ ++ if (*s1 == 0 && *s2 == 0) return 0; \ ++ if (*s1 == 0) return -1; \ ++ if (*s2 == 0) return 1; \ ++ c1 = tolower_l(*(unsigned char*)s1, l); \ ++ c2 = tolower_l(*(unsigned char*)s2, l); \ ++ if (c1 < c2) return -1; \ ++ if (c1 > c2) return 1; \ ++ s1++; s2++; n++; \ ++ } \ ++ } ++ ++STRNCASECMP_L(VG_Z_LIBC_SONAME, strncasecmp_l) ++STRNCASECMP_L(VG_Z_LIBC_SONAME, __GI_strncasecmp_l) ++#endif ++ ++ + #define MEMCHR(soname, fnname) \ + void* VG_REPLACE_FUNCTION_ZU(soname,fnname) (const void *s, int c, SizeT n); \ + void* VG_REPLACE_FUNCTION_ZU(soname,fnname) (const void *s, int c, SizeT n) \ |