diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-05 01:40:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-05 01:40:24 +0000 |
commit | 10c93d6c7469e0b33f268c86e61ff87eb9ccbb9e (patch) | |
tree | 1cb15b97b59f3abc62c35b7691b8a5ececdbdc7d | |
parent | af8250ec340fa7d5b02739ecbad3519874253bdc (diff) |
* ruby.c (ruby_init_loadpath): under Windows, get the module
path from an internal address instead of hard coded library
name.
* cygwin/GNUmakefile.in, bcc32/Makefile.sub,
win32/Makefile.sub (CPPFLAGS): removed LIBRUBY_SO macro.
* bcc32/Makefile.sub, win32/Makefile.sub (config.h): no longer
depends on makefiles.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | bcc32/Makefile.sub | 4 | ||||
-rw-r--r-- | cygwin/GNUmakefile.in | 4 | ||||
-rw-r--r-- | ruby.c | 9 | ||||
-rw-r--r-- | win32/Makefile.sub | 4 |
5 files changed, 22 insertions, 11 deletions
@@ -1,3 +1,15 @@ +Sun Jan 5 09:36:46 2003 Nobuyoshi Nakada <[email protected]> + + * ruby.c (ruby_init_loadpath): under Windows, get the module + path from an internal address instead of hard coded library + name. + + * cygwin/GNUmakefile.in, bcc32/Makefile.sub, + win32/Makefile.sub (CPPFLAGS): removed LIBRUBY_SO macro. + + * bcc32/Makefile.sub, win32/Makefile.sub (config.h): no longer + depends on makefiles. + Sun Jan 5 03:43:47 2003 Akinori MUSHA <[email protected]> * defines.h (FLUSH_REGISTER_WINDOWS): Make the flushw call an diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub index 3023a77537..965f564ce8 100644 --- a/bcc32/Makefile.sub +++ b/bcc32/Makefile.sub @@ -90,7 +90,7 @@ DESTDIR = $(prefix) CFLAGS = -q $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w- !endif !ifndef CPPFLAGS -CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)missing -DLIBRUBY_SO=\"$(LIBRUBY_SO)\" +CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)missing !endif !ifndef LDFLAGS LDFLAGS = -S:$(STACK) @@ -193,7 +193,7 @@ dll: $(LIBRUBY_SO) config: config.h config.status -config.h: Makefile $(srcdir)bcc32/Makefile.sub +config.h: @echo Creating $(@:.\=) @type > $@ &&| \#define HAVE_PROTOTYPES 1 diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in index af79698963..0acb327bbd 100644 --- a/cygwin/GNUmakefile.in +++ b/cygwin/GNUmakefile.in @@ -2,9 +2,7 @@ include Makefile ENABLE_SHARED=@ENABLE_SHARED@ -ifeq ($(ENABLE_SHARED),yes) - CPPFLAGS += -DLIBRUBY_SO=\"$(LIBRUBY_SO)\" -else +ifneq ($(ENABLE_SHARED),yes) RUBY_EXP = $(RUBY_INSTALL_NAME).exp EXTOBJS = $(RUBY_EXP) LIBRUBYARG = $(LIBRUBY_A) @@ -238,11 +238,12 @@ ruby_init_loadpath() char *p; int rest; #if defined _WIN32 || defined __CYGWIN__ -# if defined LIBRUBY_SO - HMODULE libruby = GetModuleHandle(LIBRUBY_SO); -# else HMODULE libruby = NULL; -# endif + MEMORY_BASIC_INFORMATION m; + + memset(&m, 0, sizeof(m)); + if (VirtualQuery(ruby_init_loadpath, &m, sizeof(m)) && m.State == MEM_COMMIT) + libruby = (HMODULE)m.AllocationBase; GetModuleFileName(libruby, libpath, sizeof libpath); #elif defined(DJGPP) extern char *__dos_argv0; diff --git a/win32/Makefile.sub b/win32/Makefile.sub index ca41c9d7bc..57add88df7 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -81,7 +81,7 @@ DESTDIR = $(prefix) CFLAGS = -MD $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) !endif !if !defined(CPPFLAGS) -CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/missing -DLIBRUBY_SO=\"$(LIBRUBY_SO)\" +CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/missing !endif !if !defined(XLDFLAGS) XLDFLAGS = @@ -183,7 +183,7 @@ dll: $(LIBRUBY_SO) config: config.h config.status -config.h: Makefile $(srcdir)/win32/Makefile.sub +config.h: @echo Creating <<$@ #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 |