Skip to content

Commit 479f068

Browse files
committed
Attempt Bronek's change to suppress VC++8.0 complaints about redefined
_DEBUG. [SVN r31557]
1 parent 9b326f1 commit 479f068

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

include/boost/python/detail/wrap_python.hpp

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,27 @@
2222

2323
#ifdef _DEBUG
2424
# ifndef BOOST_DEBUG_PYTHON
25-
# undef _DEBUG // Don't let Python force the debug library just because we're debugging.
26-
# ifndef _CRT_NOFORCE_MANIFEST
27-
# define _CRT_NOFORCE_MANIFEST
28-
# define _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H
25+
# ifdef _MSC_VER
26+
// VC8.0 will complain if system headers are #included both with
27+
// and without _DEBUG defined, so we have to #include all the
28+
// system headers used by pyconfig.h right here.
29+
# include <stddef.h>
30+
# include <stdarg.h>
31+
# include <stdio.h>
32+
# include <stdlib.h>
33+
# include <assert.h>
34+
# include <errno.h>
35+
# include <ctype.h>
36+
# include <wchar.h>
37+
# include <basetsd.h>
38+
# include <io.h>
39+
# include <limits.h>
40+
# include <float.h>
41+
# include <string.h>
42+
# include <math.h>
43+
# include <time.h>
2944
# endif
45+
# undef _DEBUG // Don't let Python force the debug library just because we're debugging.
3046
# define DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
3147
# endif
3248
#endif

0 commit comments

Comments
 (0)