[Patches] [ python-Patches-968728 ] Py_HUGE_VAL HUGE_VAL HUGE undefined

SourceForge.net noreply at sourceforge.net
Tue Jun 8 15:02:44 EDT 2004


Patches item #968728, was opened at 2004-06-08 04:48
Message generated for change (Comment added) made by tim_one
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=968728&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Schloh von Bennewitz (michaesc)
Assigned to: Nobody/Anonymous (nobody)
Summary: Py_HUGE_VAL HUGE_VAL HUGE undefined

Initial Comment:
In Python 2.3.4 (as well as the trunk revision on CVS), Py_HUGE_VAL 
is conditionally defined as HUGE_VAL. On at least Solaris 10 x86 and 
Solaris 10 SPARC, this causes a build failure.

I'm ashamed to say that I wasn't able to 100% diagnose this problem (I 
didn't have time). My first guess was that somehow HUGE_VAL was not 
getting properly defined on Solaris 10 due to its rewritten 
/usr/include/iso/math_iso.h file (now conditionally defining HUGE_VAL 
depending on a _STDC_C99 and _XOPEN_SOURCE definition).

Because I noticed that the identifier HUGE is unconditionally defined 
on Solaris 10 and seemingly all earlier Solaris releases, I tried using 
that instead and the build problem disappeared.

You can make your own conclusion as to whether my fix is correct, or if 
there is a better way to solve this problem. There may be a faulty 
assumption made by configure or in some Makefile of how the compiler 
is being used, or maybe python depends on a certain GCC release.

  CC: GCC 3.4.0
  CXX: GCC 3.4.0
  CFLAGS:   -O2 -pipe
  CXXFLAGS:   -O2 -pipe
  CPPFLAGS: None 
  Make:     GNU Make 3.80
  LDFLAGS:  None

  mich at dev:/tmp/Python-2.3.4$ ./configure --prefix=/cw
  checking MACHDEP... freebsd4
  checking EXTRAPLATDIR... 
  checking for --without-gcc... no
  checking for --with-cxx=<compiler>... no
  ...

The OpenPKG Python package and patch:
http://cvs.openpkg.org/dir?d=openpkg-src/python
http://cvs.openpkg.org/rlog?f=openpkg-src/python/python.patch

Lots of luck, and thanks for maintaining Python.

Regards,
Michael, OpenPKG
http://www.openpkg.org/


----------------------------------------------------------------------

>Comment By: Tim Peters (tim_one)
Date: 2004-06-08 15:02

Message:
Logged In: YES 
user_id=31435

I don't see a reason to call this a Python bug.  The C89 and 
C99 standards both require that math.h supply the HUGE_VAL 
macro.  If the compilation system you're using doesn't do so, 
it's a bug in that system, and should be fixed there.  Python 
doesn't ask for much, but does require an ANSI C compiler.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=968728&group_id=5470



More information about the Patches mailing list