Zooko O'Whielacronx <[EMAIL PROTECTED]> added the comment: Sorry I didn't get back to this ticket, MvL.
Recently someone trying to build the Tahoe distributed filesystem on Solaris had a problem: http://allmydata.org/pipermail/tahoe-dev/2008-September/000789.html They had built Python 2.5 themselves from source. It turned out to be this issue: http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6395191 Which is that g++ on Solaris fails when _XOPEN_SOURCE_EXTENDED is defined. This reminded me of this ticket, so here I am again. So, here is the port of Python to Solaris that is maintained by the Solaris engineers: http://src.opensolaris.org/source/xref/jds/spec-files/trunk/SUNWPython.spec It contains the following stanza: 146 # These #define's break the build with gcc and cause problems when 147 # building c99 compliant python modules 148 perl -pi -e 's/^(#define _POSIX_C_SOURCE.*)/\/* $1 *\//' pyconfig.h 149 perl -pi -e 's/^(#define _XOPEN_SOURCE.*)/\/* $1 *\//' pyconfig.h 150 perl -pi -e 's/^(#define _XOPEN_SOURCE_EXTENDED.*)/\/* $1 *\//' pyconfig.h This shows that the Python that comes with Solaris has, for a long time now, had these #define's stripped out of the pyconfig.h. Why? Well, I asked the Solaris engineers about it on IRC, and they were very nice and helpful, and they said, if I am remembering correctly, that Solaris doesn't use these #define's in the way that we Python people think. #defining _XOPEN_SOURCE_EXTENDED on Solaris is *not* understood by the Solaris runtime as a request for XPG4v2 (UNIX98) features to be supported, but more as a declaration that the code we are compiling was written for XPG4v2. So, for example, this disables C99, because after all C99 wasn't available in XPG4v2. It also apparently breaks g++, but that is by accident rather than design. In any case, the Solaris engineers assured me that rather than figuring out which unixy features are turned on by which #defines, we should instead #define __EXTENSIONS__ and then assume all the features we can eat. Whether this is true in general remains to be seen, but apparently _POSIX_C_SOURCE, _XOPEN_SOURCE, and _XOPEN_SOURCE_EXTENDED, at least, are proven to be unnecessary on Solaris by the fact that the version of Python that has been shipping with Solaris for who knows how long has them stripped out. Therefore, I propose to apply my patch so that we do not turn on _XOPEN_SOURCE but we do turn on __EXTENSIONS__, when building for Solaris. _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1759169> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com