From: Alexandre Oliva Date: Wed, 20 Jan 1999 18:42:10 +0000 (+0000) Subject: * cdemo/main.c (main): use K&R definition syntax X-Git-Tag: ild-branchpoint~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5053e11d812871d683b4caa6e6c65eb9e696d71c;p=thirdparty%2Flibtool.git * 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 --- diff --git a/ChangeLog b/ChangeLog index 89b7e928b..d897f6db7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 1999-01-20 Alexandre Oliva + * 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 diff --git a/cdemo/main.c b/cdemo/main.c index 67e2c111b..291f35845 100644 --- a/cdemo/main.c +++ b/cdemo/main.c @@ -23,7 +23,9 @@ USA. */ int -main (int argc, char **argv) +main (argc,argv) + int argc; + char **argv; { int value; diff --git a/mdemo/main.c b/mdemo/main.c index bfea57bfb..53f86f5de 100644 --- a/mdemo/main.c +++ b/mdemo/main.c @@ -23,7 +23,8 @@ USA. */ #include 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;