| 292 | } |
| 293 | |
| 294 | static int dlclose(void *handle) |
| 295 | { |
| 296 | if ((((struct mach_header *)handle)->magic == MH_MAGIC) || |
| 297 | (((struct mach_header *)handle)->magic == MH_CIGAM)) |
| 298 | { |
| 299 | error(0, "Can't remove dynamic libraries on darwin"); |
| 300 | return 0; |
| 301 | } |
| 302 | if (!NSUnLinkModule(handle, 0)) |
| 303 | { |
| 304 | error(0, "unable to unlink module %s", NSNameOfModule(handle)); |
| 305 | return 1; |
| 306 | } |
| 307 | return 0; |
| 308 | } |
| 309 | |
| 310 | |
| 311 | /* dlsym, prepend the underscore and call dlsymIntern */ |