Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

* 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
  • Loading branch information...
commit 5c6e6441966c41135a1d08c32b177748d9c15e2d 1 parent 9031084
Nobuyoshi Nakada nobu authored
9 ChangeLog
... ... @@ -1,3 +1,12 @@
  1 +Wed Apr 20 23:22:39 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
  2 +
  3 + * Makefile.in, common.mk: miniruby depens on MINIOBJS.
  4 +
  5 + * dmydln.c (dln_load): dummy function to raise LoadError.
  6 +
  7 + * cygwin/GNUmakefile.in, {bcc32,win32,wince}/Makefile.sub: miniruby
  8 + can't load extensions on Windows.
  9 +
1 10 Wed Apr 20 23:01:35 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
2 11
3 12 * win32/ifchange.bat: delete testing files.
2  Makefile.in
@@ -97,7 +97,7 @@ all:
97 97
98 98 miniruby$(EXEEXT):
99 99 @$(RM) $@
100   - $(PURIFY) $(CC) $(MAINOBJ) $(LIBRUBY_A) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(MAINLIBS)
  100 + $(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(LIBRUBY_A) $(LIBS) $(OUTFLAG)$@ $(LDFLAGS) $(MAINLIBS)
101 101
102 102 $(PROGRAM):
103 103 @$(RM) $@
3  bcc32/Makefile.sub
@@ -172,6 +172,7 @@ DMYOBJS = dmyext.obj
172 172 OBJEXT = obj
173 173
174 174 WINMAINOBJ = winmain.$(OBJEXT)
  175 +MINIOBJS = dmydln.$(OBJEXT)
175 176
176 177 .path.c = .;$(srcdir);$(srcdir)win32;$(srcdir)missing
177 178 .path.h = .;$(srcdir);$(srcdir)win32;$(srcdir)missing
@@ -395,7 +396,7 @@ s,@top_srcdir@,$(srcdir),;t t
395 396
396 397 miniruby$(EXEEXT):
397 398 @echo $(LIBS)
398   - $(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ),$@,nul,$(LIBRUBY_A) $(LIBS)
  399 + $(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(MINIOBJS),$@,nul,$(LIBRUBY_A) $(LIBS)
399 400
400 401 $(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res
401 402 $(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ),$@,nul,$(LIBRUBYARG) $(LIBS),,$(RUBY_INSTALL_NAME).res
5 common.mk
@@ -66,7 +66,7 @@ all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY)
66 66 @$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS)
67 67 prog: $(PROGRAM) $(WPROGRAM)
68 68
69   -miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) $(OBJS) $(DMYEXT)
  69 +miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) $(MINIOBJS) $(OBJS) $(DMYEXT)
70 70
71 71 $(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP)
72 72
@@ -217,6 +217,9 @@ dir.$(OBJEXT): {$(VPATH)}dir.c {$(VPATH)}ruby.h config.h \
217 217 dln.$(OBJEXT): {$(VPATH)}dln.c {$(VPATH)}ruby.h config.h \
218 218 {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
219 219 {$(VPATH)}dln.h
  220 +dmydln.$(OBJEXT): {$(VPATH)}dmydln.c {$(VPATH)}dln.c {$(VPATH)}ruby.h \
  221 + config.h {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
  222 + {$(VPATH)}dln.h
220 223 dmyext.$(OBJEXT): {$(VPATH)}dmyext.c
221 224 enum.$(OBJEXT): {$(VPATH)}enum.c {$(VPATH)}ruby.h config.h \
222 225 {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
2  cygwin/GNUmakefile.in
... ... @@ -1,3 +1,5 @@
  1 +MINIOBJS = dmydln.o
  2 +
1 3 include Makefile
2 4
3 5 ENABLE_SHARED=@ENABLE_SHARED@
10 dln.c
@@ -91,6 +91,8 @@ char *getenv();
91 91
92 92 int eaccess();
93 93
  94 +#ifndef NO_DLN_LOAD
  95 +
94 96 #if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) && !defined(_UNICOSMP)
95 97 /* dynamic load with dlopen() */
96 98 # define USE_DLN_DLOPEN
@@ -1256,10 +1258,16 @@ aix_loaderror(const char *pathname)
1256 1258 }
1257 1259 #endif
1258 1260
  1261 +#endif /* NO_DLN_LOAD */
  1262 +
1259 1263 void*
1260 1264 dln_load(file)
1261 1265 const char *file;
1262 1266 {
  1267 +#ifdef NO_DLN_LOAD
  1268 + rb_raise(rb_eLoadError, "this executable file can't load extension libraries");
  1269 +#else
  1270 +
1263 1271 #if !defined(_AIX) && !defined(NeXT)
1264 1272 const char *error = 0;
1265 1273 #define DLN_ERROR() (error = dln_strerror(), strcpy(ALLOCA_N(char, strlen(error) + 1), error))
@@ -1592,6 +1600,8 @@ dln_load(file)
1592 1600 failed:
1593 1601 rb_loaderror("%s - %s", error, file);
1594 1602 #endif
  1603 +
  1604 +#endif /* NO_DLN_LOAD */
1595 1605 return 0; /* dummy return */
1596 1606 }
1597 1607
2  dmydln.c
... ... @@ -0,0 +1,2 @@
  1 +#define NO_DLN_LOAD 1
  2 +#include "dln.c"
3  win32/Makefile.sub
@@ -173,6 +173,7 @@ EXTOBJS =
173 173 DLDOBJS =
174 174
175 175 WINMAINOBJ = winmain.$(OBJEXT)
  176 +MINIOBJS = dmydln.$(OBJEXT)
176 177
177 178 all: $(srcdir)/win32/Makefile.sub $(srcdir)/common.mk
178 179
@@ -411,7 +412,7 @@ s,@top_srcdir@,$(srcdir),;t t
411 412
412 413 miniruby$(EXEEXT):
413 414 @echo. $(LIBS)
414   - $(PURIFY) $(CC) $(MAINOBJ) $(LIBRUBY_A) $(LIBS) -Fe$@ $(LDFLAGS)
  415 + $(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(LIBRUBY_A) $(LIBS) -Fe$@ $(LDFLAGS)
415 416
416 417 $(PROGRAM): $(RUBY_INSTALL_NAME).res
417 418 $(PURIFY) $(CC) $(MAINOBJ) $(RUBY_INSTALL_NAME).res \

0 comments on commit 5c6e644

Please sign in to comment.
Something went wrong with that request. Please try again.