[前][次][番号順一覧][スレッド一覧]

ruby-changes:13403

From: usa <ko1@a...>
Date: Thu, 1 Oct 2009 14:19:36 +0900 (JST)
Subject: [ruby-changes:13403] Ruby:r25173 (trunk): * win32/{setup.mak,Makefile.sub,win32.c},include/ruby/win32.h (RT_VER):

usa	2009-10-01 14:19:19 +0900 (Thu, 01 Oct 2009)

  New Revision: 25173

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25173

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/win32.h
    trunk/win32/Makefile.sub
    trunk/win32/setup.mak
    trunk/win32/win32.c

Index: include/ruby/win32.h
===================================================================
--- include/ruby/win32.h	(revision 25172)
+++ include/ruby/win32.h	(revision 25173)
@@ -177,7 +177,7 @@
 #define fstat(fd,st)		_fstati64(fd,st)
 #if defined(__BORLANDC__)
 #define stati64(path, st) rb_w32_stati64(path, st)
-#elif !defined(_MSC_VER) || _MSC_VER < 1400
+#elif !defined(_MSC_VER) || RT_VER < 80
 #define stati64 _stati64
 #define _stati64(path, st) rb_w32_stati64(path, st)
 #else
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 25172)
+++ ChangeLog	(revision 25173)
@@ -1,3 +1,11 @@
+Thu Oct  1 14:16:39 2009  NAKAMURA Usaku  <usa@r...>
+
+	* 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.
+
 Thu Oct  1 13:23:14 2009  NAKAMURA Usaku  <usa@r...>
 
 	* win32/win32.c (rb_w32_getpid): simply call GetCurrentProcessId()
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 25172)
+++ win32/win32.c	(revision 25173)
@@ -501,7 +501,7 @@
 
 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 @@
 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 @@
     int lockinitflag;
     CRITICAL_SECTION lock;
 #endif
-#if _MSC_VER >= 1400
+#if RT_VER >= 80
     char textmode;
     char pipech2[2];
 #endif
@@ -1903,7 +1903,7 @@
 #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 @@
 rb_w32_strerror(int e)
 {
     static char buffer[512];
-#if !defined __MINGW32__
-    extern int sys_nerr;
-#endif
     DWORD source = 0;
     char *p;
 
Index: win32/Makefile.sub
===================================================================
--- win32/Makefile.sub	(revision 25172)
+++ win32/Makefile.sub	(revision 25173)
@@ -225,9 +225,9 @@
 !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 @@
 !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 @@
 !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,@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
Index: win32/setup.mak
===================================================================
--- win32/setup.mak	(revision 25172)
+++ win32/setup.mak	(revision 25173)
@@ -73,12 +73,13 @@
 	@echo TARGET_OS = mswin64 >>$(MAKEFILE)
 
 -runtime-: nul
-	@$(CC) -MD <<rtname.c user32.lib > nul
+	$(CC) -MD <<rtname.c user32.lib -link > nul
 #include <windows.h>
 #include <memory.h>
 #include <string.h>
 #include <stddef.h>
 #include <stdio.h>
+#include <stdlib.h>
 #ifndef MAXPATHLEN
 # define MAXPATHLEN 1024
 #endif
@@ -127,8 +128,10 @@
     }
     else {
 	printf("PLATFORM = $$(TARGET_OS)\n");
+	ver = "60";
     }
     printf("RT = %s\n", base);
+    printf("RT_VER = %s\n", ver);
     return 1;
 }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]