diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2021-07-24 23:04:15 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2021-07-24 23:04:15 +0000 |
commit | 78393dc1a64a0bc6d9bda8fb7b1acc2e537a2e38 (patch) | |
tree | 709c273a7149c709d1d2eaffae5aed6e5620033f | |
parent | ec7e50a799475efb20284f4351b6a7bddbc03aac (diff) |
web2c/lib: patch for Visual Studio 2015 (Windows only)
git-svn-id: svn://tug.org/texlive/trunk@60047 c570f23f-e606-0410-a88d-b1316a301751
-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); |