diff options
author | Tor Lillqvist <tlillqvist@suse.com> | 2013-04-17 13:13:29 +0300 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2013-04-17 13:23:35 +0300 |
commit | e79b387e03ff80927f0b15b5f43366e06d3a48a8 (patch) | |
tree | 0c7777811018487e5b08731f61b477af245fc5ae /xmlsecurity | |
parent | b80d8c695e6b6ded231e67ed9a80bcd1f1250c03 (diff) |
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
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/nssinitializer.cxx | 7 | ||||
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx | 8 |
2 files changed, 0 insertions, 15 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index 3ec0106ab6c6..b91e1db8569d 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 740b02f12e3b..aaa21295a663 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 |