From: Matthew Fernandez Date: Fri, 15 Oct 2021 00:18:06 +0000 (-0700) Subject: update legacy 'qsort_r' comment X-Git-Tag: 2.49.3~12^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f38b0336c6dee6039957f4780391dd9ddf429e06;p=graphviz update legacy 'qsort_r' comment The problem of “call `qsort` but also access some external context” is still relevant, but this functionality has been standardized into `qsort_s` in C11, not `qsort_r`. --- diff --git a/lib/neatogen/delaunay.c b/lib/neatogen/delaunay.c index 61f8ea6c3..6f13c6b33 100644 --- a/lib/neatogen/delaunay.c +++ b/lib/neatogen/delaunay.c @@ -303,9 +303,8 @@ static void addEdge (GtsSegment * e, estate* es) es->n += 1; } -/* If qsort_r ever becomes standardized, this should be used - * instead of having a global variable. - */ +// when moving to C11, qsort_s should be used instead of having a global +// variable static double* _vals; typedef int (*qsort_cmpf) (const void *, const void *);