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: Failed to compile selectmodule.c on windows (trunk)
Type: compile error Stage: needs patch
Components: Build, Library (Lib) Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: amaury.forgeotdarc, gregory.p.smith, ocean-city, r.david.murray
Priority: critical Keywords: easy

Created on 2009-07-04 11:24 by ocean-city, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg90113 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2009-07-04 11:24
I cannot compile selectmodule.c on windows(trunk). PIPE_BUF will not be
defined if macro _POSIX_ is not defined. But if define _POSIX_ before
"#include <limits.h>" in Include/Python.h another compile error happens.

E:\python-dev\trunk\PC\msvcrtmodule.c(39) : warning C4013: 関数
'_heapmin' は定義されていません。int 型の値を返す外部関数と見なします。
E:\python-dev\trunk\Modules\posixmodule.c(2901) : warning C4013: 関数
'_exit' は定義されていません。int 型の値を返す外部関数と見なします。
E:\python-dev\trunk\Modules\posixmodule.c(2974) : warning C4013: 関数
'execv' は定義されていません。int 型の値を返す外部関数と見なします。
E:\python-dev\trunk\Modules\posixmodule.c(3107) : warning C4013: 関数
'execve' は定義されていません。int 型の値を返す外部関数と見なします。
E:\python-dev\trunk\Modules\posixmodule.c(3194) : error C2065:
'_OLD_P_OVERLAY' : 定義されていない識別子です。
E:\python-dev\trunk\Modules\posixmodule.c(3195) : error C2065:
'_P_OVERLAY' : 定義されていない識別子です。
E:\python-dev\trunk\Modules\posixmodule.c(3198) : warning C4013: 関数
'_spawnv' は定義されていません。int 型の値を返す外部関数と見なします。
E:\python-dev\trunk\Modules\posixmodule.c(3343) : warning C4013: 関数
'_spawnve' は定義されていません。int 型の値を返す外部関数と見なします。
E:\python-dev\trunk\Modules\posixmodule.c(3790) : warning C4013: 関数
'getpid' は定義されていません。int 型の値を返す外部関数と見なします。
E:\python-dev\trunk\Modules\posixmodule.c(4918) : warning C4013: 関数
'alloca' は定義されていません。int 型の値を返す外部関数と見なします。
E:\python-dev\trunk\Modules\posixmodule.c(5868) : warning C4013: 関数
'_cwait' は定義されていません。int 型の値を返す外部関数と見なします。
E:\python-dev\trunk\Modules\posixmodule.c(6743) : warning C4013: 関数
'putenv' は定義されていません。int 型の値を返す外部関数と見なします。
E:\python-dev\trunk\Modules\posixmodule.c(8941) : error C2065: '_P_WAIT'
: 定義されていない識別子です。
E:\python-dev\trunk\Modules\posixmodule.c(8942) : error C2065:
'_P_NOWAIT' : 定義されていない識別子です。
E:\python-dev\trunk\Modules\posixmodule.c(8944) : error C2065:
'_P_NOWAITO' : 定義されていない識別子です。
E:\python-dev\trunk\Modules\posixmodule.c(8945) : error C2065:
'_P_DETACH' : 定義されていない識別子です。
(snip)

Probaly it's not good define _POSIX_ on windows. Is it reasonable to put
"#ifdef PIPE_BUF" around

	PyModule_AddIntConstant(m, "PIPE_BUF", PIPE_BUF);

in selectmodule.c.
msg90114 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2009-07-04 11:59
>E:\python-dev\trunk\PC\msvcrtmodule.c(39) : warning C4013:
>関数'_heapmin' は定義されていません。int 型の値を返す外部関数と見なします。

This means "_heapmin is not defined".
msg90335 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-07-09 17:32
This constant was introduced in r73818 by Gregory, so I'm assigning this
ticket to him.  Note that the trunk Windows buildbot is also failing to
compile because of this bug.
msg90337 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-07-09 17:53
I found this article that might be of interest with regards to PIPE_BUF
(or rather lack thereof) on Windows:

http://cygwin.com/ml/cygwin-patches/2004-q3/msg00084.html

It doesn't look like "doing the right thing" in Windows where in Posix
you would use PIPE_BUF is particularly easy, but that doesn't really
impact fixing the compile error.
msg90361 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-07-09 22:44
PIPE_BUF was introduced for the subprocess module to use it... on posix 
platforms only.
r73916 (trunk) and r73917 (py3k) add the suggested #ifdef, and also fix 
test_subprocess.
History
Date User Action Args
2022-04-11 14:56:50adminsetgithub: 50665
2009-07-09 22:44:43amaury.forgeotdarcsetstatus: open -> closed

nosy: + amaury.forgeotdarc
messages: + msg90361

resolution: fixed
2009-07-09 17:53:51r.david.murraysetmessages: + msg90337
2009-07-09 17:32:07r.david.murraysetpriority: high -> critical

type: compile error
assignee: gregory.p.smith
components: + Library (Lib), - Windows

keywords: + easy
nosy: + gregory.p.smith, r.david.murray
messages: + msg90335
stage: needs patch
2009-07-05 05:15:57ocean-citysetversions: + Python 3.2, - Python 3.1
2009-07-05 05:14:22ocean-citysetversions: + Python 3.1
2009-07-05 05:13:50ocean-citysetpriority: high
2009-07-04 11:59:43ocean-citysetmessages: + msg90114
2009-07-04 11:24:34ocean-citycreate