Merge the DARWIN branch onto the trunk.

I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts.  So instead I just took the diff between
the branch and trunk  at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/cachegrind/cg_main.c b/cachegrind/cg_main.c
index 279356b..6c4e1e4 100644
--- a/cachegrind/cg_main.c
+++ b/cachegrind/cg_main.c
@@ -1464,13 +1464,14 @@
    if (VG_(clo_verbosity) == 0) 
       return;
 
-   #define MAX(a, b)  ((a) >= (b) ? (a) : (b))
+   // Nb: this isn't called "MAX" because that overshadows a global on Darwin.
+   #define CG_MAX(a, b)  ((a) >= (b) ? (a) : (b))
 
    /* I cache results.  Use the I_refs value to determine the first column
     * width. */
    l1 = ULong_width(Ir_total.a);
-   l2 = ULong_width(MAX(Dr_total.a, Bc_total.b));
-   l3 = ULong_width(MAX(Dw_total.a, Bi_total.b));
+   l2 = ULong_width(CG_MAX(Dr_total.a, Bc_total.b));
+   l3 = ULong_width(CG_MAX(Dw_total.a, Bi_total.b));
 
    /* Make format string, getting width right for numbers */
    VG_(sprintf)(fmt, "%%s %%,%dllu", l1);