diff options
author | 2013-07-04 15:50:36 -0400 | |
---|---|---|
committer | 2013-07-04 15:50:36 -0400 | |
commit | ab7e732f161078a3640a415de02aac0ba6c6afe2 (patch) | |
tree | e8a33c7717eda0e21a72e850cdc49dfc3cdffe6c /src/core | |
parent | 7c042bd2f247e808b7eb4a93b02b24e6faec0339 (diff) | |
parent | 2a36c7acd33ac51be81209d0baac67c54bbd0800 (diff) |
Merge branch 'master' into message-rendering-with-session
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/basetypes/MCConnectionLogger.h | 1 | ||||
-rw-r--r-- | src/core/basetypes/MCLog.c (renamed from src/core/basetypes/MCLog.cc) | 6 | ||||
-rw-r--r-- | src/core/basetypes/MCLog.h | 22 |
3 files changed, 17 insertions, 12 deletions
diff --git a/src/core/basetypes/MCConnectionLogger.h b/src/core/basetypes/MCConnectionLogger.h index dd596857..bdb588bc 100644 --- a/src/core/basetypes/MCConnectionLogger.h +++ b/src/core/basetypes/MCConnectionLogger.h @@ -16,7 +16,6 @@ namespace mailcore { class Data; - class String; enum ConnectionLogType { // Received data diff --git a/src/core/basetypes/MCLog.cc b/src/core/basetypes/MCLog.c index 7db01b41..8744f2dd 100644 --- a/src/core/basetypes/MCLog.cc +++ b/src/core/basetypes/MCLog.c @@ -9,7 +9,7 @@ #include <unistd.h> static pid_t sPid = -1; -bool mailcore::logEnabled = false; +int MCLogEnabled = 0; __attribute__((constructor)) static void initialize() { @@ -20,7 +20,7 @@ static void logInternalv(FILE * file, const char * user, const char * filename, unsigned int line, int dumpStack, const char * format, va_list argp); -void mailcore::logInternal(const char * user, +void MCLogInternal(const char * user, const char * filename, unsigned int line, int dumpStack, @@ -37,7 +37,7 @@ static void logInternalv(FILE * file, const char * user, const char * filename, unsigned int line, int dumpStack, const char * format, va_list argp) { - if (!mailcore::logEnabled) + if (!MCLogEnabled) return; while (1) { diff --git a/src/core/basetypes/MCLog.h b/src/core/basetypes/MCLog.h index b84a2182..de75314f 100644 --- a/src/core/basetypes/MCLog.h +++ b/src/core/basetypes/MCLog.h @@ -6,22 +6,28 @@ #ifdef __cplusplus -#define MCLog(...) mailcore::logInternal(NULL, __FILE__, __LINE__, 0, __VA_ARGS__) +#define MCLog(...) MCLogInternal(NULL, __FILE__, __LINE__, 0, __VA_ARGS__) namespace mailcore { - extern bool logEnabled; + extern int MCLogEnabled; #ifndef __printflike #define __printflike(a,b) #endif - void logInternal(const char * user, - const char * filename, - unsigned int line, - int dumpStack, - const char * format, ...) __printflike(5, 6); - +#ifdef __cplusplus +extern "C" { +#endif + void MCLogInternal(const char * user, + const char * filename, + unsigned int line, + int dumpStack, + const char * format, ...) __printflike(5, 6); +#ifdef __cplusplus +} +#endif + } #endif |