-// we can only sort one array at a time with the quick-sort based
-// implementation
-#if wxUSE_THREADS
- // need a critical section to protect access to gs_compareFunction and
- // gs_sortAscending variables
- static wxCriticalSection gs_critsectStringSort;
-#endif // wxUSE_THREADS
-
-// function to use for string comparaison
-static wxArrayString::CompareFunction gs_compareFunction = NULL;
-
-// if we don't use the compare function, this flag tells us if we sort the
-// array in ascending or descending order
-static bool gs_sortAscending = true;
-
-// function which is called by quick sort
-extern "C" int wxC_CALLING_CONV // LINKAGEMODE
-wxStringCompareFunction(const void *first, const void *second)
+// we need an adaptor as our predicates use qsort() convention and so return
+// negative, null or positive value depending on whether the first item is less
+// than, equal to or greater than the other one while we need a real boolean
+// predicate now that we use std::sort()
+struct wxSortPredicateAdaptor