1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

gcc fixes(bad idea to call global vars such as log2, this name used by math function). Colored log support on some non-win32 platforms. Small Automake project update

This commit is contained in:
Vadim Glazunov
2008-09-18 20:24:53 +00:00
parent 5ee37eeb3d
commit a1dd7f22f9
16 changed files with 227 additions and 179 deletions

View File

@ -1,5 +1,16 @@
#ifndef CCONSOLEHANDLER_H
#define CCONSOLEHANDLER_H
#ifndef _WIN32
#define WORD std::string
#endif
#ifndef _WIN32
#define _kill_thread(a,b) pthread_cancel(a);
#else
#define _kill_thread(a,b) TerminateThread(a,b);
#endif
namespace boost
{
template<typename signature>
@ -14,7 +25,11 @@ public:
void setColor(int level);
CConsoleHandler();
~CConsoleHandler();
#ifndef _WIN32
static void killConsole(pthread_t hThread); //for windows only, use native handle to the thread
#else
static void killConsole(void *hThread); //for windows only, use native handle to the thread
#endif
template<typename T> void print(const T &data, int level)
{
setColor(level);