This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: fix for single threaded configurations
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: java-patches at gcc dot gnu dot org
- Date: Tue, 01 Aug 2006 23:27:55 +0200
- Subject: Re: fix for single threaded configurations
- References: <200608012115.k71LF6ap024342@hiauly1.hia.nrc.ca>
John David Anglin wrote:
We do not want to use the reentrant functions like getpwuid_r or others
when we do not have a threaded environment.
Yes.
The mentioned function(s) is(are) only available on systems which
supports the POSIX threads.
Not quite true. The DCE thread environment on hpux10 has all these
functions but they have slightly different declararations. The code
as it presently exists won't work with the hpux10 variants.
Well, I based on this:
http://www.opengroup.org/onlinepubs/009695399/functions/getpwuid.html
Issue 5 and 6.
So an additional check on _POSIX_PTHREAD_SEMANTICS should be enough to
make it work.
Agreed. We don't want to use these functions with DCE threads.
Hopefully, they aren't used with any other thread model.
Hopefully we will hear.
The actual use case is a single threaded config on hpux-pa, the _r
functions are available in the headers check but not in the lib we link.
Actually, it's the reverse. There's no declaration check in configure
except for gethostbyaddr_r. The lib check detects the functions so we go
ahead and try to use the functions. However, the build fails in the no
thread case because _REENTRANT isn't defined and the functions aren't
declared.
You're right, I saw it after sending the patch.
I hope I did not break anything here. Otherwise, I'll fix.
Thank you for the comments.
Andreas