[Patch, libfortran] PR 47491 GETLOG thread-safety breaks Solaris bootstrap

Janne Blomqvist blomqvist.janne@gmail.com
Thu Jan 27 17:21:00 GMT 2011


Hi,

Rainer Orth reported that my recent patch to make the GETLOG intrinsic
thread-safe by using getpwuid_r() broke bootstrap on Solaris. The
reason is that Solaris has both the POSIX version and an older
pre-standard version with a different signature. By default the old
pre-standard version is used unless

#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS)

The attached patch hopefully fixes this issue by calling the
AC_USE_SYSTEM_EXTENSIONS macro which should set
_POSIX_PTHREAD_SEMANTICS on Solaris.

Regtested on x86_64-unknown-linux-gnu, Ok for trunk?

2011-01-27  Janne Blomqvist  <jb@gcc.gnu.org>

	PR libfortran/47491
	* configure.ac: Call AC_USE_SYSTEM_EXTENSIONS to enable common
	extensions.
	* config.h.in: Regenerate.
	* configure: Regenerate.


-- 
Janne Blomqvist
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getlog2.diff
Type: text/x-patch
Size: 363 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110127/f76b3317/attachment.bin>


More information about the Gcc-patches mailing list