* fhandler.cc (fhandler_base::dup): Don't set handle on failure. Caller has

already taken care of that.
* fhandler_console.cc (fhandler_console::open): Initialize handles to NULL.
(fhandler_console::close): Ditto.  GNUify non-GNU formatted functions calls
throughout.
This commit is contained in:
Christopher Faylor
2002-09-22 03:38:57 +00:00
parent 228f6b6e07
commit c90e1cf179
43 changed files with 250 additions and 235 deletions

View File

@ -42,11 +42,11 @@ get_win95_event_log_path ()
/* FIXME: For MT safe code these will need to be replaced */
#ifdef _MT_SAFE
#define process_ident _reent_winsup()->_process_ident
#define process_logopt _reent_winsup()->_process_logopt
#define process_facility _reent_winsup()->_process_facility
#define process_ident _reent_winsup ()->_process_ident
#define process_logopt _reent_winsup ()->_process_logopt
#define process_facility _reent_winsup ()->_process_facility
/* Default priority logmask */
#define process_logmask _reent_winsup()->_process_logmask
#define process_logmask _reent_winsup ()->_process_logmask
#else
static char *process_ident = 0;
static int process_logopt = 0;
@ -303,7 +303,7 @@ syslog (int priority, const char *message, ...)
if (process_logopt & LOG_PID)
{
if (pass.print ("Win32 Process Id = 0x%X : Cygwin Process Id = 0x%X : ",
GetCurrentProcessId(), getpid ()) == -1)
GetCurrentProcessId (), getpid ()) == -1)
return;
}
@ -389,7 +389,7 @@ syslog (int priority, const char *message, ...)
HANDLE fHandle = cygheap->fdtab[fileno (fp)]->get_handle ();
if (LockFile (fHandle, 0, 0, 1, 0) == FALSE)
{
debug_printf ("failed to lock file %s", get_win95_event_log_path());
debug_printf ("failed to lock file %s", get_win95_event_log_path ());
fclose (fp);
return;
}