This is the mail archive of the mailing list for the GCC 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: [patch] enable libjava on HP-UX PA

> It does not work on HP-UX 10.20/11.00 and it also doesn't work yet on 
> hppa64-hp-hpux*. This is future work.

What's the problem with HP-UX 11.00?  I'm fairly certain that 11.00
should work similarly to 11.11 when configured with --enabled-threads=posix
although I haven't attempted such a build yet.  Test results for a build
without --enabled-threads=posix are here:

I had to make a few changes to avoid using reentrant functions as the
prototypes are only available when _REENTRANT is defined.

I don't think we want to use the reentrant versions when threads aren't
used as there are differences between the POSIX and DCE implementations.
So, using the reentrant versions wouldn't work under HP-UX 10.X without
additional configure checks and coding changes.

The change that I used is shown below.

It may be possible to build on HP-UX 10.X without thread support.

J. David Anglin                        
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

Index: gnu/classpath/
--- gnu/classpath/	(revision 113941)
+++ gnu/classpath/	(working copy)
@@ -203,7 +203,7 @@
   uid_t user_id = getuid ();
   struct passwd *pwd_entry;
+#if defined(HAVE_GETPWUID_R) && defined(_REENTRANT)
   struct passwd pwd_r;
   size_t len_r = 200;
   char *buf_r = (char *) _Jv_AllocBytes (len_r);
Index: java/io/
--- java/io/	(revision 113941)
+++ java/io/	(working copy)
@@ -215,7 +215,7 @@
   java::util::ArrayList *list = new java::util::ArrayList ();
   struct dirent *d;
+#if defined(HAVE_READDIR_R) && defined(_REENTRANT)
   int name_max = pathconf (buf, _PC_NAME_MAX);
   char dbuf[sizeof (struct dirent) + name_max + 1];
   while (readdir_r (dir, (struct dirent *) dbuf, &d) == 0 && d != NULL)
Index: java/util/
--- java/util/	(revision 113941)
+++ java/util/	(working copy)
@@ -54,7 +54,7 @@
   struct tm tim;
+#if !defined(HAVE_LOCALTIME_R) || !defined(_REENTRANT)
   struct tm *lt_tim;
 #ifdef HAVE_TM_ZONE
@@ -66,7 +66,7 @@
   char *tzid;
+#if defined(HAVE_LOCALTIME_R) && defined(_REENTRANT)
   localtime_r(&current_time, &tim);
   /* Fall back on non-thread safe localtime. */

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