mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 02:23:59 +02:00
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@23583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6ec32b4aa5
commit
0175825cfc
4 changed files with 27 additions and 4 deletions
|
@ -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 @@ flock(int fd, int oper)
|
|||
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 @@ NtInitialize(int *argc, char ***argv)
|
|||
#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 @@ rb_w32_fsopen(const char *path, const char *mode, int shflags)
|
|||
return f;
|
||||
}
|
||||
#endif
|
||||
|
||||
RUBY_EXTERN int __cdecl _CrtDbgReportW() {return 0;}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue