* demo/dlmain.c (main): cast s->address to the appropriate pointer

types, otherwise StunOS4's cc refuses to compile it
This commit is contained in:
Alexandre Oliva 1999-01-20 18:06:47 +00:00 committed by Alexandre Oliva
parent 8d22e74b08
commit 79089aad81
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,8 @@
1999-01-20 Alexandre Oliva <oliva@dcc.unicamp.br>
* demo/dlmain.c (main): cast s->address to the appropriate pointer
types, otherwise StunOS4's cc refuses to compile it
* ltconfig.in (sunos4*, without_gnu_ld, with_gcc, archive_cmds):
add -fPIC, because libgcc is multilibbed, and we want the PIC
version of it for shared libraries, otherwise ld complains

View File

@ -76,11 +76,11 @@ main (argc, argv)
const char *name = s->name;
printf ("found symbol: %s\n", name);
if (!strcmp ("hello", name))
phello = s->address;
phello = (int(*)())s->address;
else if (!strcmp ("foo", name))
pfoo = s->address;
pfoo = (int(*)())s->address;
else if (!strcmp ("nothing", name))
pnothing = s->address;
pnothing = (int*)s->address;
} else
printf ("found file: %s\n", s->name);
s ++;