GNUNET_free (pos);
}
+#if WINDOWS
+CRITICAL_SECTION output_message_cs;
+#endif
+
/**
* Actually output the log message.
const char *datestr, const char *msg)
{
struct CustomLogger *pos;
-
+#if WINDOWS
+ EnterCriticalSection (&output_message_cs);
+#endif
if (NULL != GNUNET_stderr)
{
FPRINTF (GNUNET_stderr, "%s %s %s %s", datestr, comp,
pos->logger (pos->logger_cls, kind, comp, datestr, msg);
pos = pos->next;
}
+#if WINDOWS
+ LeaveCriticalSection (&output_message_cs);
+#endif
}
#ifdef MINGW
GNInitWinEnv (NULL);
#endif
+#if WINDOWS
+ if (!InitializeCriticalSectionAndSpinCount (&output_message_cs, 0x00000400))\r
+ GNUNET_abort ();
+#endif
}
*/
void __attribute__ ((destructor)) GNUNET_util_cl_fini ()
{
+#if WINDOWS
+ DeleteCriticalSection (&output_message_cs);
+#endif
#ifdef MINGW
GNShutdownWinEnv ();
#endif