]> git.lyx.org Git - features.git/commitdiff
Wrap the definition of debug_trait::DEBUG with preprocessor guards
authorAngus Leeming <leeming@lyx.org>
Thu, 20 May 2004 09:35:30 +0000 (09:35 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 20 May 2004 09:35:30 +0000 (09:35 +0000)
that protect against a name clash with a macro DEBUG.
Such a macro is defined by the Qt library...

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8771 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/ChangeLog
src/support/debugstream.h

index be363b7e2390b187126398b746338abe5c39f90a..de661d00f21eaf44033549388262de219f996836 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-20  Angus Leeming  <leeming@lyx.org>
+
+       * debugstream.h: wrap the definition of debug_trait::DEBUG with
+       preprocessor guards that protect against a name clash with a
+       macro DEBUG. Such a macro is defined by the Qt library...
+
 2004-04-27  Angus Leeming  <leeming@lyx.org>
 
        * path_defines.{h,C.in}: expose top_srcdir, renamed from
index 6b7334477b9c1ecb2f2c7481bc90272c89f22d4d..c41d4d94b175988c6c2dfff91fe5e68ca6e45fe4 100644 (file)
 
 #include <boost/test/detail/nullstream.hpp>
 
+#ifdef DEBUG
+# define TEMPORARY_DEBUG_MACRO DEBUG
+# undef DEBUG
+#endif
+
 struct debug_trait {
        enum type {
                NONE   = 0,
@@ -35,6 +40,11 @@ struct debug_trait {
        }
 };
 
+#ifdef TEMPORARY_DEBUG_MACRO
+# define DEBUG TEMPORARY_DEBUG_MACRO
+# undef TEMPORARY_DEBUG_MACRO
+#endif
+
 
 template <class dtrait,
          class charT = char,