[Python-Dev] configure problems porting to Tru64

Jeremy Hylton jeremy@alum.mit.edu
Thu, 18 Jul 2002 15:08:16 -0400


I've been trying to build with the current CVS on Tru64 today.  This
is Tru64 Unix 5.1a with Compaq C++ 6.5.  I've run into a bunch of
problems with posixmodule.c (not surprise there), but I don't know
what the right strategy for fixing them is.

Here is a conflicting set of problems:

fchdir() is only defined if _XOPEN_SOURCE_EXTENDED is defined.

setpgrp() takes no arguments if _XOPEN_SOURCE_EXTENDED is defined, but
two arguments if it is not.

I found the fchdir() problem first and though the solution would be to
change this bit of code in Python.h:

    /* Forcing SUSv2 compatibility still produces problems on some
       platforms, True64 and SGI IRIX being two of them, so for now the
       define is switched off. */
    #if 0
    #ifndef _XOPEN_SOURCE
    # define _XOPEN_SOURCE	500
    #endif
    #endif

And change "#if 0" to "#if __digital__", but that causes the setpgrp()
problem to appear.  It seems that configure has a test for whether
setpgrp() takes arguments, but configure runs its test without
defining _XOPEN_SOURCE.

(I'll also note that configure.in has a rather complex test for this,
when it appears that autoconf has a builtin AC_FUNC_SETPGRP.  Anyone
know why we don't use this?)

How should we actually fix this problem?  It seems to me that the
right solution is to define _XOPEN_SOURCE in Tru64 and somehow
guarantee that configure runs its tests with that defined, too.  How
would we achieve that?

Jeremy