diff options
author | Chris Wilson <chris+github@qwirx.com> | 2006-09-04 00:02:12 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2006-09-04 00:02:12 +0000 |
commit | b8f9eeceb44b72bbab18ebd0644e1b6cabe624da (patch) | |
tree | dee4999e16f985b4403b034bdbca3129e99f8b4c /lib/win32/emu.h | |
parent | abd90648a83b3884039bbd813c92341807c090c8 (diff) |
(refs #3)
Fixed looking up message source in syslog()
Flush stdout after writing to it
Allow syslog() to log to console even when openlog() has not been called
Diffstat (limited to 'lib/win32/emu.h')
-rw-r--r-- | lib/win32/emu.h | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/lib/win32/emu.h b/lib/win32/emu.h index 5d67264a..2c4e1550 100644 --- a/lib/win32/emu.h +++ b/lib/win32/emu.h @@ -354,26 +354,12 @@ HANDLE openfile(const char *filename, int flags, int mode); #define LOG_WARNING 4 #define LOG_ERR 3 #define LOG_PID 0 +#define LOG_LOCAL5 0 #define LOG_LOCAL6 0 -extern HANDLE gSyslogH; -void MyReportEvent(LPCTSTR *szMsg, DWORD errinfo); -inline void openlog(const char * daemonName, int, int) -{ - gSyslogH = RegisterEventSource( - NULL, // uses local computer - daemonName); // source name - if (gSyslogH == NULL) - { - } -} - -inline void closelog(void) -{ - DeregisterEventSource(gSyslogH); -} - -void syslog(int loglevel, const char *fmt, ...); +void openlog (const char * daemonName, int, int); +void closelog(void); +void syslog (int loglevel, const char *fmt, ...); #ifndef __MINGW32__ #define strtoll _strtoi64 @@ -493,13 +479,6 @@ bool EnableBackupRights( void ); bool ConvertUtf8ToConsole(const char* pString, std::string& rDest); bool ConvertConsoleToUtf8(const char* pString, std::string& rDest); -// -// MessageId: MSG_ERR_EXIST -// MessageText: -// Box Backup. -// -#define MSG_ERR_EXIST ((DWORD)0xC0000004L) - // replacement for _cgetws which requires a relatively recent C runtime lib int console_read(char* pBuffer, size_t BufferSize); |