summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2005-09-14 17:49:54 (GMT)
committerGuido van Rossum <guido@python.org>2005-09-14 17:49:54 (GMT)
commit539c662f10b41d15f658cabfa03cc02902862adc (patch)
tree4df533b4d47a5481832638a22a7225499ca67591
parent3fbf3204c5526589eeedf6413a3875a0fdd2f25d (diff)
downloadcpython-539c662f10b41d15f658cabfa03cc02902862adc.zip
cpython-539c662f10b41d15f658cabfa03cc02902862adc.tar.gz
cpython-539c662f10b41d15f658cabfa03cc02902862adc.tar.bz2
- Changes donated by Elemental Security to make it work on HP-UX 11 on
Itanium2 with HP's 64-bit compiler (SF patch #1225212).
-rw-r--r--Include/pyport.h2
-rw-r--r--Misc/NEWS3
-rw-r--r--Python/thread.c14
-rw-r--r--README20
4 files changed, 37 insertions, 2 deletions
diff --git a/Include/pyport.h b/Include/pyport.h
index f71b9f4..2440c55 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -297,7 +297,7 @@ extern "C" {
* This isn't reliable. See Py_OVERFLOWED comments.
* X is evaluated more than once.
*/
-#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || (defined(__hpux) && defined(__ia64))
#define _Py_SET_EDOM_FOR_NAN(X) if (isnan(X)) errno = EDOM;
#else
#define _Py_SET_EDOM_FOR_NAN(X) ;
diff --git a/Misc/NEWS b/Misc/NEWS
index 27483d4..33d6732 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@ What's New in Python 2.5 alpha 1?
Core and builtins
-----------------
+- Changes donated by Elemental Security to make it work on HP-UX 11 on
+ Itanium2 with HP's 64-bit compiler (SF patch #1225212).
+
- Disallow keyword arguments for type constructors that don't use them
(fixes bug #1119418).
diff --git a/Python/thread.c b/Python/thread.c
index 4c0edfb..5e7fc6c 100644
--- a/Python/thread.c
+++ b/Python/thread.c
@@ -45,6 +45,20 @@
#define SUN_LWP
#endif
+/* Check if we're running on HP-UX and _SC_THREADS is defined. If so, then
+ enough of the Posix threads package is implimented to support python
+ threads.
+
+ This is valid for HP-UX 11.23 running on an ia64 system. If needed, add
+ a check of __ia64 to verify that we're running on a ia64 system instead
+ of a pa-risc system.
+*/
+#ifdef __hpux
+#ifdef _SC_THREADS
+#define _POSIX_THREADS
+#endif
+#endif
+
#endif /* _POSIX_THREADS */
diff --git a/README b/README
index 07a38a0..df92b9f 100644
--- a/README
+++ b/README
@@ -368,7 +368,25 @@ HP-UX ia64: When building on the ia64 (Itanium) platform using HP's
compiler, some experience has shown that the compiler's
optimiser produces a completely broken version of python
(see http://www.python.org/sf/814976). To work around this,
- edit the Makefile and remove -O from the OPT line.
+ edit the Makefile and remove -O from the OPT line. (This is
+ old information; with the latest compiler this problem does
+ not occur.)
+
+ To build a 64-bit executable on an Itanium 2 system using HP's
+ compiler, use these environment variables:
+
+ CC=cc
+ CXX=aCC
+ BASECFLAGS="+DD64"
+ LDFLAGS="+DD64 -lxnet"
+
+ and call configure as:
+
+ ./configure --without-gcc
+
+ then *unset* the environment variables again before running
+ make. (At least one of these flags causes the build to fail
+ if it remains set.)
HP PA-RISC 2.0: A recent bug report (http://www.python.org/sf/546117)
suggests that the C compiler in this 64-bit system has bugs