View | Details | Raw Unified | Return to bug 231256 | Differences between
and this patch

Collapse All | Expand All

(-)src/sort_r.h (-4 / +5 lines)
Lines 24-33 Link Here
24
     defined OpenBSD3_1 || defined OpenBSD3_9 || defined __OpenBSD__ || \
24
     defined OpenBSD3_1 || defined OpenBSD3_9 || defined __OpenBSD__ || \
25
     defined __NetBSD__ || \
25
     defined __NetBSD__ || \
26
     defined __DragonFly__ || \
26
     defined __DragonFly__ || \
27
     defined AMIGA)
27
     defined AMIGA) && !defined(qsort_r)
28
#  define _SORT_R_BSD
28
#  define _SORT_R_BSD
29
#elif (defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ || \
29
#elif (defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ || \
30
       defined __linux__ || defined __MINGW32__ || defined __GLIBC__)
30
       defined __linux__ || defined __MINGW32__ || defined __GLIBC__) || \
31
       defined(qsort_r)
31
#  define _SORT_R_LINUX
32
#  define _SORT_R_LINUX
32
#elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
33
#elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
33
#  define _SORT_R_WINDOWS
34
#  define _SORT_R_WINDOWS
Lines 64-70 Link Here
64
  #if defined _SORT_R_BSD
65
  #if defined _SORT_R_BSD
65
66
66
    /* BSD requires argument swap */
67
    /* BSD requires argument swap */
67
    extern void qsort_r(void *base, size_t nel, size_t width, void *thunk,
68
    extern void (qsort_r)(void *base, size_t nel, size_t width, void *thunk,
68
                        int (*compar)(void *_thunk, const void *_a, const void *_b));
69
                        int (*compar)(void *_thunk, const void *_a, const void *_b));
69
70
70
    struct sort_r_data
71
    struct sort_r_data
Lines 82-88 Link Here
82
  #elif defined _SORT_R_LINUX
83
  #elif defined _SORT_R_LINUX
83
84
84
    typedef int(* __compar_d_fn_t)(const void *, const void *, void *);
85
    typedef int(* __compar_d_fn_t)(const void *, const void *, void *);
85
    extern void qsort_r(void *base, size_t nel, size_t width,
86
    extern void (qsort_r)(void *base, size_t nel, size_t width,
86
                        __compar_d_fn_t __compar, void *arg)
87
                        __compar_d_fn_t __compar, void *arg)
87
      __attribute__((nonnull (1, 4)));
88
      __attribute__((nonnull (1, 4)));
88
89

Return to bug 231256