This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Only define _REENTRANT in gthr-posix.h for Tru64


Roger Sayle <roger@eyesopen.com> writes:

> Ok for mainline?  Although this looks obvious, the possibility of
> temporary breakage on other platforms (HPUX?), means I'd prefer a
> second opinion for code outside my maintainership.

This is PR libstdc++/11953, which Gaby incorrectly closed as fixed when
Jakub applied a local patch to the RedHat GCC 4.1 branch.

> 2006-07-16  Roger Sayle  <roger@eyesopen.com>
> 
> 	* gthr-posix.h (_REENTRANT): Only force to be defined on Tru64.

The beast is called Tru64 UNIX :-)  Please add the PR number, too.

> Index: gthr-posix.h
> ===================================================================
> --- gthr-posix.h	(revision 115282)
> +++ gthr-posix.h	(working copy)
> @@ -36,9 +36,11 @@
>  #define __GTHREADS 1
> 
>  /* Some implementations of <pthread.h> require this to be defined.  */
> +#ifdef __osf__
>  #ifndef _REENTRANT
>  #define _REENTRANT 1
>  #endif
> +#endif

You should add a comment explaining what's going on here.

Doing it this way is certainly an option, although ugly.  I had a patch
(back in 2004, never submitted ;-) that handled the problem by using
-pthread in t-osf-pthread and adding special code in libobjc/thr-objc.c and
libstdc++-v3/{configure.host, config/os/osf}.  Doing it this way at least
has the advantage of having the necessary code in one place.

Btw., could someone have a look at

	http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00533.html

which fixes a pthread-related regression on the 4.1 branch and mainline,
fixes hundreds of testcases and speeds up Tru64 UNIX testing by a factor of
two or three ;-)

Thanks.
	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]