pid_t pid;
char logTime [80];
-#ifndef HOST_WIN32
+#ifdef HAVE_LOCALTIME_R
struct tm tod;
time(&t);
localtime_r(&t, &tod);
- pid = getpid();
strftime(logTime, sizeof(logTime), "%Y-%m-%d %H:%M:%S", &tod);
#else
struct tm *tod;
time(&t);
tod = localtime(&t);
- pid = mono_process_current_pid ();
strftime(logTime, sizeof(logTime), "%F %T", tod);
#endif
+
+ pid = mono_process_current_pid ();
+
fprintf (logFile, "%s level[%c] mono[%d]: %s\n", logTime, mapLogFileLevel (level), pid, message);
} else {
fprintf (logFile, "%s%s%s\n",