ruby-changes:11920
From: shyouhei <ko1@a...>
Date: Tue, 26 May 2009 21:15:25 +0900 (JST)
Subject: [ruby-changes:11920] Ruby:r23583 (ruby_1_8_7): merge revision(s) 22333,22338:
shyouhei 2009-05-26 21:15:13 +0900 (Tue, 26 May 2009) New Revision: 23583 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23583 Log: merge revision(s) 22333,22338: * win32/win32.c (_CrtDbgReportW): prevent from false positive assertions in msvcrtd. [ruby-core:22116] * win32/Makefile.sub (CRTDEFFLAGS): separated from DEFS. * win32/win32.c (rtc_error_handler): ignores RTC errors. * win32/win32.c (NtInitialize): suppress useless CRT assertions. [ruby-core:22116] Modified files: branches/ruby_1_8_7/ChangeLog branches/ruby_1_8_7/version.h branches/ruby_1_8_7/win32/Makefile.sub branches/ruby_1_8_7/win32/win32.c Index: ruby_1_8_7/ChangeLog =================================================================== --- ruby_1_8_7/ChangeLog (revision 23582) +++ ruby_1_8_7/ChangeLog (revision 23583) @@ -1,3 +1,8 @@ +Tue May 26 21:09:21 2009 Nobuyoshi Nakada <nobu@r...> + + * win32/win32.c (_CrtDbgReportW): prevent from false positive + assertions in msvcrtd. [ruby-core:22116] + Tue May 26 21:02:13 2009 Nobuyoshi Nakada <nobu@r...> * lib/ostruct.rb (OpenStruct#new_ostruct_member): checks if frozen. Index: ruby_1_8_7/version.h =================================================================== --- ruby_1_8_7/version.h (revision 23582) +++ ruby_1_8_7/version.h (revision 23583) @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2009-05-26" #define RUBY_VERSION_CODE 187 #define RUBY_RELEASE_CODE 20090526 -#define RUBY_PATCHLEVEL 163 +#define RUBY_PATCHLEVEL 164 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 Index: ruby_1_8_7/win32/win32.c =================================================================== --- ruby_1_8_7/win32/win32.c (revision 23582) +++ ruby_1_8_7/win32/win32.c (revision 23583) @@ -27,6 +27,9 @@ #include <winbase.h> #include <wincon.h> #include <shlobj.h> +#if _MSC_VER >= 1400 +#include <crtdbg.h> +#endif #ifdef __MINGW32__ #include <mswsock.h> #include <mbstring.h> @@ -366,10 +369,17 @@ static void init_stdhandle(void); #if _MSC_VER >= 1400 -static void invalid_parameter(const wchar_t *expr, const wchar_t *func, const wchar_t *file, unsigned int line, uintptr_t dummy) +static void +invalid_parameter(const wchar_t *expr, const wchar_t *func, const wchar_t *file, unsigned int line, uintptr_t dummy) { // nothing to do } + +static int __cdecl +rtc_error_handler(int e, const char *src, int line, const char *exe, const char *fmt, ...) +{ + return 0; +} #endif static CRITICAL_SECTION select_mutex; @@ -452,7 +462,9 @@ #if _MSC_VER >= 1400 static void set_pioinfo_extra(void); + _CrtSetReportMode(_CRT_ASSERT, 0); _set_invalid_parameter_handler(invalid_parameter); + _RTC_SetErrorFunc(rtc_error_handler); set_pioinfo_extra(); #endif @@ -4199,3 +4211,5 @@ return f; } #endif + +RUBY_EXTERN int __cdecl _CrtDbgReportW() {return 0;} Index: ruby_1_8_7/win32/Makefile.sub =================================================================== --- ruby_1_8_7/win32/Makefile.sub (revision 23582) +++ ruby_1_8_7/win32/Makefile.sub (revision 23583) @@ -172,12 +172,12 @@ XCFLAGS = -DRUBY_EXPORT -I. -I$(srcdir) -I$(srcdir)/missing $(XCFLAGS) !if $(MSC_VER) >= 1400 # Prevents VC++ 2005 (cl ver 14) warnings -DEFS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE +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 !endif -CPPFLAGS = $(DEFS) $(ARCHDEFS) $(CPPFLAGS) +CPPFLAGS = $(CRTDEFFLAGS) $(DEFS) $(ARCHDEFS) $(CPPFLAGS) DLDFLAGS = $(LDFLAGS) -dll SOLIBS = @@ -321,6 +321,10 @@ !if $(MSC_VER) > 1100 #define NORETURN(x) __declspec(noreturn) x !endif +!if $(MSC_VER) >= 1300 +#define DEPRECATED(x) __declspec(deprecated) x +#define NOINLINE(x) __declspec(noinline) x +!endif #define RUBY_EXTERN extern __declspec(dllimport) #define HAVE_DECL_SYS_NERR 1 !if !defined(WIN32_WCE) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/