From: Chris Tallon Date: Sun, 25 Mar 2007 15:57:50 +0000 (+0000) Subject: Update for windows compatibility X-Git-Url: https://git.vomp.tv/gitweb/?a=commitdiff_plain;h=9fb5b0a82af087532fbea704b3f1a8df3ec2590b;p=vompclient-marten.git Update for windows compatibility --- 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