1999-01-20 Alexandre Oliva <oliva@dcc.unicamp.br>
+ * cdemo/main.c (main): use K&R definition syntax
+ * mdemo/main.c (test_dl, main): ditto
+ (test_dl): casts return value of lt_dlsym to appropriate types
+
* ltmain.in (dlsyms): #define const to nothing if not __STDC__
* ltconfig.in (global_symbol_pipe): #define const to nothing if
#include <stdio.h>
int
-test_dl (char *filename)
+test_dl (filename)
+ char *filename;
{
lt_dlhandle handle;
int (*pfoo1)() = 0;
fprintf (stderr, "error was: %s\n", lt_dlerror());
return 1;
}
- phello = lt_dlsym(handle, "hello");
- pfoo1 = lt_dlsym(handle, "foo1");
- pfoo2 = lt_dlsym(handle, "foo2");
- pnothing = lt_dlsym(handle, "nothing");
+ phello = (int(*)())lt_dlsym(handle, "hello");
+ pfoo1 = (int(*)())lt_dlsym(handle, "foo1");
+ pfoo2 = (int(*)())lt_dlsym(handle, "foo2");
+ pnothing = (int*)lt_dlsym(handle, "nothing");
if (phello)
{
}
int
-main (int argc, char **argv)
+main (argc, argv)
+ int argc;
+ char **argv;
{
int i;