--- deploy/src/plugin/share/adapter/common/CNSAdapter_JVMManager.cpp.orig Tue Jun 5 13:03:51 2007 +++ deploy/src/plugin/share/adapter/common/CNSAdapter_JVMManager.cpp Tue Jun 5 15:19:19 2007 @@ -143,7 +143,7 @@ res = m_pThreadManager->GetCurrentThread(&pPluginThread); if (NS_SUCCEEDED(res) && pPluginThread) - *threadID = (JDUint32)pPluginThread; + *threadID = (JDUint32)(uintptr_t)pPluginThread; return res; } --- deploy/src/plugin/solaris/jvm_exec/java_vm.c.orig Wed Jun 6 11:35:32 2007 +++ deploy/src/plugin/solaris/jvm_exec/java_vm.c Wed Jun 6 20:01:16 2007 @@ -64,14 +64,16 @@ FILE* tracefile; void startup_trace(char *format,...) { - va_list arglist; + va_list arglist, arglist2; va_start(arglist, format); if (trace) { if (tracefile != NULL) { + va_copy(arglist2, arglist); vfprintf(tracefile, format, arglist); - fprintf(stderr, "%s After exec, before startup:",PLUGIN_NODOTVERSION); - vfprintf(stderr, format, arglist); fflush(tracefile); + fprintf(stderr, "%s After exec, before startup:",PLUGIN_NODOTVERSION); + vfprintf(stderr, format, arglist2); + va_end(arglist2); } else { fprintf(stderr, "%s After exec, before startup:",PLUGIN_NODOTVERSION); vfprintf(stderr, format, arglist); --- deploy/src/plugin/solaris/nscore/JSObject.cpp.orig Tue Jun 5 13:03:52 2007 +++ deploy/src/plugin/solaris/nscore/JSObject.cpp Tue Jun 5 17:28:26 2007 @@ -89,10 +89,14 @@ free(raw_msg); - trace("UnpackJSMessage: received JS nativeJSObject=%d slot=%d utflen=%d\n\tjchar str=%X len=%d size=%d\n\tjarr=%X\n\tjval=%X ctx=%X raw_msg_len=%d\n",mesg->nativeJSObject,mesg->slotindex, mesg->utfstr_len, - (int) mesg->charstr, mesg->charstr_len, mesg->charstr_sz, - (int) mesg->jarr, - (int) mesg->value, (int) mesg->ctx, raw_msg_len); + trace("UnpackJSMessage: received JS nativeJSObject=%d slot=%d utflen=%d\n" + "\tjchar str=%p len=%d size=%d\n" + "\tjarr=%p\n" + "\tjval=%p ctx=%p raw_msg_len=%d\n", + mesg->nativeJSObject,mesg->slotindex, mesg->utfstr_len, + mesg->charstr, mesg->charstr_len, mesg->charstr_sz, + mesg->jarr, + mesg->value, mesg->ctx, raw_msg_len); } void @@ -285,13 +289,13 @@ ISecurityContext* pContext = NULL; if (JD_SUCCEEDED(jvm_manager->CreateProxyJNI(NULL, &pProxyJNIEnv)) ) { - trace("JSHandler(): JS command: %X %s\n", code, jscode_to_str(code)); + trace("JSHandler(): JS command: %p %s\n", code, jscode_to_str(code)); if (JD_FAILED(inst->GetJSDispatcher(&pLiveConnect))) return; if (msg.utfstr != NULL) - CreateSecurityContext(msg.utfstr, (int) msg.ctx, &pContext); + CreateSecurityContext(msg.utfstr, msg.ctx ? JD_TRUE : JD_FALSE, &pContext); switch(code){ case JAVA_PLUGIN_JNIJS_GET_NATIVE: --- deploy/src/plugin/solaris/nscore/JavaPluginFactory5.cpp.orig Tue Jun 5 13:03:52 2007 +++ deploy/src/plugin/solaris/nscore/JavaPluginFactory5.cpp Tue Jun 5 15:39:07 2007 @@ -471,7 +471,7 @@ "", "(II)V"); *java_obj = env->NewObject(jsobj5_clazz, jsobj_create_method, - (jint)(g_unixService->JD_GetCurrentThread()), (jint) browser_obj); + (jint)(intptr_t)(g_unixService->JD_GetCurrentThread()), (jint) browser_obj); return JD_OK; } @@ -566,7 +566,7 @@ if (current_envs[i] == NULL) { current_envs[i] = env; current_proxy_envs[i] = proxy_env; - trace("JavaPluginFactory5: Register Env [%d] proxyenv=%d\n", i, (int) proxy_env); + trace("JavaPluginFactory5: Register Env [%d] proxyenv=%p\n", i, proxy_env); ExitMonitor("Register Env"); return i; } @@ -628,8 +628,8 @@ EnterMonitor("RegisterInstance"); for (i = 0; i < PLUGIN_INSTANCE_COUNT; i++) { if (plugin_instances[i] == NULL) { - trace("JavaPluginFactory5::RegisterInstance %d at %d\n", - (int) pluginInstance, i); + trace("JavaPluginFactory5::RegisterInstance %p at %d\n", + pluginInstance, i); plugin_instances[i] = pluginInstance; ExitMonitor("RegisterInstance"); return i; --- deploy/src/plugin/solaris/nscore/JavaPluginInstance5.cpp.orig Tue Jun 5 13:03:52 2007 +++ deploy/src/plugin/solaris/nscore/JavaPluginInstance5.cpp Tue Jun 5 15:57:35 2007 @@ -262,7 +262,7 @@ vals[argc - 1] = (char*)docbase; else { // For NS4 char szBuf[16]; - sprintf(szBuf, "%x", m_uniqueId); + sprintf(szBuf, "%lx", m_uniqueId); vals[argc - 1] = szBuf; } @@ -423,7 +423,7 @@ // forward the request to the server wb.putInt(JAVA_PLUGIN_WINDOW); wb.putInt(plugin_number); - wb.putInt((int)win->window); + wb.putInt((int)(intptr_t)win->window); wb.putInt(xembed); wb.putInt(win->width); wb.putInt(win->height); @@ -536,7 +536,7 @@ const char*target, JDPluginReason reason, void* notifyData) { - int key = (int)notifyData; + int key = (int)(intptr_t)notifyData; if (tracing) { char head[31]; int clen = slen(url); --- deploy/src/plugin/solaris/nscore/JavaVM5.cpp.orig Tue Jun 5 13:05:33 2007 +++ deploy/src/plugin/solaris/nscore/JavaVM5.cpp Tue Jun 5 16:10:49 2007 @@ -180,7 +180,7 @@ */ #if !defined(LINUX) void JavaVM5::ConnectPipeEvent(void* pipe) { - int fd = (int)pipe; + int fd = (int)(intptr_t)pipe; Display *display = (Display *) NULL; trace("JavaVM5::ConnectPipeEvent\n"); @@ -541,9 +541,9 @@ } if (tracing) { - execlp(fullprogname, progname, "-t", 0); + execlp(fullprogname, progname, "-t", NULL); } else { - execlp(fullprogname, progname, "", 0); + execlp(fullprogname, progname, "", NULL); } char *tmpbuff = (char *)malloc(40 + slen(fullprogname) + slen(strerror(errno))); @@ -635,14 +635,14 @@ QueueRunnable * wqr = new QueueRunnable(this, worker_queue_processor, g_unixService->JDFileDesc_To_FD(state->work_pipe), - (JDUint32)tid, + (JDUint32)(uintptr_t)tid, workMonitor, &workPipeClean, tm); QueueRunnable * sqr = new QueueRunnable(this, spont_queue_processor, g_unixService->JDFileDesc_To_FD(state->spont_pipe), - (JDUint32)tid, + (JDUint32)(uintptr_t)tid, spontMonitor,&spontPipeClean, tm); --- deploy/src/plugin/solaris/nscore/remotejni.cpp.orig Tue Jun 5 13:03:52 2007 +++ deploy/src/plugin/solaris/nscore/remotejni.cpp Tue Jun 5 16:53:10 2007 @@ -1451,8 +1451,8 @@ char *msg; \ msg = (char *) checked_malloc(16 + len *sizeof(ElementType)); \ memcpy(msg, &code, 4); \ - fprintf(stderr, "rem:Set array arr=%X start=%d len=%d buf[0]=%d\n", \ - (int) array, (int) start, (int) len, (int) buf[0]); \ + fprintf(stderr, "rem:Set array arr=%p start=%d len=%d buf[0]=%d\n", \ + array, (int) start, (int) len, (int) buf[0]); \ memcpy(msg+4, &array, 4); \ memcpy(msg+8, &start, 4); \ memcpy(msg+12, &len, 4); \ @@ -1779,7 +1779,7 @@ jni_GetJavaVM(RemoteJNIEnv *env, void **vm) { *vm = NULL; - trace("remotejni::Calling GetJavaVM for env: %d\n", (int) env); + trace("remotejni::Calling GetJavaVM for env: %p\n", env); return JNI_EVERSION; } @@ -1791,7 +1791,7 @@ pack_value_of_type(RemoteJNIEnv* env, jd_jni_type value_type, jvalue* value, char* msg) { - trace("remotejni::pack_value_of_type env=%X type=%d\n", (int) env, (int) value_type); + trace("remotejni::pack_value_of_type env=%p type=%d\n", env, (int) value_type); switch (value_type) { case jd_jboolean_type: @@ -1852,9 +1852,8 @@ ss = GET_SIGNATURE(methodID); nargs = slen(ss); - trace("jni_SecureNewObject Cls=%X sig=%s meth=%X narg=%d ct=%X\n", - (int) clazz, STR_OR_NULL(ss), - (int) (methodID->java_method), nargs, (int) ctx); + trace("jni_SecureNewObject Cls=%p sig=%s meth=%p narg=%d ct=%p\n", + clazz, STR_OR_NULL(ss), methodID->java_method, nargs, ctx); void * buff = getAndPackSecurityInfo(ctx, &len); @@ -1907,9 +1906,8 @@ return JD_ERROR_NULL_POINTER; } - trace("jni_SecureCallMethod(): env=%X type=%s obj=%X\n\t method=%X args=%X ctx=%X\n", - (int) env, get_jni_name(result_type), (int) obj, - (int) methodID, (int) args, (int) ctx); + trace("jni_SecureCallMethod(): env=%p type=%s obj=%p\n\t method=%p args=%p ctx=%p\n", + env, get_jni_name(result_type), obj, methodID, args, ctx); void * buff = getAndPackSecurityInfo(ctx, &len); @@ -2027,8 +2025,8 @@ int code = JAVA_PLUGIN_SECURE_GET_FIELD; - trace("SECURE_GET_FIELD sending obj=%X fieldID=%X type=%d ctx=%X\n", - (int) obj, (int) fieldID, (int) type, (int) ctx); + trace("SECURE_GET_FIELD sending obj=%p fieldID=%p type=%d ctx=%p\n", + obj, fieldID, (int) type, ctx); void * buff = getAndPackSecurityInfo(ctx, &len); msg_size += len; @@ -2081,8 +2079,8 @@ memcpy(msg + 20, buff, len); int sz = pack_value_of_type(env, type, &val, &(msg[20 + len])); - if (tracing) trace("jni_SecureSetField env=%X type=%d sz=%d\n", - (int) env, (int) type, sz); + if (tracing) trace("jni_SecureSetField env=%p type=%d sz=%d\n", + env, (int) type, sz); free(buff); @@ -2107,7 +2105,8 @@ if (ctx) ctx->AddRef(); - trace("jni_SecureCallStaticMethod env=%X type=%d \nclazz=%X methodID=%X args=%X ctx=%X\n",(int) env, get_jni_name( result_type), (int) clazz, (int) methodID, (int) args, (int) ctx); + trace("jni_SecureCallStaticMethod env=%p type=%d \nclazz=%p methodID=%p args=%p ctx=%p\n", + env, get_jni_name(result_type), clazz, methodID, args, ctx); int msg_size; char* msg; @@ -2162,7 +2161,8 @@ { trace("remotejni:Entering jni_SecureGetStaticField()"); - trace("jni_SecureGetStaticField env=%X type=%s \n\tclazz=%X fieldID=%X ctx=%X\n",(int) env, get_jni_name(type), (int) clazz, (int) fieldID, (int) ctx); + trace("jni_SecureGetStaticField env=%p type=%s \n\tclazz=%p fieldID=%p ctx=%p\n", + env, get_jni_name(type), clazz, fieldID, ctx); if (ctx) ctx->AddRef(); int len; @@ -2217,10 +2217,9 @@ memcpy(msg + 12, &type, 4); memcpy(msg + 16, &ctx, 4); memcpy(msg + 20, buff, len); - if (tracing) trace("jni_SecureSetStaticField env=%X type=%s \n\tclazz=%X " - " fieldID=%X ctx=%X\n", - (int) env, get_jni_name(type), (int) clazz, (int) fieldID, - (int) ctx); + if (tracing) trace("jni_SecureSetStaticField env=%p type=%s \n\tclazz=%p " + " fieldID=%p ctx=%p\n", + env, get_jni_name(type), clazz, fieldID, ctx); int sz = pack_value_of_type(env, type, &val, &(msg[20 + len])); @@ -2560,7 +2559,7 @@ struct RemoteJNINativeInterface_ * functions; env = new RemoteJNIEnv_(); - trace("remotejni::create_RemoteJNIEnv %d\n", (int) env); + trace("remotejni::create_RemoteJNIEnv %p\n", env); functions = (struct RemoteJNINativeInterface_ *) malloc(sizeof(struct RemoteJNINativeInterface_)); memcpy(functions, &remotejni_NativeInterface, @@ -2644,10 +2643,10 @@ } if (tracing) trace("getAndPackSecurityInfo" - "\n\t ctx=%X" + "\n\t ctx=%p" "\n\t origin=%s" "\n\t UniversalBrowserRead=%d UniversalJavaPerm=%d\n", - (int) ctx, STR_OR_NULL(origin),ubr,ujp); + ctx, STR_OR_NULL(origin), ubr, ujp); int ubronpipe = ubr; int ujponpipe = ujp;