* 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
This commit is contained in:
Alexandre Oliva 1999-01-20 18:42:10 +00:00 committed by Alexandre Oliva
parent 1636655430
commit 5053e11d81
3 changed files with 16 additions and 7 deletions

View File

@ -1,5 +1,9 @@
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

View File

@ -23,7 +23,9 @@ USA. */
int
main (int argc, char **argv)
main (argc,argv)
int argc;
char **argv;
{
int value;

View File

@ -23,7 +23,8 @@ USA. */
#include <stdio.h>
int
test_dl (char *filename)
test_dl (filename)
char *filename;
{
lt_dlhandle handle;
int (*pfoo1)() = 0;
@ -37,10 +38,10 @@ test_dl (char *filename)
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)
{
@ -78,7 +79,9 @@ test_dl (char *filename)
}
int
main (int argc, char **argv)
main (argc, argv)
int argc;
char **argv;
{
int i;