Fix unexpected side-effect of properly defining CDECL for CRT (how is gcc fine with...
[reactos.git] / reactos / lib / sdk / crt / stdlib / errno.c
index 049ad2c..2f33413 100644 (file)
@@ -16,7 +16,7 @@ static _invalid_parameter_handler invalid_parameter_handler = NULL;
 /*********************************************************************
  *             _errno (MSVCRT.@)
  */
-int CDECL *_errno(void)
+int* CDECL _errno(void)
 {
     return &(msvcrt_get_thread_data()->thread_errno);
 }
@@ -141,7 +141,9 @@ void __cdecl _invalid_parameter(const wchar_t *expr, const wchar_t *func,
     else
     {
         ERR( "%s:%u %s: %s %lx\n", debugstr_w(file), line, debugstr_w(func), debugstr_w(expr), arg );
+#if _MSVCR_VER > 0 // FIXME: possible improvement: use a global variable in the DLL
         RaiseException( STATUS_INVALID_CRUNTIME_PARAMETER, EXCEPTION_NONCONTINUABLE, 0, NULL );
+#endif
     }
 }