classification
Title: HP-UX build needs to be tweaked to pick up PATH_MAX
Type: compile error Stage: resolved
Components: Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: trent Nosy List: loewis, python-dev, skrah, trent
Priority: normal Keywords: buildbot, patch

Created on 2012-08-31 23:52 by trent, last changed 2012-11-12 19:40 by skrah. This issue is now closed.

Files
File name Uploaded Description Edit
issue15835.diff skrah, 2012-09-23 17:58 review
Messages (5)
msg169593 - (view) Author: Trent Nelson (trent) * (Python committer) Date: 2012-08-31 23:52
Building on HP-UX with the HP ANSI C compiler:


% make                                     
        cc -Ae -c  -O  -O  -I. -I./Include    -DPy_BUILD_CORE -o Python/pythonrun.o Python/pythonrun.c
"Python/pythonrun.c", line 805: error #2020: identifier "PATH_MAX" is undefined
  static wchar_t env_home[PATH_MAX+1];
                          ^

1 error detected in the compilation of "Python/pythonrun.c".
*** Error exit code 2

Stop.

Placeholder bug whilst I do some more digging.
msg171068 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-09-23 17:58
PATH_MAX seems to be a mess on HP-UX: It's only defined in limits.h
if _INCLUDE_XOPEN_SOURCE_PRE_500 is defined.

But MAXPATHLEN is always defined in sys/param.h, so I suggest to use that
(patch attached).


Other projects take a similar approach by just defining PATH_MAX as 1024:

http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00242.html
msg175455 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-11-12 15:43
The patch looks good, please apply.
msg175466 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-11-12 19:37
New changeset 5db6d9ddf6e8 by Stefan Krah in branch '3.3':
Issue #15835: Define PATH_MAX on HP-UX.
http://hg.python.org/cpython/rev/5db6d9ddf6e8
msg175467 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-11-12 19:40
Thanks for reviewing!
History
Date User Action Args
2012-11-12 19:40:04skrahsetstatus: open -> closed
resolution: fixed
messages: + msg175467

stage: resolved
2012-11-12 19:37:08python-devsetnosy: + python-dev
messages: + msg175466
2012-11-12 15:43:35loewissetnosy: + loewis
messages: + msg175455
2012-09-23 17:58:06skrahsetfiles: + issue15835.diff

nosy: + skrah
messages: + msg171068

keywords: + buildbot, patch
2012-08-31 23:52:29trentcreate