Bug 1111244 - Remove some code specific to old unsupported MSVC versions from js/src; r=Waldo
This commit is contained in:
@@ -23,17 +23,9 @@
|
||||
#ifdef XP_WIN
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
/* VC++ 8.0 or later */
|
||||
#if _MSC_VER >= 1400
|
||||
#define NS_HAVE_INVALID_PARAMETER_HANDLER 1
|
||||
#endif
|
||||
#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
|
||||
#include <crtdbg.h> /* for _CrtSetReportMode */
|
||||
#endif
|
||||
#include <mmsystem.h> /* for timeBegin/EndPeriod */
|
||||
#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
|
||||
#include <stdlib.h> /* for _set_invalid_parameter_handler */
|
||||
#endif
|
||||
|
||||
#include "prinit.h"
|
||||
|
||||
@@ -255,7 +247,7 @@ PRMJ_Now()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
|
||||
#ifdef XP_WIN
|
||||
static void
|
||||
PRMJ_InvalidParameterHandler(const wchar_t *expression,
|
||||
const wchar_t *function,
|
||||
@@ -275,7 +267,7 @@ PRMJ_FormatTime(char *buf, int buflen, const char *fmt, PRMJTime *prtm)
|
||||
#if defined(XP_UNIX) || defined(XP_WIN)
|
||||
struct tm a;
|
||||
int fake_tm_year = 0;
|
||||
#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
|
||||
#ifdef XP_WIN
|
||||
_invalid_parameter_handler oldHandler;
|
||||
int oldReportMode;
|
||||
#endif
|
||||
@@ -349,14 +341,14 @@ PRMJ_FormatTime(char *buf, int buflen, const char *fmt, PRMJTime *prtm)
|
||||
* changeover time.)
|
||||
*/
|
||||
|
||||
#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
|
||||
#ifdef XP_WIN
|
||||
oldHandler = _set_invalid_parameter_handler(PRMJ_InvalidParameterHandler);
|
||||
oldReportMode = _CrtSetReportMode(_CRT_ASSERT, 0);
|
||||
#endif
|
||||
|
||||
result = strftime(buf, buflen, fmt, &a);
|
||||
|
||||
#ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
|
||||
#ifdef XP_WIN
|
||||
_set_invalid_parameter_handler(oldHandler);
|
||||
_CrtSetReportMode(_CRT_ASSERT, oldReportMode);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user