diff --git a/asmrun/startup.c b/asmrun/startup.c index da61ffcde..385ef25ac 100644 --- a/asmrun/startup.c +++ b/asmrun/startup.c @@ -88,7 +88,7 @@ extern value caml_start_program (void); extern void caml_init_ieee_floats (void); extern void caml_init_signals (void); -#ifdef _MSC_VER +#if defined(_MSC_VER) && __STDC_SECURE_LIB__ >= 200411L /* PR 4887: avoid crash box of windows runtime on some system calls */ extern void caml_install_invalid_parameter_handler(); @@ -105,7 +105,7 @@ void caml_main(char **argv) caml_init_frame_descriptors(); caml_init_ieee_floats(); -#ifdef _MSC_VER +#if defined(_MSC_VER) && __STDC_SECURE_LIB__ >= 200411L caml_install_invalid_parameter_handler(); #endif caml_init_custom_operations(); diff --git a/byterun/startup.c b/byterun/startup.c index 0d2c19451..c4a13d2c8 100644 --- a/byterun/startup.c +++ b/byterun/startup.c @@ -259,7 +259,7 @@ extern void caml_init_ieee_floats (void); extern void caml_signal_thread(void * lpParam); #endif -#ifdef _MSC_VER +#if defined(_MSC_VER) && __STDC_SECURE_LIB__ >= 200411L /* PR 4887: avoid crash box of windows runtime on some system calls */ extern void caml_install_invalid_parameter_handler(); @@ -281,7 +281,7 @@ CAMLexport void caml_main(char **argv) /* Machine-dependent initialization of the floating-point hardware so that it behaves as much as possible as specified in IEEE */ caml_init_ieee_floats(); -#ifdef _MSC_VER +#if defined(_MSC_VER) && __STDC_SECURE_LIB__ >= 200411L caml_install_invalid_parameter_handler(); #endif caml_init_custom_operations(); @@ -397,7 +397,7 @@ CAMLexport void caml_startup_code( static char proc_self_exe[256]; caml_init_ieee_floats(); -#ifdef _MSC_VER +#if defined(_MSC_VER) && __STDC_SECURE_LIB__ >= 200411L caml_install_invalid_parameter_handler(); #endif caml_init_custom_operations(); diff --git a/byterun/win32.c b/byterun/win32.c index c7865e66d..4a9cecc4c 100644 --- a/byterun/win32.c +++ b/byterun/win32.c @@ -579,7 +579,7 @@ int caml_win32_random_seed (intnat data[16]) } -#ifdef _MSC_VER +#if defined(_MSC_VER) && __STDC_SECURE_LIB__ >= 200411L static void invalid_parameter_handler(const wchar_t* expression, const wchar_t* function,