[Libreoffice-commits] core.git: xmlsecurity/source

Tor Lillqvist tlillqvist at suse.com
Wed Apr 17 03:24:57 PDT 2013


 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx        |    7 -------
 xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx |    8 --------
 2 files changed, 15 deletions(-)

New commits:
commit e79b387e03ff80927f0b15b5f43366e06d3a48a8
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Wed Apr 17 13:13:29 2013 +0300

    It is very wrong to #undef _DEBUG in some source files of a library
    
    Nowadays in a dbgutil build with MSVC, the debugging runtime (C++
    library) is used. Just like with the GNU libstdc++, it is not binary
    compatible with the non-debugging variant.
    
    All sources that go into one DLL or EXE must be compiled with the same
    _DEBUG settings (unless one is extremely careful and knows exactly
    what one is doing, which presumably is not the case with this code).
    
    With previous compilers this has gone undetected, but with MSVC2012 at
    least, you get link-time errors, which is a good thing:
    
    nssinitializer.o : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in biginteger.o
    
    nssinitializer.o : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in biginteger.o
    
    Whether this actually has caused run-time erroneous behaviour or
    not in a dbgutil build is another thing...
    
    Change-Id: I0c42161f00a0e37b438e3b911e3c0058edadd800

diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index 3ec0106..b91e1db 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -19,13 +19,6 @@
 
 
 /*
- * Turn off DEBUG Assertions
- */
-#ifdef _DEBUG
-#undef _DEBUG
-#endif
-
-/*
  * and turn off the additional virtual methods which are part of some interfaces when compiled
  * with debug
  */
diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
index 740b02f..aaa2129 100644
--- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
@@ -17,14 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
-/*
- * Turn off DEBUG Assertions
- */
-#ifdef _DEBUG
-#undef _DEBUG
-#endif
-
 /*
  * and turn off the additional virtual methods which are part of some interfaces when compiled
  * with debug


More information about the Libreoffice-commits mailing list