This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: __ppc__ macro checking is incorrect
Type: compile error Stage:
Components: Versions: Python 3.0, Python 3.1
Status: closed Resolution: duplicate
Dependencies: Superseder: Wrong powerpc define in Python/ceval.c
View: 10655
Assigned To: Nosy List: arekm, wiget
Priority: normal Keywords: patch

Created on 2009-02-25 19:26 by arekm, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
3.0-issue5369.patch wiget, 2009-03-28 10:22
Messages (2)
msg82712 - (view) Author: Arkadiusz Miśkiewicz (arekm) Date: 2009-02-25 19:26
Python/ceval.c and many other places rely on __ppc__ (and __ppc64__) 
symbol defined like below.

Unfortunately on my Linux ppc __ppc__ is never defined while 
__powerpc__ is. Build fortunately failed so the problem was noticed.

The fix is to check for __powerpc__ and __powerpc64__ as for example 
glibc does.

#if defined(__ppc__) /* <- Don't know if this is the correct symbol; 
                           section should work for GCC on any PowerPC
                           platform, irrespective of OS.
                           POWER?  Who knows :-) */
msg84301 - (view) Author: Artur Frysiak (wiget) Date: 2009-03-28 10:22
__ppc__ is defined on MacOS X, __powerpc__ on Linux.

Only place when need check for both is Python/ceval.c
Date User Action Args
2022-04-11 14:56:46adminsetgithub: 49619
2011-01-06 16:48:34pitrousetstatus: open -> closed
resolution: duplicate
superseder: Wrong powerpc define in Python/ceval.c
2009-03-28 10:26:38wigetsetversions: + Python 3.1
2009-03-28 10:22:08wigetsetfiles: + 3.0-issue5369.patch

nosy: + wiget
messages: + msg84301

keywords: + patch
2009-02-25 19:26:06arekmcreate