Title: PC/pyconfig.h defines PREFIX macro
Type: compile error Stage: resolved
Components: Build, Windows Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: brian.curtin, christian.heimes, larry, loewis, python-dev, tim.golden
Priority: normal Keywords:

Created on 2013-04-18 19:46 by christian.heimes, last changed 2013-11-20 16:40 by christian.heimes. This issue is now closed.

Messages (7)
msg187284 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-04-18 19:46
The pyconfig.h file of the Windows build environment defines at least two macros without a Py/PY prefix:

PC/pyconfig.h:#define PREFIX ""
PC/pyconfig.h:#define EXEC_PREFIX ""

This has caused multiple issues in the past. For example libexpat uses PREFIX, too. When I was working on my XML patches it took me about half an hour to fix the build on Windows. PyLucence's JCC has run into the same issue, too.

Can we change the name of PREFIX to PY_PREFIX nad EXEC_PREFIX to PY_EXEC_PREFIX?
msg191770 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-06-24 14:33
It looks like we can drop PREFIX and EXEC_PREFIX from PC/pyconfig.h all along. Only Modules/getpath.c uses PREFIX and EXEC_PREFIX but MSVC build use PC/getpathp.c instead of Modules/getpath.c
msg200760 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-10-21 12:17
ping RMs and Windows devs
msg201006 - (view) Author: Tim Golden (tim.golden) * (Python committer) Date: 2013-10-23 08:56
Ok by me: build and tests all ok.
msg201007 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-10-23 08:58
Fantastic! Does anybody know anything about Cygwin builds? I expect that Cygwin uses autoconf to generate its own pyconfig.h.
msg203162 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-11-17 14:13
I'll remove the offending lines later.
msg203502 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-11-20 16:40
New changeset fbd856e817a1 by Christian Heimes in branch 'default':
Issue #17791: Drop PREFIX and EXEC_PREFIX definitions from PC/pyconfig.h
Date User Action Args
2013-11-20 16:40:52christian.heimessetstatus: open -> closed
resolution: fixed
stage: needs patch -> resolved
2013-11-20 16:40:42python-devsetnosy: + python-dev
messages: + msg203502
2013-11-17 14:13:51christian.heimessetassignee: christian.heimes
messages: + msg203162
2013-10-23 08:58:46christian.heimessetmessages: + msg201007
2013-10-23 08:56:55tim.goldensetmessages: + msg201006
2013-10-21 12:17:04christian.heimessetnosy: + larry, tim.golden, brian.curtin
messages: + msg200760
2013-06-24 14:33:54christian.heimessetmessages: + msg191770
2013-04-18 19:46:19christian.heimescreate