forked from enlightenment/efl
* src/bin/test_dlfcn.c:
remove dlfcn test, is in the unit test now SVN revision: 38127
This commit is contained in:
parent
826fd4ce79
commit
e4978aeae2
|
@ -1,3 +1,8 @@
|
|||
2008-12-13 Vincent Torri <doursse at users dot sf dot net>
|
||||
|
||||
* src/bin/test_dlfcn.c:
|
||||
remove dlfcn test, is in the unit test now
|
||||
|
||||
2008-12-13 Vincent Torri <doursse at users dot sf dot net>
|
||||
|
||||
* src/bin/Makefile.am:
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
void *module;
|
||||
void *symbol;
|
||||
|
||||
if (argc < 3)
|
||||
{
|
||||
printf ("Usage: %s file.dll symbol\n\n", argv[0]);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
printf ("opening module %s\n", argv[1]);
|
||||
module = dlopen(argv[1], 0);
|
||||
if (!module)
|
||||
{
|
||||
printf ("%s\n", dlerror());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
printf ("opening module %s successful\n", argv[1]);
|
||||
|
||||
printf ("getting symbol %s\n", argv[2]);
|
||||
symbol = dlsym(module, argv[2]);
|
||||
if (!symbol)
|
||||
{
|
||||
printf ("%s\n", dlerror());
|
||||
if (dlclose(module))
|
||||
printf ("%s\n", dlerror());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
printf ("getting symbol %s successful\n", argv[2]);
|
||||
|
||||
printf ("closing module %s\n", argv[1]);
|
||||
if (dlclose(module))
|
||||
{
|
||||
printf ("%s\n", dlerror());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
printf ("closing module %s successful\n", argv[1]);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Loading…
Reference in New Issue