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.

classification
Title: redefinition of TILDE macro on AIX platform
Type: compile error Stage: resolved
Components: Build Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, apaprocki, benjamin.peterson, r.david.murray, sable, srid
Priority: normal Keywords:

Created on 2008-12-02 23:00 by apaprocki, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (6)
msg76800 - (view) Author: Andrew Paprocki (apaprocki) Date: 2008-12-02 23:00
"Include/token.h", line 42.9: 1506-236 (W) Macro name TILDE has been
redefined.
"Include/token.h", line 42.9: 1506-358 (I) "TILDE" is defined on line
250 of /usr/include/sys/ioctl.h.
msg109600 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-08 20:57
Is this still a problem or can the issue be closed?
msg110441 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-07-16 13:54
The define in question by that name still exists in token.h in 3.x.  I've added srid to nosy since as an AIX user he probably knows if this is a real problem or not, and Benjamin because he's done a lot with the parser.
msg110771 - (view) Author: Sridhar Ratnakumar (srid) Date: 2010-07-19 16:10
I've located the following patch in our ActivePython source tree.

$ cat src/patches/3.1/general/aix_tilde.patch 
--- Include/token.h.orig        2008-10-08 11:51:52.000000000 -0700
+++ python/Include/token.h      2008-10-08 11:52:53.000000000 -0700
@@ -7,6 +7,8 @@
 extern "C" {
 #endif
 
+#undef TILDE   /* Prevent clash of our definition with system macro. Ex AIX, ioctl.h */
+
 #define ENDMARKER      0
 #define NAME           1
 #define NUMBER         2
msg115694 - (view) Author: Sébastien Sablé (sable) Date: 2010-09-06 09:57
I can confirm that this problem is still present with Python 3.1.2 on AIX 6.1. This is just a compilation warning, but the patch in
msg110771 correctly cleans it.

xlc_r -c  -DNDEBUG -O  -I. -IInclude -I./Include -I/home/cis/data/bamboo-home-agent-runtime/xml-data/build-dir/RTAIX30-SUP/target/support/include -I/home/cis/data/bamboo-home-agent-runtime/xml-data/build-dir/RTAIX30-SUP/target/support/include/ncurses -I/home/cis/data/bamboo-home-agent-runtime/xml-data/build-dir/RTAIX30-SUP/target/support/include  -DPy_BUILD_CORE -o Parser/acceler.o Parser/acceler.c
"Include/token.h", line 42.9: 1506-236 (W) Macro name TILDE has been redefined.
"Include/token.h", line 42.9: 1506-358 (I) "TILDE" is defined on line 270 of /usr/include/sys/ioctl.h.
msg118992 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-10-18 00:20
Committed to py3k in r85675, 3.1 in r85676, and 2.7 in r85677.
History
Date User Action Args
2022-04-11 14:56:42adminsetgithub: 48749
2010-10-18 00:20:57r.david.murraysetstatus: open -> closed
resolution: fixed
messages: + msg118992

stage: resolved
2010-09-06 09:57:53sablesetnosy: + sable
messages: + msg115694
2010-07-19 16:10:35sridsetmessages: + msg110771
2010-07-16 13:54:18r.david.murraysetnosy: + r.david.murray, srid, benjamin.peterson
messages: + msg110441
2010-07-08 20:57:53BreamoreBoysetversions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
nosy: + BreamoreBoy

messages: + msg109600

components: + Build, - None
2008-12-02 23:00:08apaprockicreate