Cygwin/X: Allow the default log location to be configurable

Allow the default log location to be configurable (e.g. /var/log),
and use separate logs for each display instance (e.g. XWin.0.log).

Make the type of g_pszLogFile const char*, per os/log.c:LogInit().

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Yaakov Selkowitz 2010-02-01 17:11:51 +00:00 • committed by Jon TURNEY
commit bf181915e1
7 changed files with 22 additions and 15 deletions

View file

@ -41,8 +41,9 @@
/* References to external symbols */
extern char * g_pszCommandLine;
extern char * g_pszLogFile;
extern const char * g_pszLogFile;
extern Bool g_fSilentFatalError;
extern Bool g_fLogInited;
#ifdef DDXOSVERRORF
@ -87,6 +88,12 @@ OsVendorFatalError (void)
if (g_fSilentFatalError)
return;
if (!g_fLogInited) {
g_fLogInited = TRUE;
g_pszLogFile = LogInit (g_pszLogFile, NULL);
}
LogClose ();
winMessageBoxF (
"A fatal error has occurred and " PROJECT_NAME " will now exit.\n" \
"Please open %s for more information.\n",