This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 3.4 PATCH: Support POSIX threads on Tru64 UNIX
- From: Bruce Korb <bkorb at veritas dot com>
- To: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- Cc: gcc-patches at gcc dot gnu dot org, Bruce Korb <bkorb at gnu dot org>, Roger Sayle <roger at eyesopen dot com>
- Date: Tue, 15 Jul 2003 15:27:23 -0700
- Subject: Re: 3.4 PATCH: Support POSIX threads on Tru64 UNIX
- References: <16148.30719.970280.794166@xayide.TechFak.Uni-Bielefeld.DE>
- Reply-to: bkorb at veritas dot com
Rainer Orth wrote:
>
> This patch is the last in a series of three to fully support (and enable by
> default) --enable-threads=posix on Tru64 UNIX V4/V5. The relevant boehm-gc
> and libjava patches (still unreviewed)
>
> http://gcc.gnu.org/ml/java-patches/2003-q3/msg00075.html
> http://gcc.gnu.org/ml/java-patches/2003-q3/msg00076.html
>
> need to go in first to avoid problems with enabling pthread support by
> default.
>
> Apart from the necessary configury and doc bits, the patch consists of two
> parts:
>
> * Depending on the compiler used, <pthread.h> either uses #pragma
> extern_prefix or redefines to change the external names of some pthread
> functions, like so:
>
> # ifdef _PTHREAD_USE_PTDNAM_
> # pragma extern_prefix "__"
> # else
> # define pthread_self __pthread_self
> # endif
>
> Since the macro games cause all sorts of problems and gcc already
> supports #pragma extern_prefix, this patch uses fixincludes to also
> define _PTHREAD_USE_PTDNAM_ if __PRAGMA_EXTERN_PREFIX is defined
> (i.e. gcc's feature test macro to denote its support for the feature).
> This is not strictly necessary, but simplifies the patch alot.
The fixinc part looks safe and correct to me.