From: Julian Seward Date: Wed, 14 Mar 2007 11:55:28 +0000 (+0000) Subject: Back out r6640; I'm pretty sure it is the wrong thing to do now. X-Git-Tag: svn/VALGRIND_3_3_0~318 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51c70bbf4c93ad72767ca141049ae59d843b353c;p=thirdparty%2Fvalgrind.git Back out r6640; I'm pretty sure it is the wrong thing to do now. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6648 --- diff --git a/memcheck/mc_replace_strmem.c b/memcheck/mc_replace_strmem.c index 02b90a7673..b7d016f00e 100644 --- a/memcheck/mc_replace_strmem.c +++ b/memcheck/mc_replace_strmem.c @@ -670,40 +670,6 @@ GLIBC25_MEMPCPY(m_libc_soname, mempcpy) GLIBC25_MEMPCPY(m_ld_so_1, mempcpy) /* ld.so.1 */ -/* getenv. glibc-2.5 steps along the env strings in 2 byte chunks - which means it sometimes overreads. sigh. */ -#define GLIBC25_GETENV(soname, fnname) \ - char* VG_REPLACE_FUNCTION_ZU(soname,fnname)( const char* name0 ); \ - char* VG_REPLACE_FUNCTION_ZU(soname,fnname)( const char* name0 ) \ - { \ - char** ep; \ - char* cand; \ - char* name; \ - extern char** __environ; \ - if (__environ == NULL || name0 == NULL || name0[0] == '\0') \ - return NULL; \ - for (ep = __environ; *ep; ep++) { \ - cand = *ep; \ - name = (char*)name0; \ - /* advance cand and name until either points at zero or \ - until what they both point at differs. */ \ - while (1) { \ - if (*cand == 0 || *name == 0) \ - break; \ - if (*cand != *name) \ - break; \ - cand++; \ - name++; \ - } \ - if (*name == 0 && *cand == '=') \ - return cand+1; \ - } \ - return NULL; \ - } - -GLIBC25_GETENV(m_libc_soname, getenv) - - /*------------------------------------------------------------*/ /*--- AIX stuff only after this point ---*/ /*------------------------------------------------------------*/