diff options
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/libjingle/README.chromium | 3 | ||||
-rw-r--r-- | third_party/libjingle/files/talk/base/logging.h | 5 | ||||
-rw-r--r-- | third_party/libjingle/libjingle.gyp | 7 |
3 files changed, 12 insertions, 3 deletions
diff --git a/third_party/libjingle/README.chromium b/third_party/libjingle/README.chromium index 80223dd..3259d69 100644 --- a/third_party/libjingle/README.chromium +++ b/third_party/libjingle/README.chromium @@ -35,3 +35,6 @@ Local Modifications: * Renamed "talk/xmpp/constants.*" to "talk/xmpp/xmppconstants.*" to get around an IncrediBuild link error. Apparently IncrediBuild can become confused when two compilation units have the same filename. + * Added a #define guard to libjingle's base/logging.h to prevent the + LOG() macros from being redefined when included by users of the + library. The #define guard is SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS. diff --git a/third_party/libjingle/files/talk/base/logging.h b/third_party/libjingle/files/talk/base/logging.h index a4686b7..36d9d0c 100644 --- a/third_party/libjingle/files/talk/base/logging.h +++ b/third_party/libjingle/files/talk/base/logging.h @@ -65,9 +65,12 @@ class StreamInterface; // << ErrorName(err, LIBRARY_ERRORS); struct ConstantLabel { int value; const char * label; }; + +#if defined(SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS) #define KLABEL(x) { x, #x } #define TLABEL(x,y) { x, y } #define LASTLABEL { 0, 0 } +#endif // defined(SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS) const char * FindLabel(int value, const ConstantLabel entries[]); std::string ErrorName(int err, const ConstantLabel* err_table); @@ -193,6 +196,7 @@ void LogMultiline(LoggingSeverity level, const char* label, bool input, ////////////////////////////////////////////////////////////////////// // If LOGGING is not explicitly defined, default to enabled in debug mode +#if defined(SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS) #if !defined(LOGGING) #if defined(_DEBUG) && !defined(NDEBUG) #define LOGGING 1 @@ -288,6 +292,7 @@ inline bool LogCheckLevel(LoggingSeverity sev) { #endif // !LOGGING #endif // LOG +#endif // defined(SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS) ////////////////////////////////////////////////////////////////////// diff --git a/third_party/libjingle/libjingle.gyp b/third_party/libjingle/libjingle.gyp index 9b9a8e3..632d329 100644 --- a/third_party/libjingle/libjingle.gyp +++ b/third_party/libjingle/libjingle.gyp @@ -11,6 +11,7 @@ 'FEATURE_ENABLE_SSL', 'FEATURE_ENABLE_VOICEMAIL', # TODO(ncarter): Do we really need this? '_USE_32BIT_TIME_T', + 'SAFE_TO_DEFINE_TALK_BASE_LOGGING_MACROS', ], 'include_dirs': [ './overrides', @@ -238,9 +239,9 @@ 'files/talk/xmpp/xmppstanzaparser.h', 'files/talk/xmpp/xmpptask.cc', 'files/talk/xmpp/xmpptask.h', - 'overrides/base/basictypes.h', - 'overrides/base/constructormagic.h', - 'overrides/base/scoped_ptr.h', + 'overrides/talk/base/basictypes.h', + 'overrides/talk/base/constructormagic.h', + 'overrides/talk/base/scoped_ptr.h', 'overrides/config.h', ], 'conditions': [ |