]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4re-core/uclibc/lib/contrib/uclibc/test/tls/tst-tls9.c
Update
[l4.git] / l4 / pkg / l4re-core / uclibc / lib / contrib / uclibc / test / tls / tst-tls9.c
1 #include <dlfcn.h>
2 #include <stdio.h>
3 #include <stdlib.h>
4
5 #include <link.h>
6 #include <tls.h>
7
8 #define TEST_FUNCTION do_test ()
9 static int
10 do_test (void)
11 {
12 #ifdef USE_TLS
13   static const char modname1[] = "tst-tlsmod5.so";
14   static const char modname2[] = "tst-tlsmod6.so";
15   int result = 0;
16
17   void *h1 = dlopen (modname1, RTLD_LAZY);
18   if (h1 == NULL)
19     {
20       printf ("cannot open '%s': %s\n", modname1, dlerror ());
21       result = 1;
22     }
23   void *h2 = dlopen (modname2, RTLD_LAZY);
24   if (h2 == NULL)
25     {
26       printf ("cannot open '%s': %s\n", modname2, dlerror ());
27       result = 1;
28     }
29
30   if (h1 != NULL)
31     dlclose (h1);
32   if (h2 != NULL)
33     dlclose (h2);
34
35   return result;
36 #else
37   return 0;
38 #endif
39 }
40
41
42 #include "../test-skeleton.c"