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

ruby-changes:13408

From: usa <ko1@a...>
Date: Fri, 2 Oct 2009 13:56:02 +0900 (JST)
Subject: [ruby-changes:13408] Ruby:r25178 (ruby_1_8): * win32/{setup.mak,Makefile.sub,win32.c} (RT_VER): split compiler

usa	2009-10-02 13:54:13 +0900 (Fri, 02 Oct 2009)

  New Revision: 25178

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

  Log:
    * win32/{setup.mak,Makefile.sub,win32.c} (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:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/win32/Makefile.sub
    branches/ruby_1_8/win32/setup.mak
    branches/ruby_1_8/win32/win32.c

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 25177)
+++ ruby_1_8/ChangeLog	(revision 25178)
@@ -1,3 +1,11 @@
+Fri Oct  2 13:53:48 2009  NAKAMURA Usaku  <usa@r...>
+
+	* win32/{setup.mak,Makefile.sub,win32.c} (RT_VER): split compiler
+	  specification and runtime library specification.
+
+	* win32/Makefile.sub (LD_SHARED*, config.status): no need to embbed
+	  manifest if not exist.
+
 Fri Oct  2 13:38:52 2009  NAKAMURA Usaku  <usa@r...>
 
 	* win32/win32.c (rb_w32_getpid): simply call GetCurrentProcessId()
Index: ruby_1_8/win32/win32.c
===================================================================
--- ruby_1_8/win32/win32.c	(revision 25177)
+++ ruby_1_8/win32/win32.c	(revision 25178)
@@ -368,7 +368,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)
 {
@@ -476,7 +476,7 @@
 void
 NtInitialize(int *argc, char ***argv)
 {
-#if _MSC_VER >= 1400
+#if RT_VER >= 80
     static void set_pioinfo_extra(void);
 
     _CrtSetReportMode(_CRT_ASSERT, 0);
@@ -1754,7 +1754,7 @@
 #ifdef MSVCRT_THREADS
     int lockinitflag;
     CRITICAL_SECTION lock;
-#if _MSC_VER >= 1400
+#if RT_VER >= 80
     char textmode;
     char pipech2[2];
 #endif
@@ -1776,7 +1776,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
@@ -1929,9 +1929,6 @@
 rb_w32_strerror(int e)
 {
     static char buffer[512];
-#if !defined __MINGW32__
-    extern int sys_nerr;
-#endif
     DWORD source = 0;
     char *p;
 
Index: ruby_1_8/win32/Makefile.sub
===================================================================
--- ruby_1_8/win32/Makefile.sub	(revision 25177)
+++ ruby_1_8/win32/Makefile.sub	(revision 25178)
@@ -179,8 +179,8 @@
 # Prevents VC++ 2005 (cl ver 14) warnings
 CRTDEFFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
 MANIFESTTOOL = mt -nologo
-LDSHARED_1 = $(MANIFESTTOOL) -manifest $(@).manifest -outputresource:$(@);2
-LDSHARED_2 = @$(RM) $(@:/=\).manifest
+LDSHARED_1 = @if exist $(@).manifest $(MANIFESTTOOL) -manifest $(@).manifest -outputresource:$(@);2
+LDSHARED_2 = @$if exist $(@).manifest (RM) $(@:/=\).manifest
 !endif
 CPPFLAGS = $(CRTDEFFLAGS) $(DEFS) $(ARCHDEFS) $(CPPFLAGS)
 
@@ -297,6 +297,7 @@
 !if defined(USE_WINSOCK2)
 #define USE_WINSOCK2 $(USE_WINSOCK2)
 !endif
+#define RT_VER $(RT_VER)
 #define STDC_HEADERS 1
 #define HAVE_SYS_TYPES_H 1
 #define HAVE_SYS_STAT_H 1
@@ -320,7 +321,7 @@
 #define SIZEOF_VOIDP 4
 #define SIZEOF_FLOAT 4
 #define SIZEOF_DOUBLE 8
-!if $(MSC_VER) >= 1400
+!if $(RT_VER) >= 80
 #define SIZEOF_TIME_T 8
 !else
 #define SIZEOF_TIME_T 4
@@ -549,8 +550,8 @@
 s,@LIBARG@,%s.lib,;t t
 s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) $$(DLDFLAGS) -implib:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(arch).pdb -def:$$(DEFFILE),;t t
 !if $(MSC_VER) >= 1400
-s,@LINK_SO@,$(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t
-s,@LINK_SO@,@$$(RM) $$(@:/=\).manifest,;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) -c -Tc$$(<:\=/),;t t
 s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) -c -Tp$$(<:\=/),;t t
Index: ruby_1_8/win32/setup.mak
===================================================================
--- ruby_1_8/win32/setup.mak	(revision 25177)
+++ ruby_1_8/win32/setup.mak	(revision 25178)
@@ -58,12 +58,13 @@
 	@echo OS = mswin32 >>$(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
@@ -101,7 +102,9 @@
 	}
     }
     if (ver) printf("OS = $$(OS)_%s\n", ver);
+    else 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/

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