Commit 35336052 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

msvcrt: Print assertion failure messages to stderr.

This matches Windows behaviour. In particular, redirecting stderr with freopen() followed by assert(0) will print the failure message to the relevant file. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarPiotr Caban <piotr@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ec9e556d
......@@ -305,7 +305,7 @@ void CDECL MSVCRT__wassert(const MSVCRT_wchar_t* str, const MSVCRT_wchar_t* file
DoMessageBoxW(assertion_failed, text);
}
else
_cwprintf(format_console, str, file, line);
MSVCRT_fwprintf(MSVCRT_stderr, format_console, str, file, line);
MSVCRT_raise(MSVCRT_SIGABRT);
MSVCRT__exit(3);
......
......@@ -447,6 +447,8 @@ struct MSVCRT__iobuf {
typedef struct MSVCRT__iobuf MSVCRT_FILE;
extern MSVCRT_FILE MSVCRT__iob[];
struct MSVCRT_lconv {
char* decimal_point;
char* thousands_sep;
......@@ -1107,6 +1109,7 @@ MSVCRT___time32_t __cdecl MSVCRT__time32(MSVCRT___time32_t*);
MSVCRT___time64_t __cdecl MSVCRT__time64(MSVCRT___time64_t*);
MSVCRT_FILE* __cdecl MSVCRT__fdopen(int, const char *);
MSVCRT_FILE* __cdecl MSVCRT__wfdopen(int, const MSVCRT_wchar_t *);
int WINAPIV MSVCRT_fwprintf(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...);
int __cdecl MSVCRT_vsnprintf(char *str, MSVCRT_size_t len, const char *format, __ms_va_list valist);
int __cdecl MSVCRT_vsnwprintf(MSVCRT_wchar_t *str, MSVCRT_size_t len,
const MSVCRT_wchar_t *format, __ms_va_list valist );
......
......@@ -35,8 +35,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
extern MSVCRT_FILE MSVCRT__iob[];
/* helper function for *scanf. Returns the value of character c in the
* given base, or -1 if the given character is not a digit of the base.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment