aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdeps/tryqsortr_freebsd.c
blob: 6bf090af6ec8f475783727c5d39eaa59f1cd43c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* ISC license. */

#include <stdlib.h>

static int f (void const *a, void const *b, void *c)
{
  int aa = *(int *)a ;
  int bb = *(int *)b ;
  (void)c ;
  return aa < bb ? -1 : aa > bb ;
}

int main (void)
{
  char *x = "blah" ;
  int x[2] = { 2, 1 } ;
  qsort_r(x, 2, sizeof(int), x, &f) ;
  return 0 ;
}