From 4e389756ec95c11df4fba273aaf4b7967596bb68 Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 1 Oct 2009 05:19:19 +0000 Subject: * win32/{setup.mak,Makefile.sub,win32.c},include/ruby/win32.h (RT_VER): split compiler specification and runtime library specification. * win32/Makefile.sub (LD_SHARED*, config.status): no need to embbed manifest if not exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- win32/Makefile.sub | 15 ++++++++------- win32/setup.mak | 5 ++++- win32/win32.c | 11 ++++------- 3 files changed, 16 insertions(+), 15 deletions(-) (limited to 'win32') diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 78db770e4d..5a6f18dadf 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -225,9 +225,9 @@ XCFLAGS = -DRUBY_EXPORT -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(srcdir) !if $(MSC_VER) >= 1400 # Prevents VC++ 2005 (cl ver 14) warnings MANIFESTTOOL = mt -nologo -LDSHARED_0 = @$(MINIRUBY) -run -e wait_writable -- -n 10 $@ -LDSHARED_1 = $(MANIFESTTOOL) -manifest $(@).manifest -outputresource:$(@);2 -LDSHARED_2 = @$(RM) $(@:/=\).manifest +LDSHARED_0 = @if exist $(@).manifest $(MINIRUBY) -run -e wait_writable -- -n 10 $@ +LDSHARED_1 = @if exist $(@).manifest $(MANIFESTTOOL) -manifest $(@).manifest -outputresource:$(@);2 +LDSHARED_2 = @if exist $(@).manifest @$(RM) $(@:/=\).manifest !endif CPPFLAGS = $(DEFS) $(ARCHDEFS) $(CPPFLAGS) @@ -390,6 +390,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub !if "$(ENABLE_WIN95)" == "yes" && "$(MACHINE)" == "x86" #define WIN95 1 !endif +#define RT_VER $(RT_VER) #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 @@ -422,7 +423,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub !endif #define SIZEOF_FLOAT 4 #define SIZEOF_DOUBLE 8 -!if $(MSC_VER) >= 1400 +!if $(RT_VER) >= 80 #define SIZEOF_TIME_T 8 #define TIMET2NUM(v) LL2NUM(v) #define NUM2TIMET(v) NUM2LL(v) @@ -696,9 +697,9 @@ s,@RPATHFLAG@,,;t t s,@LIBARG@,%s.lib,;t t s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) -link $$(DLDFLAGS) -implib:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(arch).pdb -def:$$(DEFFILE),;t t !if $(MSC_VER) >= 1400 -s,@LINK_SO@,@$$(RUBY) -run -e wait_writable -- -n 10 $$(@),;t t -s,@LINK_SO@,$(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t -s,@LINK_SO@,@$$(RM) $$(@:/=\).manifest,;t t +s,@LINK_SO@,@if exist $$(@).manifest $$(RUBY) -run -e wait_writable -- -n 10 $$(@),;t t +s,@LINK_SO@,@if exist $$(@).manifest $(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t +s,@LINK_SO@,@if exist $$(@).manifest $$(RM) $$(@:/=\).manifest,;t t !endif s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tc$$(<:\=/),;t t s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tp$$(<:\=/),;t t diff --git a/win32/setup.mak b/win32/setup.mak index c900fe0d9f..3216ac70e9 100644 --- a/win32/setup.mak +++ b/win32/setup.mak @@ -73,12 +73,13 @@ BASERUBY = $(BASERUBY) @echo TARGET_OS = mswin64 >>$(MAKEFILE) -runtime-: nul - @$(CC) -MD < nul + $(CC) -MD < nul #include #include #include #include #include +#include #ifndef MAXPATHLEN # define MAXPATHLEN 1024 #endif @@ -127,8 +128,10 @@ runtime_name() } else { printf("PLATFORM = $$(TARGET_OS)\n"); + ver = "60"; } printf("RT = %s\n", base); + printf("RT_VER = %s\n", ver); return 1; } diff --git a/win32/win32.c b/win32/win32.c index d832ef3d6e..f24a6ab2dc 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -501,7 +501,7 @@ init_func(void) static void init_stdhandle(void); -#if _MSC_VER >= 1400 +#if RT_VER >= 80 static void invalid_parameter(const wchar_t *expr, const wchar_t *func, const wchar_t *file, unsigned int line, uintptr_t dummy) { @@ -575,7 +575,7 @@ StartSockets(void) void rb_w32_sysinit(int *argc, char ***argv) { -#if _MSC_VER >= 1400 +#if RT_VER >= 80 static void set_pioinfo_extra(void); _CrtSetReportMode(_CRT_ASSERT, 0); @@ -1882,7 +1882,7 @@ typedef struct { int lockinitflag; CRITICAL_SECTION lock; #endif -#if _MSC_VER >= 1400 +#if RT_VER >= 80 char textmode; char pipech2[2]; #endif @@ -1903,7 +1903,7 @@ EXTERN_C _CRTIMP ioinfo * __pioinfo[]; #define _osfile(i) (_pioinfo(i)->osfile) #define _pipech(i) (_pioinfo(i)->pipech) -#if _MSC_VER >= 1400 +#if RT_VER >= 80 static size_t pioinfo_extra = 0; /* workaround for VC++8 SP1 */ static void @@ -2065,9 +2065,6 @@ char * rb_w32_strerror(int e) { static char buffer[512]; -#if !defined __MINGW32__ - extern int sys_nerr; -#endif DWORD source = 0; char *p; -- cgit v1.2.3