Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Dec 2005 01:20:01 +0100
From:      Melvyn Sopacua <freebsd.java@melvyn.homeunix.org>
To:        freebsd-java@freebsd.org
Subject:   Re: [fixed] jdk-1.5 update to _3 does not work under freebsd 6 stable
Message-ID:  <200512150120.01650.freebsd.java@melvyn.homeunix.org>
In-Reply-To: <200512142233.46686.melvyn@melvyn.homeunix.org>
References:  <200512142200.22535.freebsd.java@melvyn.homeunix.org> <200512142233.46686.melvyn@melvyn.homeunix.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Boundary-00=_xaLoDg2X2ldesxp
Content-Type: text/plain;
  charset="iso-8859-6"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

attached are all patches that resulted in a succesful build for me and firefox 
showing in about:plugins:
Java(TM) Plug-in 1.5.0-p2-root_14_dec_2005_21_49

    File name: libjavaplugin_oji.so
    Java(TM) Plug-in 1.5.0


They might include bits of patches already in the port as some files already 
had a .orig.

In short - I took the shortest route to getting the plugin implementation to 
accept PRThread * in place of JDUint32/nsPluginThread, fixed an include patch 
for moved headers and disabled the obsoleted NS_COMPONENT_MANAGER_CID with an 
#ifdef.
-- 
Melvyn Sopacua
freebsd.java@melvyn.homeunix.org

FreeBSD 6.0-STABLE
Qt: 3.3.5
KDE: 3.4.3

--Boundary-00=_xaLoDg2X2ldesxp
Content-Type: text/plain; charset="iso-8859-6";
	name="patch-deploy::make::plugin::nscore::unix::Makefile.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="patch-deploy::make::plugin::nscore::unix::Makefile.txt"

--- ../../deploy/make/plugin/nscore/unix/Makefile.orig	Tue Oct 19 21:03:59 2004
+++ ../../deploy/make/plugin/nscore/unix/Makefile	Wed Dec 14 22:23:32 2005
@@ -16,18 +16,37 @@
 
 include $(PLUGIN_TOP)/make/plugin/common/config.gmk
 
+ifeq ($(PLATFORM), bsd)
+LDLIBS = -lX11
+X11HDRDIR = /usr/X11R6/include
+ICONVHDRDIR = /usr/local/include
+else
+X11HDRDIR =
+ICONVHDRDIR =
 ifeq ($(PLATFORM), linux)
 LDLIBS = -lX11 -ldl -lc
 else
 LDLIBS = -lXt -lX11 -ldl -lCrun -lc
 endif
+endif
+
+ifeq ($(PLATFORM), bsd)
+TRUE_PLATFORM_INCLUDE := $(shell $(ECHO) $(TRUE_PLATFORM) | $(TR) "[:upper:]" "[:lower:]")
+JNIDIR = $(OUTPUTDIR)/include/$(TRUE_PLATFORM_INCLUDE)
+else
+JNIDIR = $(OUTPUTDIR)/include/$(PLATFORM)
+endif
 
-CPPINCPATH = $(SRCDIR) $(SRCDIR)/../common \
+CPPINCPATH = $(OUTPUTDIR)/include $(JNIDIR) \
+             $(SRCDIR) $(SRCDIR)/../common \
              $(subst $(LIBRARY),,$(TMPDIR)) \
              $(subst $(LIBRARY)/,,$(CLASSHDRDIR)) \
              $(COMMONDIR) \
              $(PLUGIN_TOP)/src/plugin/share/jpiapi \
-             $(SRCDIR)/../nsstub
+             $(SRCDIR)/../nsstub \
+	     $(X11HDRDIR) \
+	     $(NSPR_HEADERS_PATH) \
+	     $(ICONVHDRDIR)
 
 ifeq ($(PLATFORM), linux)
 EXTRA_CPPFLAGS	= -DLINUX -DRAPTOR_API -DNEW_STREAMING_API -DXP_UNIX

--Boundary-00=_xaLoDg2X2ldesxp
Content-Type: text/plain; charset="iso-8859-6";
	name="patch-deploy::src::plugin::share::adapter::ns7::CNS7Adapter_PluginServiceProvider.cpp.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="patch-deploy::src::plugin::share::adapter::ns7::CNS7Adapter_PluginServiceProvider.cpp.txt"

--- ../../deploy/src/plugin/share/adapter/ns7/CNS7Adapter_PluginServiceProvider.cpp.orig	Tue Oct 19 21:04:28 2004
+++ ../../deploy/src/plugin/share/adapter/ns7/CNS7Adapter_PluginServiceProvider.cpp	Wed Dec 14 20:38:12 2005
@@ -28,6 +28,7 @@
 #include "nsILiveconnect.h"
 #include "nsIObserverService.h"
 #include "nsIJVMAuthTools.h"
+#include "nsIComponentManager.h"
 #include "CNSAdapter_JVMManager.h"
 #include "CNSAdapter_PluginManager.h"
 #include "CNSAdapter_Liveconnect.h"
@@ -67,7 +68,9 @@
 static NS_DEFINE_CID(kCPluginManagerCID, NS_PLUGINMANAGER_CID);
 static NS_DEFINE_CID(kCJVMManagerCID, NS_JVMMANAGER_CID);
 static NS_DEFINE_CID(kCLiveConnectCID, NS_CLIVECONNECT_CID);
+#ifdef NS_COMPONENTMANAGER_CID
 static NS_DEFINE_IID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
+#endif
 static NS_DEFINE_IID(kIObserverServiceIID, NS_IOBSERVERSERVICE_IID);
 static NS_DEFINE_CID(kCObserverServiceCID, NS_OBSERVERSERVICE_CID);
 static NS_DEFINE_CID(kIJVMAuthToolsCID, NS_JVMAUTHTOOLS_CID);
@@ -228,8 +231,10 @@
 	requestCID = kCPluginManagerCID;
     else if (clsid.Equals(jCJVMManagerCID))
 	requestCID = kCJVMManagerCID;
+#ifdef NS_COMPONENT_MANAGER_CID
     else if (clsid.Equals(jCLiveconnectCID))
 	requestCID = kComponentManagerCID;
+#endif
     else
 	return JD_ERROR_FAILURE;
 

--Boundary-00=_xaLoDg2X2ldesxp
Content-Type: text/plain; charset="iso-8859-6";
	name="patch-deploy::src::plugin::share::adapter::common::CNSAdapter_JVMManager.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="patch-deploy::src::plugin::share::adapter::common::CNSAdapter_JVMManager.txt"

--- ../../deploy/src/plugin/share/adapter/common/CNSAdapter_JVMManager.cpp.orig	Tue Oct 19 21:04:26 2004
+++ ../../deploy/src/plugin/share/adapter/common/CNSAdapter_JVMManager.cpp	Wed Dec 14 16:38:54 2005
@@ -130,7 +130,7 @@
 // notes :
 //
 JD_METHOD
-CNSAdapter_JVMManager::GetCurrentThread(JDUint32 *threadID)
+CNSAdapter_JVMManager::GetCurrentThread(PRThread* *threadID)
 {
     TRACE("CNSAdapter_JVMManager::GetCurrentThread\n");
     
@@ -139,11 +139,11 @@
 
     nsresult res = JD_OK;
     
-    nsPluginThread* pPluginThread = NULL;
+    PRThread* pPluginThread = NULL;
     res = m_pThreadManager->GetCurrentThread(&pPluginThread);
 
     if (NS_SUCCEEDED(res) && pPluginThread)
-	*threadID = (JDUint32)pPluginThread;
+	threadID = &pPluginThread;
 
     return res;
 }
@@ -158,7 +158,7 @@
 // notes :
 //	
 JD_METHOD
-CNSAdapter_JVMManager::PostEvent(JDUint32 threadID, IRunnable* runnable, JDBool async)
+CNSAdapter_JVMManager::PostEvent(PRThread *threadID, IRunnable* runnable, JDBool async)
 {
     TRACE("CNSAdapter_JVMManager::PostEvent\n");
     if (m_pThreadManager == NULL)
--- ../../deploy/src/plugin/share/adapter/common/CNSAdapter_JVMManager.h.orig	Wed Dec 14 16:46:00 2005
+++ ../../deploy/src/plugin/share/adapter/common/CNSAdapter_JVMManager.h	Wed Dec 14 16:38:18 2005
@@ -56,10 +56,10 @@
 
     //IThreadManager
     JD_IMETHOD
-    GetCurrentThread(JDUint32 *threadID);
+    GetCurrentThread(PRThread* *threadID);
     
     JD_IMETHOD
-    PostEvent(JDUint32 threadID, IRunnable* runnable, JDBool async);
+    PostEvent(PRThread *threadID, IRunnable* runnable, JDBool async);
 
 private:
     nsIJVMManager*	m_pJVMManager;

--Boundary-00=_xaLoDg2X2ldesxp
Content-Type: text/plain; charset="iso-8859-6";
	name="patch-deploy::make::plugin::adapter::ns7-adapter::Makefile.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="patch-deploy::make::plugin::adapter::ns7-adapter::Makefile.txt"

--- Makefile.orig	Tue Dec 13 19:49:17 2005
+++ Makefile	Wed Dec 14 17:27:22 2005
@@ -82,10 +82,12 @@
 		$(subst \,/, $(MOZILLA_HEADERS_PATH)/$(BROWSER)/nspr) \
 		$(subst \,/, $(MOZILLA_HEADERS_PATH)/$(BROWSER)/oji) \
 		$(subst \,/, $(MOZILLA_HEADERS_PATH)/$(BROWSER)/plugin) \
-		$(subst \,/, $(MOZILLA_HEADERS_PATH)/$(BROWSER)/xpcom)
+		$(subst \,/, $(MOZILLA_HEADERS_PATH)/$(BROWSER)/xpcom) \
+		$(subst \,/, $(MOZILLA_HEADERS_PATH)/$(BROWSER)/js)
   endif
 X11HDRDIR = /usr/X11R6/include
 ICONVHDRDIR = /usr/local/include
+NSPRHDRDIR = $(NSPR_HEADERS_PATH)
 else
 MOZHDRDIR = $(subst \,/,$(MOZILLA_HEADERS_PATH)/mozilla_headers_ns7) \
 		$(subst \,/, $(MOZILLA_HEADERS_PATH)/mozilla_headers_ns7/nspr)
@@ -110,6 +112,7 @@
 	     $(COREDIR) \
 	     $(INTERFACESDIR) \
 	     $(MOZHDRDIR) \
+	     $(NSPRHDRDIR) \
 	     $(X11HDRDIR) \
 	     $(ICONVHDRDIR)
 

--Boundary-00=_xaLoDg2X2ldesxp
Content-Type: text/plain; charset="iso-8859-6";
	name="patch-deploy::src::plugin::share::jpiapi::IThreadManager.h.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="patch-deploy::src::plugin::share::jpiapi::IThreadManager.h.txt"

--- ../../deploy/src/plugin/share/jpiapi/IThreadManager.h.orig	Tue Oct 19 21:04:44 2004
+++ ../../deploy/src/plugin/share/jpiapi/IThreadManager.h	Wed Dec 14 21:45:30 2005
@@ -15,6 +15,7 @@
 #define _ITHREADMANAGER_H_
 
 #include "ISupports.h"
+#include "prthread.h"
 class IRunnable;
 //{EFD74BDF-99B7-11d6-9A76-00B0D0A18D51}
 #define ITHREADMANAGER_IID \
@@ -26,10 +27,10 @@
     JD_DEFINE_STATIC_IID_ACCESSOR(ITHREADMANAGER_IID);
 
     JD_IMETHOD
-    GetCurrentThread(JDUint32 *threadID) = 0;
+    GetCurrentThread(PRThread* *threadID) = 0;
 
     JD_IMETHOD
-    PostEvent(JDUint32 threadID, IRunnable* runnable, JDBool async) = 0;
+    PostEvent(PRThread *threadID, IRunnable* runnable, JDBool async) = 0;
 };
 
 ////////////////////////////////////////////////////////////////////////////////

--Boundary-00=_xaLoDg2X2ldesxp
Content-Type: text/plain; charset="iso-8859-6";
	name="patch-deploy::src::plugin::solaris::nscore::QueueRunnable.cpp.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="patch-deploy::src::plugin::solaris::nscore::QueueRunnable.cpp.txt"

--- ../../deploy/src/plugin/solaris/nscoreQueueRunnable.cpp.orig	Tue Oct 19 21:04:53 2004
+++ ../../deploy/src/plugin/solaris/nscoreQueueRunnable.cpp	Wed Dec 14 23:04:14 2005
@@ -21,7 +21,7 @@
 
 JD_IMPL_ISUPPORTS1(QueueRunnable, IRunnable)
 
-QueueRunnable::QueueRunnable(void * vm, pfnQueueProcessor f, int fd, JDUint32 tid, void * m, bool * pc, IThreadManager * tm )
+QueueRunnable::QueueRunnable(void * vm, pfnQueueProcessor f, int fd, PRThread* tid, void * m, bool * pc, IThreadManager * tm )
 {
     JD_INIT_ISUPPORTS();
 

--Boundary-00=_xaLoDg2X2ldesxp
Content-Type: text/plain; charset="iso-8859-6";
	name="patch-deploy::src::plugin::solaris::nscore::JavaVM5.cpp.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="patch-deploy::src::plugin::solaris::nscore::JavaVM5.cpp.txt"

--- ../../deploy/src/plugin/solaris/nscoreJavaVM5.cpp.orig	Tue Oct 19 21:04:53 2004
+++ ../../deploy/src/plugin/solaris/nscoreJavaVM5.cpp	Wed Dec 14 23:45:58 2005
@@ -24,13 +24,14 @@
 #include <sys/wait.h>
 #include <fcntl.h>
 #include <unistd.h>
+#ifndef _ALLBSD_SOURCE
 #include <stropts.h>
+#endif
 #include <string.h>
 #include <strings.h>
 #include <stdarg.h>
 #include <sys/time.h>
 #include <sys/socket.h>
-#include <stropts.h>
 #include <dlfcn.h>
 #include <limits.h>
 #include <errno.h>
@@ -48,6 +49,8 @@
 #include <linux/types.h>
 #include <linux/dirent.h>
 #define _DIRENTRY_H
+#elif _ALLBSD_SOURCE
+#include <dirent.h>
 #else
 #include <ulimit.h>
 #include <dirent.h>
@@ -476,7 +479,7 @@
     trace("JavaVM5:Ready to fork");
   
     /* Create our child java process */
-#if defined(__linux__) 
+#if defined(__linux__)  || defined(_ALLBSD_SOURCE)
     rc = fork();
 #else
     rc = fork1();
@@ -531,7 +534,7 @@
         
 
         /* Close all other file descriptors. */
-#ifndef __linux__
+#ifdef UL_GDESLIM
         max = ulimit(UL_GDESLIM);
 #else
         max = sysconf(_SC_OPEN_MAX);
@@ -627,14 +630,14 @@
     QueueRunnable * wqr = new QueueRunnable(this,
                                            worker_queue_processor,
                                            g_unixService->JDFileDesc_To_FD(state->work_pipe),
-                                           (JDUint32)tid, 
+                                           (PRThread *)tid, 
                                            workMonitor, &workPipeClean,
                                            tm);
 
     QueueRunnable * sqr = new QueueRunnable(this,
                                            spont_queue_processor,
                                            g_unixService->JDFileDesc_To_FD(state->spont_pipe),
-                                           (JDUint32)tid,
+                                           (PRThread *)tid,
                                            spontMonitor,&spontPipeClean,
                                            tm);
 
@@ -1326,6 +1329,14 @@
 
 #ifdef LINUX
   return "i386";
+#elif _ALLBSD_SOURCE
+#ifdef __amd64__
+  return "amd64";
+#elif __i386__
+  return "i386";
+#else
+#error "Unsupported architecture"
+#endif
 #else
   sysinfo(SI_ARCHITECTURE, arch, sizeof(arch));
   if (strcmp(arch,"sparc") == 0 ) {

--Boundary-00=_xaLoDg2X2ldesxp
Content-Type: text/plain; charset="iso-8859-6";
	name="patch-deploy::src::plugin::solaris::nscore::QueueRunnable.h.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="patch-deploy::src::plugin::solaris::nscore::QueueRunnable.h.txt"

--- ../../deploy/src/plugin/solaris/nscoreQueueRunnable.h.orig	Tue Oct 19 21:04:53 2004
+++ ../../deploy/src/plugin/solaris/nscoreQueueRunnable.h	Wed Dec 14 23:03:24 2005
@@ -26,7 +26,7 @@
 
     JD_IMETHOD Run();
 	
-    QueueRunnable(void * vm, pfnQueueProcessor f, int fd, JDUint32 tid, void * m, bool * pc, IThreadManager * tm);
+    QueueRunnable(void * vm, pfnQueueProcessor f, int fd, PRThread* tid, void * m, bool * pc, IThreadManager * tm);
     virtual	~QueueRunnable(void);
 
     void waitOnPipe(void);
@@ -38,7 +38,7 @@
     void * mJVM;
     pfnQueueProcessor mFunction;
     int mFD;
-    JDUint32 mThreadID;
+    PRThread* mThreadID;
     IThreadManager* mThreadManager;
 };
 

--Boundary-00=_xaLoDg2X2ldesxp--



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