mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* common.mk: inverted rules order.
* thread_win32.ci (w32_create_thread): bcc does not have _beginthreadex(). * bcc32/Makefile.sub: headers have moved. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
92cad4305b
commit
2840fa6b65
4 changed files with 50 additions and 15 deletions
|
@ -1,8 +1,15 @@
|
|||
Sat Jul 21 17:32:31 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Sat Jul 21 17:48:26 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* common.mk: inverted rules order.
|
||||
|
||||
* thread_win32.ci (w32_create_thread): bcc does not have
|
||||
_beginthreadex().
|
||||
|
||||
* lib/mkmf.rb (create_makefile): make OBJS depend on RUBY_EXTCONF_H
|
||||
only if extconf.h is created.
|
||||
|
||||
* bcc32/Makefile.sub: headers have moved.
|
||||
|
||||
* bcc32/{Makefile.sub,configure.bat,setup.mak: configure_args
|
||||
support.
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@ OS = bccwin32
|
|||
!error RT not defined. Retry from configure pass.
|
||||
!endif
|
||||
|
||||
arch = $(ARCH)-$(OS)
|
||||
|
||||
## variables may be overridden by $(compile_dir)/Makefile
|
||||
!ifndef srcdir
|
||||
srcdir = ..
|
||||
|
@ -40,7 +42,6 @@ iconinc=-I$(icondirs: = -I)
|
|||
!endif
|
||||
###############
|
||||
|
||||
VPATH = $(srcdir):$(srcdir)/missing
|
||||
.SUFFIXES: .y
|
||||
|
||||
!ifndef CC
|
||||
|
@ -146,7 +147,7 @@ MISSING = acosh.obj crypt.obj erf.obj strlcat.obj strlcpy.obj win32.obj
|
|||
STACK = 0x2000000
|
||||
!endif
|
||||
|
||||
XCFLAGS = -DRUBY_EXPORT -I. -I$(srcdir) -I$(srcdir)/missing
|
||||
XCFLAGS = -DRUBY_EXPORT -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(srcdir)/missing
|
||||
|
||||
ARFLAGS = /a /p32
|
||||
LD = ilink32 -q -Gn
|
||||
|
@ -187,8 +188,15 @@ INSTALLED_LIST= .installed.list
|
|||
WINMAINOBJ = winmain.$(OBJEXT)
|
||||
MINIOBJS = dmydln.$(OBJEXT)
|
||||
|
||||
arch_hdrdir = $(EXTOUT)/include/$(arch)
|
||||
hdrdir = $(srcdir)/include
|
||||
VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/missing;$(srcdir)/win32
|
||||
|
||||
.path.c = .;$(srcdir);$(srcdir)/win32;$(srcdir)/missing
|
||||
.path.h = .;$(srcdir);$(srcdir)/win32;$(srcdir)/missing
|
||||
.path.ci = $(srcdir)
|
||||
.path.inc = .;$(srcdir)
|
||||
.path.def = .;$(srcdir)
|
||||
.path.h = .;$(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/win32;$(srcdir)/missing
|
||||
.path.y = $(srcdir)
|
||||
.path. = $(srcdir)
|
||||
|
||||
|
@ -221,6 +229,7 @@ PHONY: nul
|
|||
@exit
|
||||
|
|
||||
|
||||
RUBY_CONFIG_H = $(arch_hdrdir)/ruby/config.h
|
||||
CONFIG_H = ./.config.h.time
|
||||
|
||||
config: config.status
|
||||
|
@ -228,7 +237,9 @@ config: config.status
|
|||
config.status: $(CONFIG_H)
|
||||
|
||||
$(CONFIG_H): $(MKFILES) $(srcdir)/bcc32/Makefile.sub
|
||||
@$(srcdir:/=\)\win32\ifchange.bat config.h &&|
|
||||
@if not exist $(arch_hdrdir:/=\) md $(arch_hdrdir:/=\)
|
||||
@if not exist $(arch_hdrdir:/=\)\ruby md $(arch_hdrdir:/=\)\ruby
|
||||
@$(srcdir:/=\)\win32\ifchange.bat $(RUBY_CONFIG_H:/=\) &&|
|
||||
\#define HAVE_SYS_TYPES_H 1
|
||||
\#define HAVE_SYS_STAT_H 1
|
||||
\#define HAVE_STDLIB_H 1
|
||||
|
@ -311,7 +322,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/bcc32/Makefile.sub
|
|||
\#define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
|
||||
\#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
|
||||
|
|
||||
@exit > $@
|
||||
@exit > $(@:/=\)
|
||||
|
||||
config.status: $(MKFILES) $(srcdir)/bcc32/Makefile.sub $(srcdir)/common.mk
|
||||
@echo Creating $@
|
||||
|
@ -464,6 +475,9 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb
|
|||
-so_name=$(RUBY_SO_NAME) \
|
||||
. $(icondirs) $(srcdir)/win32
|
||||
|
||||
lex.c: {$(srcdir)}lex.c.blt
|
||||
copy "$(?:/=\)" $@
|
||||
|
||||
post-install-bin::
|
||||
@$(NULLCMD)
|
||||
post-install-lib::
|
||||
|
|
10
common.mk
10
common.mk
|
@ -514,7 +514,7 @@ sjis.$(OBJEXT): {$(VPATH)}sjis.c {$(VPATH)}regenc.h \
|
|||
sprintf.$(OBJEXT): {$(VPATH)}sprintf.c {$(VPATH)}ruby.h {$(VPATH)}config.h \
|
||||
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
|
||||
{$(VPATH)}re.h {$(VPATH)}regex.h {$(VPATH)}oniguruma.h \
|
||||
{$(VPATH)}missing/vsnprintf.c
|
||||
{$(VPATH)}vsnprintf.c
|
||||
st.$(OBJEXT): {$(VPATH)}st.c {$(VPATH)}config.h {$(VPATH)}st.h {$(VPATH)}defines.h
|
||||
string.$(OBJEXT): {$(VPATH)}string.c {$(VPATH)}ruby.h {$(VPATH)}config.h \
|
||||
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
|
||||
|
@ -591,6 +591,10 @@ INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc \
|
|||
|
||||
INSNS2VMOPT = --srcdir="$(srcdir)"
|
||||
|
||||
$(INSNS): $(srcdir)/insns.def {$(VPATH)}vm_opts.h
|
||||
$(RM) $(PROGRAM)
|
||||
$(BASERUBY) -C $(srcdir) tool/insns2vm.rb $(INSNS2VMOPT)
|
||||
|
||||
minsns.inc: $(srcdir)/template/minsns.inc.tmpl
|
||||
|
||||
opt_sc.inc: $(srcdir)/template/opt_sc.inc.tmpl
|
||||
|
@ -607,10 +611,6 @@ vmtc.inc: $(srcdir)/template/vmtc.inc.tmpl
|
|||
|
||||
vm.inc: $(srcdir)/template/vm.inc.tmpl
|
||||
|
||||
$(INSNS): $(srcdir)/insns.def {$(VPATH)}vm_opts.h
|
||||
$(RM) $(PROGRAM)
|
||||
$(BASERUBY) $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT)
|
||||
|
||||
incs: $(INSNS)
|
||||
|
||||
docs:
|
||||
|
|
|
@ -140,10 +140,24 @@ w32_resume_thread(HANDLE handle)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define HAVE__BEGINTHREADEX 1
|
||||
#else
|
||||
#undef HAVE__BEGINTHREADEX
|
||||
#endif
|
||||
|
||||
#ifdef HAVE__BEGINTHREADEX
|
||||
#define start_thread (HANDLE)_beginthreadex
|
||||
typedef unsigned long (_stdcall *w32_thread_start_func)(void*);
|
||||
#else
|
||||
#define start_thread CreateThread
|
||||
typedef LPTHREAD_START_ROUTINE w32_thread_start_func;
|
||||
#endif
|
||||
|
||||
static HANDLE
|
||||
w32_create_thread(DWORD stack_size, void *func, void *val)
|
||||
w32_create_thread(DWORD stack_size, w32_thread_start_func func, void *val)
|
||||
{
|
||||
return (HANDLE)_beginthreadex(0, stack_size, func, val, CREATE_SUSPENDED, 0);
|
||||
return start_thread(0, stack_size, func, val, CREATE_SUSPENDED, 0);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -289,7 +303,7 @@ native_thread_destroy(rb_thread_t *th)
|
|||
w32_close_handle(intr);
|
||||
}
|
||||
|
||||
static unsigned int _stdcall
|
||||
static unsigned long _stdcall
|
||||
thread_start_func_1(void *th_ptr)
|
||||
{
|
||||
rb_thread_t *th = th_ptr;
|
||||
|
@ -364,7 +378,7 @@ static void timer_thread_function(void);
|
|||
|
||||
static HANDLE timer_thread_id = 0;
|
||||
|
||||
static unsigned int _stdcall
|
||||
static unsigned long _stdcall
|
||||
timer_thread_func(void *dummy)
|
||||
{
|
||||
thread_debug("timer_thread\n");
|
||||
|
|
Loading…
Reference in a new issue