* sysdeps/unix/sysv/linux/alpha/adjtime.c: Use <> instead of "" in
[glibc.git] / elf / tst-pathopt.c
blob1f7aac2a41aebeb52caaddf2c450388e10db9650
1 #include <dlfcn.h>
2 #include <mcheck.h>
3 #include <stdio.h>
4 #include <stdlib.h>
7 int
8 main (void)
10 void *h;
11 int (*fp) (int);
12 int result;
14 mtrace ();
16 h = dlopen ("renamed.so", RTLD_LAZY);
17 if (h == NULL)
19 printf ("failed to load \"%s\": %s\n", "renamed.so", dlerror ());
20 exit (1);
23 fp = dlsym (h, "in_renamed");
24 if (fp == NULL)
26 printf ("lookup of \"%s\" failed: %s\n", "in_renamed", dlerror ());
27 exit (1);
30 result = fp (10);
32 if (dlclose (h) != 0)
34 printf ("failed to close \"%s\": %s\n", "renamed.so", dlerror ());
35 exit (1);
38 return result;