[ python-Bugs-1023838 ] Include/pyport.h: Bad LONG_BIT assumption
on non-glibc sys
SourceForge.net
noreply at sourceforge.net
Tue Sep 7 19:57:44 CEST 2004
Bugs item #1023838, was opened at 2004-09-07 13:30
Message generated for change (Comment added) made by tim_one
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1023838&group_id=5470
Category: Build
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Gregor Richards (cdgregorr)
Assigned to: Nobody/Anonymous (nobody)
Summary: Include/pyport.h: Bad LONG_BIT assumption on non-glibc sys
Initial Comment:
While attempting to compile on Solaris 8 64-bit or HPUX
64-bit, Python 2.3.4 has an "error" because LONG_BIT is
not defined properly. This error is incorrect on non-glibc
systems, and Python compiles fine with it disabled.
Here's the incorrect assumption:
#if LONG_BIT != 8 * SIZEOF_LONG
/* 04-Oct-2000 LONG_BIT is apparently (mis)defined as
64 on some recent
* 32-bit platforms using gcc. We try to catch that
here at compile-time
* rather than waiting for integer multiplication to trigger
bogus
* overflows.
*/
#error "LONG_BIT definition appears wrong for platform
(bad gcc/glibc config?)."
#endif
This should include something to limit it to only glibc
systems.
- Gregor Richards
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2004-09-07 13:57
Message:
Logged In: YES
user_id=31435
What are LONG_BIT and SIZEOF_LONG on these platforms?
It doesn't matter whether gcc is being used, if LONG_BIT is
defined incorrectly for the platform, then it's defined
incorrectly period.
Read the comment you quoted to see why it doesn't matter
whether Python "compiles fine" if you disable this. It's
guarding against runtime errors in Python's intobject.c, which
needs a correct value for LONG_BIT. Presumably LONG_BIT
should be 64 on these boxes, and SIZEOF_LONG should be 8.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1023838&group_id=5470
More information about the Python-bugs-list
mailing list