From 70779bf224fdcd7b00373bbc64c30beae959c242 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 20 Apr 2005 14:25:34 +0000 Subject: * 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 --- dln.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'dln.c') 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 */ } -- cgit v1.2.3