]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
(backport from HEAD)
authorGuido van Rossum <guido@python.org>
Wed, 14 Sep 2005 17:54:39 +0000 (17:54 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 14 Sep 2005 17:54:39 +0000 (17:54 +0000)
- Changes donated by Elemental Security to make it work on HP-UX 11 on
  Itanium2 with HP's 64-bit compiler (SF patch #1225212).

Include/pyport.h
Misc/NEWS
Python/thread.c
README

index f71b9f4ab901710d674783f88dd7bd4971848caf..2440c55f7a250cef09fc6395a80796b0a686f43a 100644 (file)
@@ -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) ;
index 9a890d526c1f9edc3cd4552580fabaa4d8d66057..47d0206d84a5bd87f8adac11dbe8e6d584658439 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@ What's New in Python 2.4.2a
 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).
 
index 4c0edfb93674d5e1024173ef007772f2801725c2..5e7fc6ccc1cbe03da004fc45cc9bbb7b0440c5db 100644 (file)
 #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 f173116c1f74776bb01b783a487320db92f556bb..f4e5379fbc33cabc4f2a839910efd884870b1b83 100644 (file)
--- a/README
+++ b/README
@@ -374,11 +374,29 @@ HP-UX:  When using threading, you may have to add -D_REENTRANT to the
        using HP/UX 11 and later - threading seems to work "out of the 
        box".
 
-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.
+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.  (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