diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-04-20 14:25:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-04-20 14:25:34 +0000 |
commit | 5c6e6441966c41135a1d08c32b177748d9c15e2d (patch) | |
tree | eb900b24a105da3d67f6ed7f346194d75a05d349 /dln.c | |
parent | 9031084686439d54fe1bf88db7d96372f255ac16 (diff) | |
download | ruby-5c6e6441966c41135a1d08c32b177748d9c15e2d.tar.gz |
* Makefile.in, common.mk: miniruby depens on MINIOBJS.
* dmydln.c (dln_load): dummy function to raise LoadError.
* cygwin/GNUmakefile.in, {bcc32,win32,wince}/Makefile.sub: miniruby
can't load extensions on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r-- | dln.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -91,6 +91,8 @@ char *getenv(); int eaccess(); +#ifndef NO_DLN_LOAD + #if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) && !defined(_UNICOSMP) /* dynamic load with dlopen() */ # define USE_DLN_DLOPEN @@ -1256,10 +1258,16 @@ aix_loaderror(const char *pathname) } #endif +#endif /* NO_DLN_LOAD */ + void* dln_load(file) const char *file; { +#ifdef NO_DLN_LOAD + rb_raise(rb_eLoadError, "this executable file can't load extension libraries"); +#else + #if !defined(_AIX) && !defined(NeXT) const char *error = 0; #define DLN_ERROR() (error = dln_strerror(), strcpy(ALLOCA_N(char, strlen(error) + 1), error)) @@ -1592,6 +1600,8 @@ dln_load(file) failed: rb_loaderror("%s - %s", error, file); #endif + +#endif /* NO_DLN_LOAD */ return 0; /* dummy return */ } |