Use dlsym on OS X if available
On OS X 10.4 and newer, we have to use dlsym because the old NS* interface has been deprecated. The patch checks for HAVE_DLFCN_H instead of switching on the OS version. There is one additional quirk: although OS X prefixes global symbols with an underscore, dlsym expects its argument NOT to have a leading underscore. As a hack, we simply strip it off in lookupSymbol. Something a bit more elaborate might be cleaner.
Showing with 15 additions and 0 deletions