+ std::string binary_name;
+
+ const char *just_filename= rindex(argv[0], '/');
+ if (just_filename)
+ {
+ just_filename++;
+ }
+ else
+ {
+ just_filename= argv[0];
+ }
+
+ if (just_filename[0] == 'l' and just_filename[1] == 't' and just_filename[2] == '-')
+ {
+ just_filename+= 3;
+ }
+ binary_name.append(just_filename);
+
+ /*
+ Valgrind does not currently work reliably, or sometimes at all, on OSX
+ - Fri Jun 15 11:24:07 EDT 2012
+ */
+#if defined(__APPLE__) && __APPLE__
+ if (valgrind_is_caller())
+ {
+ return EXIT_SKIP;
+ }
+#endif