[Python-Dev] problems with SUSv2 compatibility defines
Sjoerd Mullender
sjoerd@oratrix.nl
Fri, 07 Jul 2000 14:01:48 +0200
On Fri, Jul 7 2000 "M.-A. Lemburg" wrote:
> Perhaps you could figure out which defines are needed to
> reenable the missing APIs on IRIX when _XOPEN_SOURCE is
> defined... it would be helpful to help pin-point the
> weak spots w/r to SUSv2 compatibility.
It looks like there is no way of doing this. The relevant bits of
code are:
In time.h (as an example):
#if _SGIAPI && _NO_ANSIMODE
extern time_t altzone;
#endif /* _SGIAPI */
So _SGIAPI and _NO_ANSIMODE should both be defined and != 0.
The definition of _SGIAPI is
#define _SGIAPI ((defined(_SGI_SOURCE) && \
_NO_POSIX && _NO_XOPEN4 && _NO_XOPEN5) || \
(_ANSIMODE && _NO_POSIX && _NO_XOPEN4 && _NO_XOPEN5))
So, if _NO_XOPEN5 is 0, _SGIAPI is 0. The definition of _NO_XOPEN5 is
#define _NO_XOPEN5 (!defined(_XOPEN_SOURCE) || \
(defined(_XOPEN_SOURCE) && \
(_XOPEN_SOURCE+0 < 500)))
So _NO_XOPEN5 is 0 since _XOPEN_SOURCE is defined and >= 500.
All of this on IRIX 6.5.2. I can't check other versions of IRIX.
-- Sjoerd Mullender <sjoerd.mullender@oratrix.com>