Linux compile fixes

This commit is contained in:
Aleric Inglewood
2012-07-31 23:04:45 +02:00
parent 048c57cf0c
commit 725cdc2d69
2 changed files with 6 additions and 4 deletions

View File

@@ -58,9 +58,11 @@
#include <string>
#if LL_WINDOWS
#define AI_THREADLOCAL __declspec(thread)
#define CWD_API_TLS __declspec(thread)
#define CWD_TLS __declspec(thread)
#else
#define AI_THREADLOCAL __thread
#define CWD_API_TLS CWD_API __thread
#define CWD_TLS __thread
#endif
namespace debug {
@@ -81,7 +83,7 @@ struct libcwd_do_type {
extern CWD_API libcwd_do_type const libcw_do;
struct Indent {
int M_indent;
static AI_THREADLOCAL int S_indentation;
static CWD_API_TLS int S_indentation;
enum CWD_API print_nt { print };
CWD_API Indent(int indent) : M_indent(indent) { S_indentation += M_indent; }
CWD_API ~Indent() { S_indentation -= M_indent; }