1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2003-01-05 01:40:24 +00:00
parent af8250ec34
commit 10c93d6c74
5 changed files with 22 additions and 11 deletions

View file

@ -1,3 +1,15 @@
Sun Jan 5 09:36:46 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* 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 <knu@iDaemons.org> Sun Jan 5 03:43:47 2003 Akinori MUSHA <knu@iDaemons.org>
* defines.h (FLUSH_REGISTER_WINDOWS): Make the flushw call an * defines.h (FLUSH_REGISTER_WINDOWS): Make the flushw call an

View file

@ -90,7 +90,7 @@ DESTDIR = $(prefix)
CFLAGS = -q $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w- CFLAGS = -q $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w-
!endif !endif
!ifndef CPPFLAGS !ifndef CPPFLAGS
CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)missing -DLIBRUBY_SO=\"$(LIBRUBY_SO)\" CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)missing
!endif !endif
!ifndef LDFLAGS !ifndef LDFLAGS
LDFLAGS = -S:$(STACK) LDFLAGS = -S:$(STACK)
@ -193,7 +193,7 @@ dll: $(LIBRUBY_SO)
config: config.h config.status config: config.h config.status
config.h: Makefile $(srcdir)bcc32/Makefile.sub config.h:
@echo Creating $(@:.\=) @echo Creating $(@:.\=)
@type > $@ &&| @type > $@ &&|
\#define HAVE_PROTOTYPES 1 \#define HAVE_PROTOTYPES 1

View file

@ -2,9 +2,7 @@ include Makefile
ENABLE_SHARED=@ENABLE_SHARED@ ENABLE_SHARED=@ENABLE_SHARED@
ifeq ($(ENABLE_SHARED),yes) ifneq ($(ENABLE_SHARED),yes)
CPPFLAGS += -DLIBRUBY_SO=\"$(LIBRUBY_SO)\"
else
RUBY_EXP = $(RUBY_INSTALL_NAME).exp RUBY_EXP = $(RUBY_INSTALL_NAME).exp
EXTOBJS = $(RUBY_EXP) EXTOBJS = $(RUBY_EXP)
LIBRUBYARG = $(LIBRUBY_A) LIBRUBYARG = $(LIBRUBY_A)

9
ruby.c
View file

@ -238,11 +238,12 @@ ruby_init_loadpath()
char *p; char *p;
int rest; int rest;
#if defined _WIN32 || defined __CYGWIN__ #if defined _WIN32 || defined __CYGWIN__
# if defined LIBRUBY_SO
HMODULE libruby = GetModuleHandle(LIBRUBY_SO);
# else
HMODULE libruby = NULL; 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); GetModuleFileName(libruby, libpath, sizeof libpath);
#elif defined(DJGPP) #elif defined(DJGPP)
extern char *__dos_argv0; extern char *__dos_argv0;

View file

@ -81,7 +81,7 @@ DESTDIR = $(prefix)
CFLAGS = -MD $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) CFLAGS = -MD $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
!endif !endif
!if !defined(CPPFLAGS) !if !defined(CPPFLAGS)
CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/missing -DLIBRUBY_SO=\"$(LIBRUBY_SO)\" CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/missing
!endif !endif
!if !defined(XLDFLAGS) !if !defined(XLDFLAGS)
XLDFLAGS = XLDFLAGS =
@ -183,7 +183,7 @@ dll: $(LIBRUBY_SO)
config: config.h config.status config: config.h config.status
config.h: Makefile $(srcdir)/win32/Makefile.sub config.h:
@echo Creating <<$@ @echo Creating <<$@
#define STDC_HEADERS 1 #define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_TYPES_H 1