]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* cdemo/main.c (main): use K&R definition syntax
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Wed, 20 Jan 1999 18:42:10 +0000 (18:42 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Wed, 20 Jan 1999 18:42:10 +0000 (18:42 +0000)
* mdemo/main.c (test_dl, main): ditto
(test_dl): casts return value of lt_dlsym to appropriate types

ChangeLog
cdemo/main.c
mdemo/main.c

index 89b7e928b4cf01e8496fa32f56fe063883a55740..d897f6db77a593b90d878d0ad3c2b389920bdaa7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 67e2c111b4672a1c27b650d529b85661dc1b214e..291f358459fe0389b3c95187f2e2a358536d0d8f 100644 (file)
@@ -23,7 +23,9 @@ USA. */
 
 
 int
-main (int argc, char **argv)
+main (argc,argv)
+  int argc;
+  char **argv;
 {
   int value;
 
index bfea57bfb9d1e08123967830d1862d441a4bf312..53f86f5de6b7e438b94b78da11f8cf01c9188963 100644 (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;