summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-04-20 14:25:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-04-20 14:25:34 +0000
commit70779bf224fdcd7b00373bbc64c30beae959c242 (patch)
tree5f891639c5f6a02c5018f8de48f97b4e4426c5bf /dln.c
parenta768498ffafdc343e595d6b80e674c4ac8eb45ce (diff)
* 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/branches/ruby_1_8@8364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/dln.c b/dln.c
index efdbcc8d02..fbfd6c2db2 100644
--- a/dln.c
+++ b/dln.c
@@ -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
@@ -1274,10 +1276,16 @@ static int vms_fileact(char *filespec, int type);
static long vms_fisexh(long *sigarr, long *mecarr);
#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))
@@ -1633,6 +1641,8 @@ dln_load(file)
failed:
rb_loaderror("%s - %s", error, file);
#endif
+
+#endif /* NO_DLN_LOAD */
return 0; /* dummy return */
}