use terminal colors on mingw

This commit is contained in:
Arvid Norberg 2011-02-22 03:32:07 +00:00
parent 118a75ebe7
commit b69db24e30
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ bool tests_failure = false;
void report_failure(char const* err, char const* file, int line) void report_failure(char const* err, char const* file, int line)
{ {
#ifdef TORRENT_WINDOWS #if defined TORRENT_WINDOWS || !defined TORRENT_MINGW
HANDLE console = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, 0, 0, CONSOLE_TEXTMODE_BUFFER, 0); HANDLE console = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, 0, 0, CONSOLE_TEXTMODE_BUFFER, 0);
SetConsoleTextAttribute(console, FOREGROUND_RED); SetConsoleTextAttribute(console, FOREGROUND_RED);
fprintf(stderr, "\n**** %s:%d \"%s\" ****\n\n", file, line, err); fprintf(stderr, "\n**** %s:%d \"%s\" ****\n\n", file, line, err);