#include <glib.h>
#include <errno.h>
#include <time.h>
+#ifndef HOST_WIN32
#include <sys/time.h>
+#endif
#include "mono-logger.h"
static FILE *logFile = NULL;
* @level - GLogLevelFlags value
* @returns The equivalent character identifier
*/
-static __inline__ char
+static inline char
mapLogFileLevel(GLogLevelFlags level)
{
if (level & G_LOG_LEVEL_ERROR)
if (hdr) {
time(&t);
+#ifndef HOST_WIN32
localtime_r(&t, &tod);
pid = getpid();
+#else
+ localtime(&t, &tod);
+ pid = _getpid();
+#endif
strftime(logTime, sizeof(logTime), "%F %T", &tod);
iLog = snprintf(logMessage, sizeof(logMessage), "%s level[%c] mono[%d]: ",
logTime,mapLogFileLevel(level),pid);
* @level - GLogLevelFlags value
* @returns The equivalent character identifier
*/
-static __inline__ char
+static inline char
mapLogFileLevel(GLogLevelFlags level)
{
if (level & G_LOG_LEVEL_ERROR)