[ python-Bugs-1604862 ] _CRT_SECURE_NO_DEPRECATE macro redefinition with VC++ 8

SourceForge.net noreply at sourceforge.net
Wed Nov 29 22:12:26 CET 2006


Bugs item #1604862, was opened at 2006-11-28 23:32
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1604862&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: William Fulton (wsfulton)
Assigned to: Nobody/Anonymous (nobody)
Summary: _CRT_SECURE_NO_DEPRECATE macro redefinition with VC++ 8

Initial Comment:
I'm getting this warning with VC++ 8 for all extension modules:

e:\python25\include\pyconfig.h(42) : warning C4005:
'_CRT_SECURE_NO_DEPRECATE' : macro redefinition
        .\example_wrap.cxx(124) : see previous definition of
'_CRT_SECURE_NO_DEPRECATE'


because Python.h defines this macro without checking that it is not
already defined. Can you fix your headers so we don't get this warning?
It is impossible to work around this problem when dealing with multiple
versions of Python as we can't detect the version of Python until
Python.h is parsed - a catch 22 situation.

Can you use the same approach that we are using in SWIG? This is what we do:

#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) &&
!defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

Thanks

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2006-11-29 22:12

Message:
Logged In: YES 
user_id=21627
Originator: NO

This was fixed in r52817 and r52818

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1604862&group_id=5470


More information about the Python-bugs-list mailing list