Skip site navigation (1)Skip section navigation (2)
Date:      10 Feb 2003 15:54:32 +0100
From:      "Georg-W. Koltermann" <g.w.k@web.de>
To:        freebsd-java@freebsd.org
Subject:   SUCCESS: JDK 1.3.1 + HotSpot on FBSD 5.0-R
Message-ID:  <1044888872.1091.22.camel@hunter.muc.mscsoftware.com>

next in thread | raw e-mail | index | archive | help

--=-mIS96pAPNq6QTFY36zUC
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi,

I have slightly reworked my jdk 1.3.1 hotspot patches for FreeBSD 5.0-R.

I removed the lines that make it compile with GCC 3.2 since that is the
default in 5.0 anyway.  Looking at the patches right now I realize that
I may have left something in which is not needed any more, like the
patch that creates gcc32.make. Anyway, the result works.

I have added a patch (patch-zgwk3) to fix the bug in InetAddressImpl. 
This has been discussed several times on this list, and the patch fixes
the problem both for the classic VM and for HotSpot.  If you don't have
this patch or a similar fix, you won't be able to run Tomcat 4.1.18, for
example, neither in -classic nor in -hotspot.

The build process is still largely manual, you make and install with
WITH_NATIVE_THREADS=1 first, then build and install HotSpot as outlined
in
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=63624+0+archive/2002/freebsd-java/20020728.freebsd-java except that you don't use GCC 3.1 any more, of course.

Also note that the jvm.cfg resulting from these patches still defaults
to -classic, and .java_wrapper has been hacked to avoid -hotspot (look
for the '##' comment lines).  You will need to move the -hotspot line to
the front in jvm.cfg and remove the '##' comment marks in .java_wrapper,
both in $JAVA_HOME/bin and $JAVA_HOME/jre/bin, if you want to run the
hotspot version.

Well, I guess I could just as well remove this safety hack now, it seems
-hotspot runs better than -classic these days.  I'd be interested to
hear other people's experiences w.r.t. the stability of -hotspot vs.
-classic.

-- 
Georg-W. Koltermann <g.w.k@web.de>

--=-mIS96pAPNq6QTFY36zUC
Content-Disposition: inline; filename=patch-zgwk1
Content-Type: text/x-patch; name=patch-zgwk1; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

diff -urN ../src/solaris/bin/java_wrapper_bsd.sh ../src/solaris/bin/java_wrapper_bsd.sh
--- ../src/solaris/bin/java_wrapper_bsd.sh	Thu Nov 21 14:35:46 2002
+++ ../src/solaris/bin/java_wrapper_bsd.sh	Thu Nov 21 16:38:40 2002
@@ -92,10 +92,10 @@
 		ttype=native_threads
 		shift 1
 	    else 
-		if [ -d ${jre}/lib/${proc}/hotspot ]; then
-		    vmtype=hotspot
-		    ttype=native_threads
-		else
+##		if [ -d ${jre}/lib/${proc}/hotspot ]; then
+##		    vmtype=hotspot
+##		    ttype=native_threads
+##		else
 		    vmtype=classic
 		    if [ ${THREADS_FLAG:-${DEFAULT_THREADS_FLAG}} = native ]
 		    then 
@@ -103,7 +103,7 @@
 		    else
 			ttype=green_threads
 		    fi
-		fi
+##		fi
 	    fi
 	fi
     fi
diff -urN ../src/solaris/hpi/native_threads/src/threads_bsd.c ../src/solaris/hpi/native_threads/src/threads_bsd.c
--- ../src/solaris/hpi/native_threads/src/threads_bsd.c	Thu Nov 21 14:35:46 2002
+++ ../src/solaris/hpi/native_threads/src/threads_bsd.c	Wed Nov 20 13:53:54 2002
@@ -284,6 +284,7 @@
 	"susp boundless"
 };
 
+enum pthread_susp { a_one, a_two, a_three }; /* gwk, dummy */
 char *getSuspendStateString(enum pthread_susp suspendState)
 {
 	if (suspendState < ANALRETENTIVE)
@@ -292,7 +293,7 @@
 		return &SuspendList[ANALRETENTIVE-1][0];
 }
 
-#define SATAN (21 + 1) /* for the error string at the end of the list */
+#define SATAN (22 + 1) /* for the error string at the end of the list */
 
 char SignalList [SATAN][16]
 =
@@ -318,7 +319,8 @@
 	"PS_DEAD",
 	"PS_DEADLCK",
 	"PS_STATE_MAX",
-	"PS_REQUEST_WAITING_SUSPENDED",
+/*	"PS_REQUEST_WAITING_SUSPENDED", gwk */
+	"PS_REQUEST_WSUS",
 	"boundless"
 };
 
@@ -527,6 +529,7 @@
 	if (thread->state != PS_SUSPENDED)
 		dumpThreadLogStates(thread);
 
+#if 0 /* gwk */
 	switch ((int)thread->ctxtype)
 	{
 		case CTX_JB_NOSIG:	/* 0) jmp_buf context without signal mask for blocking IO, etc... */
@@ -551,6 +554,7 @@
 #endif
 			break;
 	}
+#endif /* gwk */
 
 #ifdef DEBUG_BSD_NATIVE_THREADS
 TermFailed:
diff -urN ../../hotspot1.3.1/build/linux/makefiles/gcc32.make ../../hotspot1.3.1/build/linux/makefiles/gcc32.make
--- ../../hotspot1.3.1/build/linux/makefiles/gcc32.make	Thu Jan  1 01:00:00 1970
+++ ../../hotspot1.3.1/build/linux/makefiles/gcc32.make	Wed Nov 20 14:22:40 2002
@@ -0,0 +1,131 @@
+
+# put the *.o files in the a.out, not the shared library
+LINK_INTO = $(LINK_INTO/$(VERSION))
+LINK_INTO/debug     = AOUT
+#LINK_INTO/optimized = AOUT
+LINK_INTO/optimized = LIBJVM
+
+# apply this setting to link into the shared library even in the debug version:
+LINK_INTO = LIBJVM
+
+# If MAKE_OPTO is null, then we will compile with the -DOPTO.
+# That switch, despite its name, has the effect of __disabling__ OPTO.
+$(MAKE_OPTO)CFLAGS += -DOPTO
+
+#CFLAGS += -v
+
+# The flags to use for an Optimized g++ build
+#OPT_CFLAGS += -O3
+
+OPT_CFLAGS += -O0
+
+CFLAGS += -fPIC
+CFLAGS += -Winline
+CFLAGS += -fwritable-strings
+CFLAGS += -fno-rtti
+CFLAGS += -fhandle-exceptions
+CFLAGS += -D__STDC__=1 -D_LARGEFILE64_SOURCE -DTEMPLATE_TABLE_BUG
+CFLAGS += -D__GNU__ -D_REENTRANT
+CFLAGS += -fcheck-new
+
+#--billh
+CFLAGS += -D__FreeBSD__
+#-D__GNUC__
+
+# Set GCC_SAVE_TEMPS=-save-temps to keep temporary files (.ii, .s).
+CFLAGS += $(GCC_SAVE_TEMPS)
+
+OPT_CFLAGS += -O0
+# -O1
+#OPT_CFLAGS += -fdefer-pop
+OPT_CFLAGS += -fthread-jumps
+OPT_CFLAGS += -fdelayed-branch
+OPT_CFLAGS += -fomit-frame-pointer
+OPT_CFLAGS += -fguess-branch-probability
+OPT_CFLAGS += -fcprop-registers
+# END
+
+OPT_CFLAGS += -ffloat-store
+OPT_CFLAGS += -fno-default-inline
+OPT_CFLAGS += -fno-defer-pop
+#bad, causes abort()
+#OPT_CFLAGS += -ftrapv
+OPT_CFLAGS += -fno-inline
+OPT_CFLAGS += -fkeep-static-consts
+OPT_CFLAGS += -fmerge-constants
+OPT_CFLAGS += -fmerge-all-constants
+OPT_CFLAGS += -fno-function-cse
+OPT_CFLAGS += -ffast-math
+# END
+
+# -O2
+OPT_CFLAGS += -foptimize-sibling-calls
+OPT_CFLAGS += -fcse-follow-jumps
+OPT_CFLAGS += -fcse-skip-blocks
+OPT_CFLAGS += -fgcse-sm
+OPT_CFLAGS += -fgcse-lm
+OPT_CFLAGS += -fgcse
+
+OPT_CFLAGS += -fexpensive-optimizations
+OPT_CFLAGS += -fstrength-reduce
+OPT_CFLAGS += -frerun-cse-after-loop
+OPT_CFLAGS += -frerun-loop-opt
+OPT_CFLAGS += -fcaller-saves
+OPT_CFLAGS += -fforce-addr
+OPT_CFLAGS += -fforce-mem
+OPT_CFLAGS += -fpeephole2
+##
+OPT_CFLAGS += -fschedule-insns
+OPT_CFLAGS += -fschedule-insns2
+##
+OPT_CFLAGS += -fregmove
+OPT_CFLAGS += -fstrict-aliasing
+OPT_CFLAGS += -fdelete-null-pointer-checks
+OPT_CFLAGS += -freorder-blocks
+# END
+
+OPT_CFLAGS += -fno-gcse
+OPT_CFLAGS += -fdata-sections
+OPT_CFLAGS += -fprefetch-loop-arrays
+OPT_CFLAGS += -fmove-all-movables
+OPT_CFLAGS += -freduce-all-givs
+OPT_CFLAGS += -fno-guess-branch-probability
+
+OPT_CFLAGS += -falign-functions
+OPT_CFLAGS += -falign-labels
+OPT_CFLAGS += -falign-loops
+OPT_CFLAGS += -falign-jumps
+
+OPT_CFLAGS += -fssa
+# END
+
+# -O3
+OPT_CFLAGS += -finline-functions
+OPT_CFLAGS += -frename-registers
+# END
+
+
+
+
+#####
+#harmless
+OPT_CFLAGS += -fmemoize-lookups
+#unneeded
+#OPT_CFLAGS += -fpeephole
+#bad
+# this creates a link error.
+#OPT_CFLAGS += -fkeep-inline-functions
+#
+OPT_CFLAGS += -funroll-loops
+OPT_CFLAGS += -funroll-all-loops
+#####
+
+# Set the environment variable HOTSPARC_HOTSPARC_GENERIC to "true"
+# to inhibit the effect of the previous line on CFLAGS.
+
+CPP = g++
+CC  = gcc
+
+AOUT_FLAGS += -export-dynamic 
+DEBUG_CFLAGS += -g
+
diff -urN ../../hotspot1.3.1/build/linux/platform_i486 ../../hotspot1.3.1/build/linux/platform_i486
--- ../../hotspot1.3.1/build/linux/platform_i486	Thu Nov 21 17:35:21 2002
+++ ../../hotspot1.3.1/build/linux/platform_i486	Wed Nov 20 14:20:54 2002
@@ -6,7 +6,7 @@
 
 lib_arch = i386
 
-compiler = gcc31
+compiler = gcc32
 
 gnu_dis_arch = i386
 
diff -urN ../../hotspot1.3.1/src/share/vm/utilities/globalDefinitions_gcc32.hpp ../../hotspot1.3.1/src/share/vm/utilities/globalDefinitions_gcc32.hpp
--- ../../hotspot1.3.1/src/share/vm/utilities/globalDefinitions_gcc32.hpp	Thu Jan  1 01:00:00 1970
+++ ../../hotspot1.3.1/src/share/vm/utilities/globalDefinitions_gcc32.hpp	Wed Nov 20 14:25:03 2002
@@ -0,0 +1,139 @@
+/*
+ * @(#)globalDefinitions_gcc.hpp	1.18 01/02/09 14:48:11
+ *
+ * Copyright 1993-2001 by Sun Microsystems, Inc.,
+ * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
+ * All rights reserved.
+ * 
+ * This software is the confidential and proprietary information
+ * of Sun Microsystems, Inc. ("Confidential Information").  You
+ * shall not disclose such Confidential Information and shall use
+ * it only in accordance with the terms of the license agreement
+ * you entered into with Sun.
+ */
+
+// CopyrightVersion 1.2
+
+// This file holds compiler-dependent includes,
+// globally used constants & types, class (forward)
+// declarations and a few frequently used utility functions.
+
+# include <ctype.h>
+# include <string.h>
+# include <stdarg.h>
+# include <stddef.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <wchar.h>
+
+#ifdef SOLARIS
+# include <ieeefp.h>
+#endif
+
+# include <math.h>
+# include <time.h>
+# include <fcntl.h>
+# include <pthread.h>
+
+# include <limits.h>
+# include <errno.h>
+
+
+#ifdef LINUX
+# include <inttypes.h>
+# include <signal.h>
+# include <ucontext.h>
+# include <sys/time.h>
+
+#else
+
+// Compiler-specific primitive types
+typedef unsigned char      uint8_t;
+typedef unsigned short     uint16_t;
+typedef unsigned int       uint32_t;
+typedef unsigned long long uint64_t;
+
+typedef signed char        int8_t;
+typedef signed short       int16_t;
+typedef signed int         int32_t;
+typedef signed long long   int64_t;
+
+#endif /*LINUX*/
+
+// <sys/trap.h> promises that the system will not use traps 16-31
+#define ST_RESERVED_FOR_USER_0 0x10
+
+// Additional Java basic types
+
+typedef unsigned char      jubyte;
+typedef unsigned short     jushort;
+typedef unsigned int       juint;
+typedef unsigned long long julong;
+
+//----------------------------------------------------------------------------------------------------
+// Special (possibly not-portable) casts
+// Cast floats into same-size integers and vice-versa w/o changing bit-pattern
+// %%%%%% These seem like standard C++ to me--how about factoring them out? - Ungar
+
+inline jint    jint_cast   (jfloat  x)           { return *(jint*   )&x; }
+inline jlong   jlong_cast  (jdouble x)           { return *(jlong*  )&x; }
+
+inline jfloat  jfloat_cast (jint    x)           { return *(jfloat* )&x; }
+inline jdouble jdouble_cast(jlong   x)           { return *(jdouble*)&x; }
+
+//----------------------------------------------------------------------------------------------------
+// Constant for jlong (specifying an long long canstant is C++ compiler specific)
+
+#ifdef LINUX //-billh
+const int64_t min_jlong = 0x8000000000000000LL;
+const int64_t max_jlong = 0x7fffffffffffffffLL;
+#else
+const jlong min_jlong = 0x8000000000000000L;
+const jlong max_jlong = 0x7fffffffffffffffL;
+#endif
+
+//----------------------------------------------------------------------------------------------------
+// Debugging
+
+#define DEBUG_EXCEPTION ::abort();
+
+extern "C" void breakpoint();
+#define BREAKPOINT ::breakpoint()
+
+// checking for nanness
+
+inline int g_isnan(float  f) { return isnanf(f); }
+#if defined(SOLARIS) || defined(BSD4_4) 
+inline int g_isnan(double f) { return isnand(f); }
+#elif LINUX
+inline int g_isnan(double f) { return isnan(f); }
+#else
+#error "missing platform-speicfic definition here"
+#endif
+
+
+// Checking for finiteness
+
+inline int g_isfinite(jfloat  f)                 { return finite(f); }
+inline int g_isfinite(jdouble f)                 { return finite(f); }
+
+
+// Wide characters
+
+inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
+
+
+#ifdef PRODUCT
+const int Interpreter_Code_Size = 55 * 1024;
+#else
+const int Interpreter_Code_Size = 75 * 1024;
+#endif
+
+// Portability macros
+#define PRAGMA_INTERFACE             #pragma interface
+#define PRAGMA_IMPLEMENTATION        #pragma implementation
+#if !defined(LINUX) && !defined(BSD4_4)
+#define PRAGMA_IMPLEMENTATION_(arg)  #pragma implementation(arg)
+#endif /*LINUX*/
+#define VALUE_OBJ_CLASS_SPEC
+
diff -urN ../src/solaris/bin/jvm.cfg ../src/solaris/bin/jvm.cfg
--- ../src/solaris/bin/jvm.cfg	Sun May  6 14:26:52 2001
+++ ../src/solaris/bin/jvm.cfg	Thu Nov 21 18:43:54 2002
@@ -8,7 +8,7 @@
 # List of JVMs that can be used as the first option to java, javac, etc.
 # Order is important -- first in this list is the default JVM.
 #
+-classic
 -client
 -hotspot
 -server
--classic

--=-mIS96pAPNq6QTFY36zUC
Content-Disposition: inline; filename=patch-zgwk2
Content-Type: text/x-patch; name=patch-zgwk2; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

diff -ur ../../hotspot1.3.1/src/os/linux/vm/os_linux.cpp ../../../work.gwk/hotspot1.3.1/src/os/linux/vm/os_linux.cpp
--- ../../hotspot1.3.1/src/os/linux/vm/os_linux.cpp	Tue Dec 10 23:30:59 2002
+++ ../../../work.gwk/hotspot1.3.1/src/os/linux/vm/os_linux.cpp	Thu Dec  5 10:10:11 2002
@@ -195,7 +195,9 @@
 #else
     if (self > 0) {
 	sizep = (uintptr_t) self->attr.stacksize_attr;
+#if 0 // gwk
 	fprintf(stderr, "sizep == 0x%08x\n", sizep);
+#endif // gwk
     }
     else {
 	fprintf(stderr, "pthread_self failed == 0x%08x\n", self);
@@ -944,7 +946,9 @@
     fatal1("os::allocate_thread_local_storage: thr_keycreate failed (%s) -- EAGAIN max keys reached", strerror(errno));
   }
 
+#if 0 // gwk
   warning("os::allocate_thread_local_storage: pthread_key = 0x%08x", tk);
+#endif
 
   return uintptr_t(tk);
 }
@@ -968,7 +972,9 @@
     fatal1("os::thread_local_storage_at_put: thr_setspecific failed (%s) -- EINVAL invalid key", strerror(errno));
   }
 
+#if 0 // gwk
   warning("os::thread_local_storage_at_put: index = 0x%08x, value = 0x%08x", index, (uintptr_t)value);
+#endif // gwk
 }
 
 void gnuppyBreakPoint() {}
@@ -983,7 +989,9 @@
 //    warning("os::thread_local_storage_at: can't find the key");
   if ( (r = pthread_getspecific((pthread_key_t)index)) == NULL)
   {
+#if 0 // gwk
     warning("os::thread_local_storage_at: can't find the key for \"index = 0x%08x\"", index);
+#endif // gwk
     gnuppyBreakPoint();
   }
 
@@ -1580,7 +1588,8 @@
 
   assert(thread->is_Java_thread(), "must be java thread");
 //  INTERRUPTIBLE_RETURN_INT(os_sleep(millis), os::Solaris::clear_interrupted);
-  os_sleep(millis);
+  INTERRUPTIBLE_RETURN_INT(os_sleep(millis), os::Solaris::clear_interrupted);//gwk
+  //gwk  os_sleep(millis);
   return 0;
 }
 
diff -ur ../../hotspot1.3.1/src/share/vm/runtime/thread.cpp ../../../work.gwk/hotspot1.3.1/src/share/vm/runtime/thread.cpp
--- ../../hotspot1.3.1/src/share/vm/runtime/thread.cpp	Tue Dec 10 23:31:00 2002
+++ ../../../work.gwk/hotspot1.3.1/src/share/vm/runtime/thread.cpp	Thu Dec  5 09:57:23 2002
@@ -1584,7 +1584,9 @@
   guarantee(base < (unsigned int)os::current_stack_pointer(),"Error calculating stack yellow zone");
 
   if(!os::guard_memory((char *)base,stack_yellow_zone_size())) {
+#if 0 // gwk
     warning("Attempt to guard stack yellow zone failed.");
+#endif // gwk
   }
 }
 
@@ -1611,7 +1613,9 @@
   guarantee(base < (unsigned int)os::current_stack_pointer(),"Error calculating stack red zone");
 
   if(!os::guard_memory((char *)base,stack_red_zone_size())) {
+#if 0 // gwk
     warning("Attempt to guard stack red zone failed.");
+#endif // gwk
   }
 }
 
diff -ur ../../hotspot1.3.1/src/share/vm/runtime/threadLocalStorage.cpp ../../../work.gwk/hotspot1.3.1/src/share/vm/runtime/threadLocalStorage.cpp
--- ../../hotspot1.3.1/src/share/vm/runtime/threadLocalStorage.cpp	Tue Dec 10 23:31:00 2002
+++ ../../../work.gwk/hotspot1.3.1/src/share/vm/runtime/threadLocalStorage.cpp	Thu Dec  5 09:58:44 2002
@@ -63,7 +63,9 @@
   os::thread_local_storage_at_put(ThreadLocalStorage::thread_index(), thread);
   // The following ensure that any optimization tricks we have tried
   // did not backfire on us:
+#if 0 // gwk
   warning("must be the same thread, slowly 0x%08x, 0x%08x", get_thread(), thread);
+#endif // gwk
 //  guarantee(get_thread()      == thread, "must be the same thread, slowly");
   guarantee(get_thread()      == thread, "must be the same thread, slowly");
   guarantee(get_thread_slow() == thread, "must be the same thread, quickly");

--=-mIS96pAPNq6QTFY36zUC
Content-Disposition: inline; filename=patch-zgwk3
Content-Type: text/plain; name=patch-zgwk3; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

--- ../src/solaris/hpi/native_threads/src/threads_md.c.gwk	Fri Feb  7 00:04:34 2003
+++ ../src/solaris/hpi/native_threads/src/threads_md.c	Fri Feb  7 09:20:22 2003
@@ -24,6 +24,9 @@
 #include <signal.h>
 #include <sys/types.h>
 #include <sys/signal.h>
+#ifdef __FreeBSD__
+#include <sys/time.h>
+#endif
 #include <sys/resource.h>
 #ifdef __FreeBSD__
 #include <sys/sysctl.h>
--- ../src/solaris/native/java/net/InetAddressImpl.c.gwk	Fri Feb  7 00:04:34 2003
+++ ../src/solaris/native/java/net/InetAddressImpl.c	Fri Feb  7 11:48:58 2003
@@ -34,11 +34,11 @@
 /* forward declarations --billh */
 
 HOST_R_RETURN
-gethostbyname_r(const char *name,  struct hostent *hptr,
+JDKgethostbyname_r(const char *name,  struct hostent *hptr,
 		HOST_R_ARGS);
 
 HOST_R_RETURN
-gethostbyaddr_r(const char *addr, int len, int type,
+JDKgethostbyaddr_r(const char *addr, int len, int type,
 		struct hostent *hptr,
 		HOST_R_ARGS);
 
@@ -98,16 +98,16 @@
 	int h_error=0;
 
 #ifdef __GLIBC__
-	gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error);
+	UNDEFgethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error);
 #else
-	hp = gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error);
+	hp = JDKgethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error);
 #endif
 	if (hp) {
 #ifdef __GLIBC__
-	    gethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET,
+	    UNDEFgethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET,
 			    &res2, buf2, sizeof(buf2), &hp, &h_error);
 #else
-	    hp = gethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET,
+	    hp = JDKgethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET,
 				 &res2, buf2, sizeof(buf2), &h_error);
 #endif
 	    if (hp) {
@@ -188,9 +188,9 @@
 
     /* Try once, with our static buffer. */
 #ifdef __GLIBC__
-    gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error);
+    UNDEFgethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error);
 #else    
-    hp = gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error);
+    hp = JDKgethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error);
 #endif
 
     /* With the re-entrant system calls, it's possible that the buffer
@@ -201,10 +201,10 @@
     if (hp == NULL && errno == ERANGE) {
 	if ((tmp = (char*)malloc(BIG_HENT_BUF_SIZE))) {
 #ifdef __GLIBC__
-	    gethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE,
+	    UNDEFgethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE,
 			    &hp, &h_error);
 #else
-	    hp = gethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE,
+	    hp = JDKgethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE,
 				 &h_error);
 #endif
 	}
@@ -281,10 +281,10 @@
      */
     addr = htonl(addr);
 #ifdef __GLIBC__
-    gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent,
+    UNDEFgethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent,
 		    buf, sizeof(buf), &hp, &h_error);
 #else
-    hp = gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent,
+    hp = JDKgethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent,
 			 buf, sizeof(buf), &h_error);
 #endif
     /* With the re-entrant system calls, it's possible that the buffer
@@ -295,10 +295,10 @@
     if (hp == NULL && errno == ERANGE) {
 	if ((tmp = (char*)malloc(BIG_HENT_BUF_SIZE))) {
 #ifdef __GLIBC__
-	    gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET,
+	    UNDEFgethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET,
 			    &hent, tmp, BIG_HENT_BUF_SIZE, &hp, &h_error);
 #else
-	    hp = gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET,
+	    hp = JDKgethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET,
 				 &hent, tmp, BIG_HENT_BUF_SIZE, &h_error);
 #endif
 	} else {
@@ -336,7 +336,7 @@
 copy_hostent(struct hostent *, struct hostent *, HOST_R_COPY_ARGS);
 
 HOST_R_RETURN
-gethostbyname_r(const char *name,  struct hostent *hptr, HOST_R_ARGS) {
+JDKgethostbyname_r(const char *name,  struct hostent *hptr, HOST_R_ARGS) {
 	struct hostent *he = gethostbyname(name);
 
 	HOST_R_ERRNO;
@@ -348,7 +348,7 @@
 }
 
 HOST_R_RETURN
-gethostbyaddr_r(const char *addr, int len, int type,
+JDKgethostbyaddr_r(const char *addr, int len, int type,
 		struct hostent *hptr, HOST_R_ARGS) {
 	struct hostent *he = gethostbyaddr(addr, len, type);
 
--- ../../hotspot1.3.1/src/os/linux/vm/os_linux.cpp.gwk	Fri Feb  7 00:04:35 2003
+++ ../../hotspot1.3.1/src/os/linux/vm/os_linux.cpp	Fri Feb  7 12:31:00 2003
@@ -46,7 +46,7 @@
 
 #include <uthread/pthread_private.h>
 
-#include <machine/ansi.h>
+// #include <machine/ansi.h>
 
 #include <vm/vm.h>
 #include <vm/pmap.h>

--=-mIS96pAPNq6QTFY36zUC--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1044888872.1091.22.camel>