You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building Python 3.1.2 on Cygwin 1.7, I got errors in main.c stemming from a warning: PATH_MAX redefined (see attached log). I got around this by commenting out the #define. I don't know if the best solution is #ifndef, #undef, or something else. . . . I know CygWin has changed the value of PATH_MAX in 1.7 (see: http://www.cygwin.com/cygwin-ug-net/ov-new1.7.html), though I'm not sure why that would cause this problem.
None of the developers are much up on Cygwin and I am not sure it is directly supported by the core distribution. If it is not, this should be closed unless you have a specific patch.
In any case, you might do better with your question on python-list. Also, PEP-11 list Jason Tishler (jason@tishler.net) as Cygwin maintainer.
Next time, please attach an edited, plain-text .txt log that can be viewed in the browser. I would have to be really motivated to download and extract a tar.gz file.
Hi Mark,
#else before is not solution. See unified diff below as post by Scott Rostrup lack definition
Some additional information:
a) move outside #ifdef HAVE_FCNTL_H : definition PATH_MAX is not related to control functions on open files (fcntl.h)
b) HAVE_FCNTL_H is defined for MSC build as well. so no impact on other build
Activity
jbinder commentedon Apr 27, 2010
Building Python 3.1.2 on Cygwin 1.7, I got errors in main.c stemming from a warning: PATH_MAX redefined (see attached log). I got around this by commenting out the #define. I don't know if the best solution is #ifndef, #undef, or something else. . . . I know CygWin has changed the value of PATH_MAX in 1.7 (see: http://www.cygwin.com/cygwin-ug-net/ov-new1.7.html), though I'm not sure why that would cause this problem.
terryjreedy commentedon Aug 5, 2010
None of the developers are much up on Cygwin and I am not sure it is directly supported by the core distribution. If it is not, this should be closed unless you have a specific patch.
In any case, you might do better with your question on python-list. Also, PEP-11 list Jason Tishler (jason@tishler.net) as Cygwin maintainer.
Next time, please attach an edited, plain-text .txt log that can be viewed in the browser. I would have to be really motivated to download and extract a tar.gz file.
ScottRostrup commentedon Dec 24, 2010
I just encountered this error in python 3.1.3 on cygwin 1.7.
I used the same fix as jbinder.
Old Modules/main.c (line 13):
I guess now cygwin is defining PATH_MAX, one possible fix with ifndef:
This compiled and worked for me and it appears jbinder as well.
NicholasDiPiazza commentedon May 29, 2012
In Python3.1.2-src/Modules/main.c
I actually had to use this to get it to work:
BreamoreBoy commentedon Jul 29, 2014
main.c has this.
Wouldn't inserting #else before #define fix this issue?
rpetrov commentedon Aug 3, 2014
Hi Mark,
#else before is not solution. See unified diff below as post by Scott Rostrup lack definition
Some additional information:
a) move outside #ifdef HAVE_FCNTL_H : definition PATH_MAX is not related to control functions on open files (fcntl.h)
b) HAVE_FCNTL_H is defined for MSC build as well. so no impact on other build
ma8ma commentedon Apr 21, 2015
This issue resolved on default branch in bpo-20597 .
In 3.4 branch latest, PATH_MAX seems unused already in Modules/main.c:12 and Python/pythonrun.c:35.
I want to cherry-pick bpo-20597 to 3.4 branch.
ma8ma commentedon Nov 2, 2017
This issue has been out-of-date since Python 3.4 maintenance became security status.
berkerpeksag commentedon Nov 2, 2017
Thank you for doing issue triage, Masayuki!