This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47491] [4.6 Regression] libgfortran: getpwuid_r (for GETLOG) breaks bootstrapping
- From: "jb at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 27 Jan 2011 16:11:13 +0000
- Subject: [Bug fortran/47491] [4.6 Regression] libgfortran: getpwuid_r (for GETLOG) breaks bootstrapping
- Auto-submitted: auto-generated
- References: <bug-47491-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47491
--- Comment #2 from Janne Blomqvist <jb at gcc dot gnu.org> 2011-01-27 16:10:41 UTC ---
Some git-grepping showed that at least libjava has in configure.ac
AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Required define if using POSIX
threads])
and in case Boehm GC is not used (which libgfortran never uses):
AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads])
However, if I understand gcc/config/ correctly, _REENTRANT should be
automatically set for all targets that need it.
Also in gcc/config a few targets set
-D_POSIX_C_SOURCE=199506L
(not Solaris, though). But apparently we shouldn't go and set this somewhere in
libgfortran? That is, at least no other library does this..
Moreover, in config/extensions.m4 there is the macro
AC_USE_SYSTEM_EXTENSIONS
that seems to define _POSIX_PTHREAD_SEMANTICS on Solaris.
This seems to me the most sensible solution. Would that work?