[Python-bugs-list] [ python-Bugs-628890 ] 2.3 compile fails - Tru64 4.0F (+fix)

noreply@sourceforge.net noreply@sourceforge.net
Fri, 25 Oct 2002 16:52:55 -0700


Bugs item #628890, was opened at 2002-10-26 07:52
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=628890&group_id=5470

Category: Build
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Mark Favas (mfavas)
Assigned to: Nobody/Anonymous (nobody)
Summary: 2.3 compile fails - Tru64 4.0F (+fix) 

Initial Comment:
Since the addition of "#define _XOPEN_SOURCE 500" to
configure and pyconfig.h.in some time ago, anything
involving threads no longer compiles on Tru64 Unix
4.0F. This includes the thread tests performed by
configure and the thread module. Tru64 (at least in its
4.0 incarnation) requires that "_POSIX_C_SOURCE
199506L" be defined if "_XOPEN_SOURCE 500"  is defined.
The relevant excerpt from pthread.h is quoted below.
The fix requires a patch to configure (or configure.in)
and to pyconfig.h.in.

posixmodule also fails to compile, with "fchdir",
"lstat" and "symlink" undeclared. The fix to this also
requires a patch to configure and to pyconfig.h.in -
_XOPEN_SOURCE_EXTENDED needs to be defined.

I'll combine both fixes and submit a patch.

 * The POSIX 1003.1c-1995 standard was formally
approved at the June 1995
 * meeting of the IEEE Standards Board. The correct
configuration test macro
 * for strictly conforming POSIX 1003.1c-1995
applications is
 *
 *      #define _POSIX_C_SOURCE 199506L
 *
 * The POSIX standard requires that, for portability,
the application must
 * define _POSIX_C_SOURCE within each compilation unit,
for example, by
 * compiling with -D_POSIX_C_SOURCE=199506L. The Tru64
UNIX <standards.h> will
 * default _POSIX_C_SOURCE to the latest POSIX 1003.1
revision supported by
 * the operating system (currently 1003.1c-1995) if no
other confining
 * standard definitions are already defined. In other
words, unless the
 * programmer specifies a specific restriction, the
programmer will have
 * access to all standards that aren't inherently
incompatible.
 *
 * Compiling with some other standards modes will
disable POSIX 1003.1c-1995
 * support, as the thread interfaces violate name space
rules required by
 * those standards. For example, defining any of the
symbols _POSIX_SOURCE
 * (1003.1-1990), _POSIX_C_SOURCE=199309L
(1003.1b-1993), _XOPEN_SOURCE or
 * _XOPEN_SOURCE_EXTENDED (UNIX95 or earlier, which
require 1003.1-1990), or
 * _ANSI_C_SOURCE (ANSI C) will disable thread support.
A program built with
 * any of these options that includes <pthread.h> will
not compile properly,
 * as <sys/types.h> will fail to define types and
symbols required by
 * pthread.h.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=628890&group_id=5470