This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Drop _EXPORTS macros in PCbuild9
Type: Stage:
Components: Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: christian.heimes, loewis
Priority: normal Keywords:

Created on 2007-11-20 04:44 by loewis, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg57693 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-11-20 04:44
I believe it is safe to drop all the _EXPORTS macros (MMAP_EXPORTS,
WINSOUND_EXPORRTS etc) from all projects; atleast I cannot see any
reason for having them. Some are clearly bogus, e.g. unicodedata and
test_capi both define MMAP_EXPORTS, _socket defines WINSOUND_EXPORTS,
and _ssl defines _SOCKET_EXPORTS.
msg57694 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-20 05:53
You are right. I've checked the header files of the dependencies or
simply tried what happens when I remove some defines. The only macro
existing macro is BZ2_EXPORT but that's defined unless BZ2_IMPORT is
defined.

What about the remaining defines? I've copied them from the old projects:
_USRDLL - unknown to me
WIN32 - ?, is it even safe to define it for x64?
_WINDOWS - ?
_WIN32 - ?
_CRT_SECURE_NO_DEPRECATE - required to get rid of a bunch of warnings
msg57708 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-11-20 20:57
See the MSDN for details. IIUC:
- _WIN32 is defined by the compiler, always, unless the platform is
WIN16 (which is no longer supported). It is even defined on Win64 (where
the compiler also defines _WIN64). So there should be no need to defined
it explicitly.
- WIN32 is checked-for in WinSock2.h. I couldn't figure out when
precisely it is supposed to be defined.
- _USRDLL apparently was once a mechanism of how to integrate with MFC.
It apparently isn't really used anymore in VS 2003 (afx.h still uses it
to trigger linkage of __afxForceUSRDL); I suppose it is safe to drop for
Python
- I couldn't quite figure out what _WINDOWS is good for.
- _CRT_SECURE_NO_DEPRECATE as you say, although that's also defined in
pyconfig.h.
msg57712 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-20 22:00
WIN32 is required. Without WIN32 defined I'm getting errors in the
locale module. _WINDOWS seems to be obsolete.
History
Date User Action Args
2022-04-11 14:56:28adminsetgithub: 45814
2008-01-06 22:29:44adminsetkeywords: - py3k
versions: Python 3.0
2007-11-20 22:03:56christian.heimessetstatus: open -> closed
resolution: fixed
2007-11-20 22:00:21christian.heimessetmessages: + msg57712
2007-11-20 20:57:39loewissetmessages: + msg57708
2007-11-20 05:53:27christian.heimessetmessages: + msg57694
2007-11-20 04:44:28loewiscreate