Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop _EXPORTS macros in PCbuild9 #45814

Closed
loewis mannequin opened this issue Nov 20, 2007 · 4 comments
Closed

Drop _EXPORTS macros in PCbuild9 #45814

loewis mannequin opened this issue Nov 20, 2007 · 4 comments
Assignees

Comments

@loewis
Copy link
Mannequin

loewis mannequin commented Nov 20, 2007

BPO 1473
Nosy @loewis, @tiran

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/tiran'
closed_at = <Date 2007-11-20.22:03:56.335>
created_at = <Date 2007-11-20.04:44:28.829>
labels = []
title = 'Drop _EXPORTS macros in PCbuild9'
updated_at = <Date 2008-01-06.22:29:44.972>
user = 'https://github.com/loewis'

bugs.python.org fields:

activity = <Date 2008-01-06.22:29:44.972>
actor = 'admin'
assignee = 'christian.heimes'
closed = True
closed_date = <Date 2007-11-20.22:03:56.335>
closer = 'christian.heimes'
components = []
creation = <Date 2007-11-20.04:44:28.829>
creator = 'loewis'
dependencies = []
files = []
hgrepos = []
issue_num = 1473
keywords = []
message_count = 4.0
messages = ['57693', '57694', '57708', '57712']
nosy_count = 2.0
nosy_names = ['loewis', 'christian.heimes']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1473'
versions = ['Python 3.0']

@loewis
Copy link
Mannequin Author

loewis mannequin commented Nov 20, 2007

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.

@loewis loewis mannequin assigned tiran Nov 20, 2007
@tiran
Copy link
Member

tiran commented Nov 20, 2007

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

@loewis
Copy link
Mannequin Author

loewis mannequin commented Nov 20, 2007

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.

@tiran
Copy link
Member

tiran commented Nov 20, 2007

WIN32 is required. Without WIN32 defined I'm getting errors in the
locale module. _WINDOWS seems to be obsolete.

@tiran tiran closed this as completed Nov 20, 2007
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant