]> granicus.if.org Git - graphviz/commitdiff
Fix different calling conventions for qsort_s.
authorEmden R. Gansner <erg@alum.mit.edu>
Wed, 6 Jan 2016 19:14:05 +0000 (14:14 -0500)
committerEmden R. Gansner <erg@alum.mit.edu>
Wed, 6 Jan 2016 19:14:05 +0000 (14:14 -0500)
lib/common/postproc.c

index 6130bc81b1069721bdda140e0190b1686c175703..f23a8e5e9fdc71f9fa4d1f7f5b5bb2e106c21f01 100644 (file)
@@ -641,8 +641,10 @@ static void addXLabels(Agraph_t * gp)
     if (priorities) {
        xlabs.priorities = priorities;
        xlabs.p0 = objs;
-#if defined(WIN32)  || defined(DARWIN)
+#if defined(WIN32)
        qsort_s(objs, n_objs, sizeof(object_t), (qsort_s_cmpf)cmp_obj, &xlabs);
+#elif defined(DARWIN)
+       qsort_r(objs, n_objs, sizeof(object_t), &xlabs, (qsort_s_cmpf)cmp_obj);
 #elif (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8)
        // EL5 has glibc 2.5 and no qsort_r
        XLABS=&xlabs;  //uses global - non-rentrant