From 9fb5b0a82af087532fbea704b3f1a8df3ec2590b Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 25 Mar 2007 15:57:50 +0000 Subject: [PATCH] Update for windows compatibility --- log.cc | 4 ++++ log.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/log.cc b/log.cc index 31ebddf..5fd37bc 100644 --- a/log.cc +++ b/log.cc @@ -124,7 +124,11 @@ int Log::log(char *fromModule, int level, char* message, ...) if (level == INFO) strcpy(levelString, "[info] "); if (level == DEBUG) strcpy(levelString, "[debug] "); +#ifndef WIN32 spaceLeft -= SNPRINTF(&buffer[150-spaceLeft], spaceLeft, "%s %d %s - ", levelString, getpid(), fromModule); +#else + spaceLeft -= SNPRINTF(&buffer[150-spaceLeft], spaceLeft, "%s %s - ", levelString, fromModule); +#endif va_list ap; va_start(ap, message); diff --git a/log.h b/log.h index 66a210d..e94f153 100644 --- a/log.h +++ b/log.h @@ -24,6 +24,7 @@ #include #ifndef WIN32 + #include #include #else #include @@ -33,7 +34,6 @@ #include #include #include -#include #include "defines.h" class Log -- 2.39.5