зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
ceca5abce0
Коммит
4e389756ec
|
@ -1,3 +1,11 @@
|
||||||
|
Thu Oct 1 14:16:39 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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@ruby-lang.org>
|
Thu Oct 1 13:23:14 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* win32/win32.c (rb_w32_getpid): simply call GetCurrentProcessId()
|
* win32/win32.c (rb_w32_getpid): simply call GetCurrentProcessId()
|
||||||
|
|
|
@ -177,7 +177,7 @@ extern DWORD rb_w32_osid(void);
|
||||||
#define fstat(fd,st) _fstati64(fd,st)
|
#define fstat(fd,st) _fstati64(fd,st)
|
||||||
#if defined(__BORLANDC__)
|
#if defined(__BORLANDC__)
|
||||||
#define stati64(path, st) rb_w32_stati64(path, st)
|
#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 _stati64
|
||||||
#define _stati64(path, st) rb_w32_stati64(path, st)
|
#define _stati64(path, st) rb_w32_stati64(path, st)
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -225,9 +225,9 @@ XCFLAGS = -DRUBY_EXPORT -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(srcdir)
|
||||||
!if $(MSC_VER) >= 1400
|
!if $(MSC_VER) >= 1400
|
||||||
# Prevents VC++ 2005 (cl ver 14) warnings
|
# Prevents VC++ 2005 (cl ver 14) warnings
|
||||||
MANIFESTTOOL = mt -nologo
|
MANIFESTTOOL = mt -nologo
|
||||||
LDSHARED_0 = @$(MINIRUBY) -run -e wait_writable -- -n 10 $@
|
LDSHARED_0 = @if exist $(@).manifest $(MINIRUBY) -run -e wait_writable -- -n 10 $@
|
||||||
LDSHARED_1 = $(MANIFESTTOOL) -manifest $(@).manifest -outputresource:$(@);2
|
LDSHARED_1 = @if exist $(@).manifest $(MANIFESTTOOL) -manifest $(@).manifest -outputresource:$(@);2
|
||||||
LDSHARED_2 = @$(RM) $(@:/=\).manifest
|
LDSHARED_2 = @if exist $(@).manifest @$(RM) $(@:/=\).manifest
|
||||||
!endif
|
!endif
|
||||||
CPPFLAGS = $(DEFS) $(ARCHDEFS) $(CPPFLAGS)
|
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"
|
!if "$(ENABLE_WIN95)" == "yes" && "$(MACHINE)" == "x86"
|
||||||
#define WIN95 1
|
#define WIN95 1
|
||||||
!endif
|
!endif
|
||||||
|
#define RT_VER $(RT_VER)
|
||||||
#define STDC_HEADERS 1
|
#define STDC_HEADERS 1
|
||||||
#define HAVE_SYS_TYPES_H 1
|
#define HAVE_SYS_TYPES_H 1
|
||||||
#define HAVE_SYS_STAT_H 1
|
#define HAVE_SYS_STAT_H 1
|
||||||
|
@ -422,7 +423,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
|
||||||
!endif
|
!endif
|
||||||
#define SIZEOF_FLOAT 4
|
#define SIZEOF_FLOAT 4
|
||||||
#define SIZEOF_DOUBLE 8
|
#define SIZEOF_DOUBLE 8
|
||||||
!if $(MSC_VER) >= 1400
|
!if $(RT_VER) >= 80
|
||||||
#define SIZEOF_TIME_T 8
|
#define SIZEOF_TIME_T 8
|
||||||
#define TIMET2NUM(v) LL2NUM(v)
|
#define TIMET2NUM(v) LL2NUM(v)
|
||||||
#define NUM2TIMET(v) NUM2LL(v)
|
#define NUM2TIMET(v) NUM2LL(v)
|
||||||
|
@ -696,9 +697,9 @@ s,@RPATHFLAG@,,;t t
|
||||||
s,@LIBARG@,%s.lib,;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
|
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
|
!if $(MSC_VER) >= 1400
|
||||||
s,@LINK_SO@,@$$(RUBY) -run -e wait_writable -- -n 10 $$(@),;t t
|
s,@LINK_SO@,@if exist $$(@).manifest $$(RUBY) -run -e wait_writable -- -n 10 $$(@),;t t
|
||||||
s,@LINK_SO@,$(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t
|
s,@LINK_SO@,@if exist $$(@).manifest $(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t
|
||||||
s,@LINK_SO@,@$$(RM) $$(@:/=\).manifest,;t t
|
s,@LINK_SO@,@if exist $$(@).manifest $$(RM) $$(@:/=\).manifest,;t t
|
||||||
!endif
|
!endif
|
||||||
s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tc$$(<:\=/),;t t
|
s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tc$$(<:\=/),;t t
|
||||||
s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tp$$(<:\=/),;t t
|
s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tp$$(<:\=/),;t t
|
||||||
|
|
|
@ -73,12 +73,13 @@ BASERUBY = $(BASERUBY)
|
||||||
@echo TARGET_OS = mswin64 >>$(MAKEFILE)
|
@echo TARGET_OS = mswin64 >>$(MAKEFILE)
|
||||||
|
|
||||||
-runtime-: nul
|
-runtime-: nul
|
||||||
@$(CC) -MD <<rtname.c user32.lib > nul
|
$(CC) -MD <<rtname.c user32.lib -link > nul
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#ifndef MAXPATHLEN
|
#ifndef MAXPATHLEN
|
||||||
# define MAXPATHLEN 1024
|
# define MAXPATHLEN 1024
|
||||||
#endif
|
#endif
|
||||||
|
@ -127,8 +128,10 @@ runtime_name()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf("PLATFORM = $$(TARGET_OS)\n");
|
printf("PLATFORM = $$(TARGET_OS)\n");
|
||||||
|
ver = "60";
|
||||||
}
|
}
|
||||||
printf("RT = %s\n", base);
|
printf("RT = %s\n", base);
|
||||||
|
printf("RT_VER = %s\n", ver);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -501,7 +501,7 @@ init_func(void)
|
||||||
|
|
||||||
static void init_stdhandle(void);
|
static void init_stdhandle(void);
|
||||||
|
|
||||||
#if _MSC_VER >= 1400
|
#if RT_VER >= 80
|
||||||
static void
|
static void
|
||||||
invalid_parameter(const wchar_t *expr, const wchar_t *func, const wchar_t *file, unsigned int line, uintptr_t dummy)
|
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
|
void
|
||||||
rb_w32_sysinit(int *argc, char ***argv)
|
rb_w32_sysinit(int *argc, char ***argv)
|
||||||
{
|
{
|
||||||
#if _MSC_VER >= 1400
|
#if RT_VER >= 80
|
||||||
static void set_pioinfo_extra(void);
|
static void set_pioinfo_extra(void);
|
||||||
|
|
||||||
_CrtSetReportMode(_CRT_ASSERT, 0);
|
_CrtSetReportMode(_CRT_ASSERT, 0);
|
||||||
|
@ -1882,7 +1882,7 @@ typedef struct {
|
||||||
int lockinitflag;
|
int lockinitflag;
|
||||||
CRITICAL_SECTION lock;
|
CRITICAL_SECTION lock;
|
||||||
#endif
|
#endif
|
||||||
#if _MSC_VER >= 1400
|
#if RT_VER >= 80
|
||||||
char textmode;
|
char textmode;
|
||||||
char pipech2[2];
|
char pipech2[2];
|
||||||
#endif
|
#endif
|
||||||
|
@ -1903,7 +1903,7 @@ EXTERN_C _CRTIMP ioinfo * __pioinfo[];
|
||||||
#define _osfile(i) (_pioinfo(i)->osfile)
|
#define _osfile(i) (_pioinfo(i)->osfile)
|
||||||
#define _pipech(i) (_pioinfo(i)->pipech)
|
#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 size_t pioinfo_extra = 0; /* workaround for VC++8 SP1 */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2065,9 +2065,6 @@ char *
|
||||||
rb_w32_strerror(int e)
|
rb_w32_strerror(int e)
|
||||||
{
|
{
|
||||||
static char buffer[512];
|
static char buffer[512];
|
||||||
#if !defined __MINGW32__
|
|
||||||
extern int sys_nerr;
|
|
||||||
#endif
|
|
||||||
DWORD source = 0;
|
DWORD source = 0;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче