mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-07 17:14:49 +01:00
gmessages.c/Windows: Improve g_log_writer_supports_color()
Windows 10 begins to support color output on the console using ANSI codes, but a few extra steps are required for this support, so we cannot just use isatty() and expect colors to work in the outputs. Instead, we use still use isatty() from the Windows CRT, and then enable ENABLE_VIRTUAL_TERMINAL_PROCESSING if it returns true. Also make the invalid parameter handler shared between gmessages.c and gspawn-win32-helper.c, since it is basically intended to be a no-op stub. https://bugzilla.gnome.org/show_bug.cgi?id=775468
This commit is contained in:
@@ -159,16 +159,12 @@ protect_wargv (gint argc,
|
||||
* Please see http://msdn.microsoft.com/zh-tw/library/ks2530z6%28v=vs.80%29.aspx
|
||||
* for an explanation on this.
|
||||
*/
|
||||
void myInvalidParameterHandler(
|
||||
const wchar_t * expression,
|
||||
const wchar_t * function,
|
||||
const wchar_t * file,
|
||||
unsigned int line,
|
||||
uintptr_t pReserved
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
extern void
|
||||
myInvalidParameterHandler(const wchar_t *expression,
|
||||
const wchar_t *function,
|
||||
const wchar_t *file,
|
||||
unsigned int line,
|
||||
uintptr_t pReserved);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user