summaryrefslogtreecommitdiffstats
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
commitec1cf0acc67dde3678c4b1ae7515d1ae09916722 (patch)
tree5f891639c5f6a02c5018f8de48f97b4e4426c5bf /dln.c
parent07f41a0ec620faaf0d35d1d9022f8b52d3e55469 (diff)
downloadruby-ec1cf0acc67dde3678c4b1ae7515d1ae09916722.tar.gz
ruby-ec1cf0acc67dde3678c4b1ae7515d1ae09916722.tar.xz
ruby-ec1cf0acc67dde3678c4b1ae7515d1ae09916722.zip
* 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: http://svn.ruby-lang.org/repos/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 efdbcc8d0..fbfd6c2db 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 */
}