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


> 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.

> 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.

> 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.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


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