/* Path to library directory */
const Char *VG_(libdir) = VG_LIBDIR;
+const Char *VG_(LD_PRELOAD_var_name) =
+#if defined(VGO_linux) || defined(VGO_aix5) || defined(VGO_l4re)
+ "LD_PRELOAD";
+#elif defined(VGO_darwin)
+ "DYLD_INSERT_LIBRARIES";
+#else
+# error Unknown OS
+#endif
+
/* We do getenv without libc's help by snooping around in
VG_(client_envp) as determined at startup time. */
Char *VG_(getenv)(Char *varname)
entry_start = output+1; /* entry starts after ':' */
}
- *output++ = *varp++;
+ if (*varp)
+ *output++ = *varp++;
}
+ /* make sure last entry is nul terminated */
+ *output = '\0';
+
/* match against the last entry */
if (VG_(string_match)(remove_pattern, entry_start)) {
output = entry_start;