diff options
Diffstat (limited to 'gcc/system.h')
-rw-r--r-- | gcc/system.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/system.h b/gcc/system.h index d04f8fd..56af544 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -1197,13 +1197,14 @@ helper_const_non_const_cast (const char *p) /* Get definitions of HOST_WIDE_INT. */ #include "hwint.h" -/* GCC qsort API-compatible functions: except in release-checking compilers, - redirect 4-argument qsort calls to gcc_qsort; keep 1-argument invocations - corresponding to vec::qsort (cmp): they use C qsort internally anyway. */ -void qsort_chk (void *, size_t, size_t, int (*)(const void *, const void *)); +typedef int sort_r_cmp_fn (const void *, const void *, void *); +void qsort_chk (void *, size_t, size_t, sort_r_cmp_fn *, void *); +void gcc_sort_r (void *, size_t, size_t, sort_r_cmp_fn *, void *); void gcc_qsort (void *, size_t, size_t, int (*)(const void *, const void *)); void gcc_stablesort (void *, size_t, size_t, int (*)(const void *, const void *)); +/* Redirect four-argument qsort calls to gcc_qsort; one-argument invocations + correspond to vec::qsort, and use C qsort internally. */ #define PP_5th(a1, a2, a3, a4, a5, ...) a5 #undef qsort #define qsort(...) PP_5th (__VA_ARGS__, gcc_qsort, 3, 2, qsort, 0) (__VA_ARGS__) |