Merge part of r9129 (factor out duplicated Z-encodings of names) from the
DARWIN branch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9130 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/exp-ptrcheck/h_intercepts.c b/exp-ptrcheck/h_intercepts.c
index 3ae8c62..eef99a9 100644
--- a/exp-ptrcheck/h_intercepts.c
+++ b/exp-ptrcheck/h_intercepts.c
@@ -44,30 +44,6 @@
    memcheck/mc_replace_strmem.c.  If you copy more in, please keep
    them in the same order as in mc_replace_strmem.c. */
 
-/* --------- Some handy Z-encoded names. --------- */
-
-/* --- Soname of the standard C library. --- */
-
-#if defined(VGO_linux)
-#  define  m_libc_soname     libcZdsoZa              // libc.so*
-#elif defined(VGP_ppc32_aix5)
-   /* AIX has both /usr/lib/libc.a and /usr/lib/libc_r.a. */
-#  define  m_libc_soname     libcZaZdaZLshrZdoZR     // libc*.a(shr.o)
-#elif defined(VGP_ppc64_aix5)
-#  define  m_libc_soname     libcZaZdaZLshrZu64ZdoZR // libc*.a(shr_64.o)
-#else
-#  error "Unknown platform"
-#endif
-
-/* --- Sonames for Linux ELF linkers. --- */
-
-#define  m_ld_linux_so_2         ldZhlinuxZdsoZd2           // ld-linux.so.2
-#define  m_ld_linux_x86_64_so_2  ldZhlinuxZhx86Zh64ZdsoZd2  // ld-linux-x86-64.so.2
-#define  m_ld64_so_1             ld64ZdsoZd1                // ld64.so.1
-#define  m_ld_so_1               ldZdsoZd1                  // ld.so.1
-
-
-
 
 #define STRNLEN(soname, fnname) \
    SizeT VG_REPLACE_FUNCTION_ZU(soname,fnname) ( const char* str, SizeT n ); \
@@ -78,7 +54,7 @@
       return i; \
    }
 
-STRNLEN(m_libc_soname, strnlen)
+STRNLEN(VG_Z_LIBC_SONAME, strnlen)
 
 
 // Note that this replacement often doesn't get used because gcc inlines
@@ -94,10 +70,10 @@
       return i; \
    }
 
-STRLEN(m_libc_soname,          strlen)
-STRLEN(m_ld_linux_so_2,        strlen)
-STRLEN(m_ld_linux_x86_64_so_2, strlen)
-STRLEN(m_ld_so_1,              strlen)
+STRLEN(VG_Z_LIBC_SONAME,          strlen)
+STRLEN(VG_Z_LD_LINUX_SO_2,        strlen)
+STRLEN(VG_Z_LD_LINUX_X86_64_SO_2, strlen)
+STRLEN(VG_Z_LD_SO_1,              strlen)
 
 
 #define STRCMP(soname, fnname) \
@@ -120,9 +96,9 @@
       return 0; \
    }
 
-STRCMP(m_libc_soname,          strcmp)
-STRCMP(m_ld_linux_x86_64_so_2, strcmp)
-STRCMP(m_ld64_so_1,            strcmp)
+STRCMP(VG_Z_LIBC_SONAME,          strcmp)
+STRCMP(VG_Z_LD_LINUX_X86_64_SO_2, strcmp)
+STRCMP(VG_Z_LD64_SO_1,            strcmp)
 
 
 #define MEMCPY(soname, fnname) \
@@ -167,9 +143,9 @@
    return dest; \
    }
 
-MEMCPY(m_libc_soname, memcpy)
-MEMCPY(m_ld_so_1,     memcpy) /* ld.so.1 */
-MEMCPY(m_ld64_so_1,   memcpy) /* ld64.so.1 */
+MEMCPY(VG_Z_LIBC_SONAME, memcpy)
+MEMCPY(VG_Z_LD_SO_1,     memcpy) /* ld.so.1 */
+MEMCPY(VG_Z_LD64_SO_1,   memcpy) /* ld64.so.1 */
 
 
 /* Copy SRC to DEST, returning the address of the terminating '\0' in
@@ -184,9 +160,9 @@
       return dst; \
    }
 
-STPCPY(m_libc_soname,         stpcpy)
-STPCPY(m_ld_linux_so_2,        stpcpy)
-STPCPY(m_ld_linux_x86_64_so_2, stpcpy)
+STPCPY(VG_Z_LIBC_SONAME,          stpcpy)
+STPCPY(VG_Z_LD_LINUX_SO_2,        stpcpy)
+STPCPY(VG_Z_LD_LINUX_X86_64_SO_2, stpcpy)
 
 
 /*--------------------------------------------------------------------*/