3.4 PATCH: Support POSIX threads on Tru64 UNIX

Bruce Korb bkorb@veritas.com
Tue Jul 15 22:27:00 GMT 2003


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.



More information about the Gcc-patches mailing list