diff options
-rw-r--r-- | Build/source/texk/web2c/lib/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/lib/texmfmp.c | 26 |
2 files changed, 31 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index 96c5d0cd99f..94d845813e0 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,3 +1,8 @@ +2021-07-25 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * texmfmp.c: Apply patch of W32TeX for Visual Studio 2015 + by Kakuto-san. + 2021-05-18 Karl Berry <karl@freefriends.org> * usage.c (usagehelp): if bug_email arg ends in "@tug.org" diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index 1b448eb185a..20e46c6a7f3 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -1065,6 +1065,25 @@ maininit (int ac, string *av) #endif /* TeX */ } +#if defined(_MSC_VER) && _MSC_VER > 1600 +#include <crtdbg.h> +void +myInvalidParameterHandler(const wchar_t* expression, + const wchar_t* function, + const wchar_t* file, + unsigned int line, + uintptr_t pReserved) +{ +/* After updating a compiler from Visual Studio 2010 to + Visual Studio 2015, XeTeX exits with the code 0xc0000417, + that means "invalid paremeter in CRT detected". + Probably it is safe to ignore the error. + So I use a handler which smiply return. +*/ + return; +} +#endif /* defined(_MSC_VER) ... */ + /* main: Set up for reading the command line, which will happen in `maininit' and `topenin', then call the main body, plus special Windows/Kanji initializations. */ @@ -1081,6 +1100,13 @@ main (int ac, string *av) _response (&ac, &av); #endif +#if defined(_MSC_VER) && _MSC_VER > 1600 + _invalid_parameter_handler oldHandler, newHandler; + newHandler = myInvalidParameterHandler; + oldHandler = _set_invalid_parameter_handler(newHandler); + _CrtSetReportMode(_CRT_ASSERT, 0); +#endif /* defined(_MSC_VER) ... */ + #ifdef WIN32 av[0] = kpse_program_basename (av[0]); _setmaxstdio(2048); |