aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdeps/tryqsortr_posix.c
blob: 63c1d60810bd4638941cd572d0d3b2bde8a75abf (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), &f, x) ;
  return 0 ;
}