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:
@ -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);
|
||||
|
Reference in New Issue
Block a user