diff options
author | Jan Dubois <jand@activestate.com> | 2007-04-09 10:27:17 -0700 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2007-04-10 02:30:38 +0000 |
commit | 58d049f00f60aef7f74b8009451ce6d3c97fbf6b (patch) | |
tree | 32635e59c20504ce693b2a60840088bf7f401145 /win32/win32.c | |
parent | bce280147cab576cf18d8ed362df18f471c16952 (diff) | |
download | perl-58d049f00f60aef7f74b8009451ce6d3c97fbf6b.tar.gz |
Restore Win64 compilation with the Windows Platform SDK
Message-ID: <4kll13df3tndn8alp54gi9ur9jmq063aij@4ax.com>
p4raw-id: //depot/perl@30878
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/win32/win32.c b/win32/win32.c index aacc656da8..4337256b14 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -164,7 +164,22 @@ _matherr(struct _exception *a) } #endif -#if _MSC_VER >= 1400 +/* VS2005 (MSC version 14) provides a mechanism to set an invalid + * parameter handler. This functionality is not available in the + * 64-bit compiler from the Platform SDK, which unfortunately also + * believes itself to be MSC version 14. + * + * There is no #define related to _set_invalid_parameter_handler(), + * but we can check for one of the constants defined for + * _set_abort_behavior(), which was introduced into stdlib.h at + * the same time. + */ + +#if _MSC_VER >= 1400 && defined(_WRITE_ABORT_MSG) +# define SET_INVALID_PARAMETER_HANDLER +#endif + +#ifdef SET_INVALID_PARAMETER_HANDLER void my_invalid_parameter_handler(const wchar_t* expression, const wchar_t* function, const wchar_t* file, @@ -4648,7 +4663,7 @@ win32_ctrlhandler(DWORD dwCtrlType) } -#if _MSC_VER >= 1400 +#ifdef SET_INVALID_PARAMETER_HANDLER # include <crtdbg.h> #endif @@ -4755,7 +4770,7 @@ Perl_win32_init(int *argcp, char ***argvp) { HMODULE module; -#if _MSC_VER >= 1400 +#ifdef SET_INVALID_PARAMETER_HANDLER _invalid_parameter_handler oldHandler, newHandler; newHandler = my_invalid_parameter_handler; oldHandler = _set_invalid_parameter_handler(newHandler); |