powerpc64: Fix dl-trampoline.S big-endian / non-ROP build failure
[glibc.git] / misc / tst-hsearch.c
blobd390f1dcf3545502bdd4fc10542a62d725b16a76
1 #include <search.h>
2 #include <stdio.h>
4 static int
5 do_test (void)
7 int a = 1;
8 int b = 2;
9 ENTRY i;
10 ENTRY *e;
12 if (hcreate (20) == 0)
14 puts ("hcreate failed");
15 return 1;
18 i.key = (char *) "one";
19 i.data = &a;
20 if (hsearch (i, ENTER) == NULL)
21 return 1;
23 i.key = (char *) "one";
24 i.data = &b;
25 e = hsearch (i, ENTER);
26 printf ("e.data = %d\n", *(int *) e->data);
27 if (*(int *) e->data != 1)
28 return 1;
30 return 0;
33 #define TEST_FUNCTION do_test ()
34 #include "../test-skeleton.c"