This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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: fix for single threaded configurations


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


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