diff options
Diffstat (limited to 'gcc/system.h')
-rw-r--r-- | gcc/system.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/system.h b/gcc/system.h index 4abc321..88dffcc 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -1202,11 +1202,14 @@ helper_const_non_const_cast (const char *p) /* qsort comparator consistency checking: except in release-checking compilers, redirect 4-argument qsort calls to qsort_chk; keep 1-argument invocations corresponding to vec::qsort (cmp): they use C qsort internally anyway. */ -#if CHECKING_P +void qsort_chk (void *, size_t, size_t, int (*)(const void *, const void *)); +void gcc_qsort (void *, size_t, size_t, int (*)(const void *, const void *)); #define PP_5th(a1, a2, a3, a4, a5, ...) a5 #undef qsort +#if CHECKING_P #define qsort(...) PP_5th (__VA_ARGS__, qsort_chk, 3, 2, qsort, 0) (__VA_ARGS__) -void qsort_chk (void *, size_t, size_t, int (*)(const void *, const void *)); +#else +#define qsort(...) PP_5th (__VA_ARGS__, gcc_qsort, 3, 2, qsort, 0) (__VA_ARGS__) #endif #endif /* ! GCC_SYSTEM_H */ |