diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-17 16:27:16 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-17 16:27:16 +0000 |
commit | afae6e33dea2c95f16aa4797780b9461ba1254ff (patch) | |
tree | 9216b6aa1a3472b300a6000de2ea9d4d7b5d5b2d /dln.c | |
parent | 38f92866198ec2037a4b79f078c647a984a187e1 (diff) |
* hash.c, eval.c: Use (*_NSGetEnviron()) instead of environ on
Darwin for namespace cleanness. [ruby-core:00537]
* dln.c (dln_load): Fix Darwin support that has been disabled and
switch to using it on Darwin instead of the system dlopen().
[ruby-core:00541]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r-- | dln.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -81,7 +81,7 @@ char *getenv(); int eaccess(); -#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) +#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) /* dynamic load with dlopen() */ # define USE_DLN_DLOPEN #endif @@ -1394,12 +1394,9 @@ dln_load(file) NSLinkModule(obj_file, file, NSLINKMODULE_OPTION_BINDNOW); /* lookup the initial function */ - /*NSIsSymbolNameDefined require function name without "_" */ - if(NSIsSymbolNameDefined(buf + 1)) { + if(!NSIsSymbolNameDefined(buf)) { rb_loaderror("Failed to lookup Init function %.200s",file); - } - - /* NSLookupAndBindSymbol require function name with "_" !! */ + } init_fct = NSAddressOfSymbol(NSLookupAndBindSymbol(buf)); (*init_fct)(); |