New macro (CONSOLE_LOG) to enable logging to console on Win32
The macro is effective only on the Win32 (MSWIN32) target. It changes
the logging facility to be the same as on Cygwin and other Unix-like
targets.
* doc/README.macros (CONSOLE_LOG): Document new macro.
* include/private/gc_priv.h [THREADS && MSWIN32 && CONSOLE_LOG]
(GC_write_cs): Do not declare.
* include/private/gc_priv.h [THREADS && MSWIN32 && CONSOLE_LOG
&& GC_ASSERTIONS] (GC_write_disabled): Likewise.
* misc.c [CONSOLE_LOG && MSWIN32]: Include fcntl.h, sys/types.h,
sys/stat.h.
* misc.c [GC_WIN32_THREADS && MSWIN32 && CONSOLE_LOG] (GC_write_cs):
Do not define.
* win32_threads.c [GC_ASSERTIONS && MSWIN32 && CONSOLE_LOG]
(GC_write_disabled): Likewise.
* misc.c [MSWIN32 && CONSOLE_LOG] (GC_stdout, GC_stderr, GC_log): Define
STATIC variable (of int type).
* misc.c [GC_WIN32_THREADS && MSWIN32 && CONSOLE_LOG] (GC_init): Do not
call InitializeCriticalSection(&GC_write_cs); handle GC_LOG_FILE and
GC_ONLY_LOG_TO_FILE environment variables.
* misc.c [GC_WIN32_THREADS && MSWIN32 && CONSOLE_LOG] (GC_deinit): Do
not call DeleteCriticalSection(&GC_write_cs).
* misc.c [MSWIN32 && CONSOLE_LOG] (IF_NEED_TO_LOCK, getWinRTLogPath,
GC_CreateLogFile): Do not define.
* misc.c [!PCR && !SMALL_CONFIG && !GC_ANDROID_LOG && GC_WIN32_THREADS
&& GC_ASSERTIONS MSWIN32 && CONSOLE_LOG] (GC_default_on_abort): Do not
use GC_write_disabled.
* win32_threads.c [MSWIN32 && CONSOLE_LOG] (GC_stop_world): Do not use
GC_write_disabled and GC_write_cs.