1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2001-04-17 15:35:04 +00:00
parent 08d683deb2
commit 0570626cc5
5 changed files with 35 additions and 12 deletions

21
dln.c
View file

@ -1214,7 +1214,7 @@ aix_loaderror(const char *pathname)
}
#endif
void
void*
dln_load(file)
const char *file;
{
@ -1242,13 +1242,13 @@ dln_load(file)
}
/* Call the init code */
(*init_fct)();
return;
return handle;
#else
#ifdef USE_DLN_A_OUT
if (load(file) == -1) {
goto failed;
}
return;
return 0;
#else
char buf[MAXPATHLEN];
@ -1274,11 +1274,12 @@ dln_load(file)
}
if ((init_fct = (void(*)())dlsym(handle, buf)) == NULL) {
dlclose(handle);
goto failed;
}
/* Call the init code */
(*init_fct)();
return;
return handle;
}
#endif /* USE_DLN_DLOPEN */
@ -1304,7 +1305,7 @@ dln_load(file)
}
}
(*init_fct)();
return;
return (void*)lib;
}
#endif /* hpux */
@ -1321,7 +1322,7 @@ dln_load(file)
aix_loaderror(file);
}
(*init_fct)();
return;
return (void*)init_fct;
}
#endif /* _AIX */
@ -1360,7 +1361,7 @@ dln_load(file)
init_fct = (void(*)())init_address;
(*init_fct)();
return;
return (void*)init_address;
}
#else/* OPENSTEP dyld functions */
{
@ -1390,7 +1391,7 @@ dln_load(file)
init_fct = NSAddressOfSymbol(NSLookupAndBindSymbol(buf));
(*init_fct)();
return;
return (void*)init_fct;
}
#endif /* rld or dyld */
#endif
@ -1438,7 +1439,7 @@ dln_load(file)
/* call module initialize function. */
(*init_fct)();
return;
return (void*)img_id;
}
#endif /* __BEOS__*/
@ -1486,7 +1487,7 @@ dln_load(file)
init_fct = (void (*)())symAddr;
(*init_fct)();
return;
return (void*)init_fct;
}
#endif /* __MACOS__ */