This is the mail archive of the guile@cygnus.com mailing list for the guile project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hello Tim,
under linux-elf, DLSYM_ADDS_USCORE is not defined, which is CORRECT!
But is not correct to add underscore, because linux-elf has does not use
an extra underscore at all! Here is untested peace of dynl-dl.c, with a
hopefully correct behavior:
#ifdef Linux
#define WE_DONT_NEED_UNDERSCORES_AT_ALL
#endif
#if (defined(DLSYM_ADDS_USCORE) || defined(WE_DONT_NEED_UNDERSCORES_AT_ALL))
fptr = dlsym (handle, symb);
#else
usymb = (char *) malloc (strlen (symb) + 2);
*usymb = '_';
strcpy (usymb + 1, symb);
fptr = dlsym (handle, usymb);
free (usymb);
#endif