[Python-Dev] problems with SUSv2 compatibility defines

Fredrik Lundh fredrik@pythonware.com
Fri, 7 Jul 2000 11:58:31 +0200


sjoerd wrote:
> The new defines in Python.h for SUSv2 compatibility seriously hamper
> compilation on SGI IRIX.

> Something needs to be done about this but I don't know what since I
> don't know why the defines were necessary.

It was an attempt to make sure certain features were correctly
defined.  Some platforms add more stuff when you define this
one, but others obviously remove stuff...

I suggest removing it for now (it solves problems on Linux, but
causes problems on at least Irix and tru64), and adding SUSv2
compliance as a possible design goal for Py3K... 

I've attached a patch (for some reason, I cannot check things in
from any of my work machines.  sigh.)

</F>

[fredrik@brain src]$ cvs diff -u Include/Python.h 
Index: Include/Python.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v
retrieving revision 2.20
diff -u -r2.20 Python.h
--- Include/Python.h    2000/07/05 08:53:18     2.20
+++ Include/Python.h    2000/07/07 09:55:53
@@ -12,14 +12,17 @@
 redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 ******************************************************************/
 
-/* Enable compiler features including SUSv2 compatibility; switching
-   on C lib defines doesn't work here, because the symbols haven't
-   necessarily been defined yet. */
+/* Enable compiler features; switching on C lib defines doesn't work
+   here, because the symbols haven't necessarily been defined yet. */
+
 #ifndef _GNU_SOURCE
 # define _GNU_SOURCE   1
 #endif
+
+#if 0 /* not yet.  breaks stuff on too many platforms */
 #ifndef _XOPEN_SOURCE
 # define _XOPEN_SOURCE 500
+#endif
 #endif
 
 /* Include nearly all Python header files */