commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject svn commit: r165006 - in /jakarta/commons/proper/daemon/trunk/src/native/unix/native: java.c jsvc-unix.c location.c
Date Wed, 27 Apr 2005 16:28:59 GMT
Author: jfclere
Date: Wed Apr 27 09:28:57 2005
New Revision: 165006

URL: http://svn.apache.org/viewcvs?rev=165006&view=rev
Log:
Arrange support for BS2000 mainframe.

Modified:
    jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c
    jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
    jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c

Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c?rev=165006&r1=165005&r2=165006&view=diff
==============================================================================
--- jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c (original)
+++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/java.c Wed Apr 27 09:28:57
2005
@@ -114,6 +114,8 @@
     }
 
     /* Load the JVM library */
+#ifdef OSD_POSIX
+#else
     libh=dso_link(libf);
     if (libh==NULL) {
         log_error("Cannot dynamically link to %s",libf);
@@ -121,6 +123,7 @@
         return(false);
     }
     log_debug("JVM library %s loaded",libf);
+#endif
 
 #ifdef OS_DARWIN
     /*
@@ -148,6 +151,8 @@
     }
     log_debug("Shell library %s loaded",appf);
 #endif /* ifdef OS_DARWIN */
+#ifdef OSD_POSIX
+#else
     symb=dso_symbol(libh,"JNI_CreateJavaVM");
     if (symb==NULL) {
 #ifdef OS_DARWIN
@@ -161,6 +166,7 @@
 #endif /* ifdef OS_DARWIN */
     }
     log_debug("JVM library entry point found (0x%08X)",symb);
+#endif
 
     /* Prepare the VM initialization arguments */
     
@@ -173,6 +179,12 @@
     #else
         arg.version=JNI_VERSION_1_2;
     #endif
+#ifdef OSD_POSIX_JFC
+    if (JNI_GetDefaultJavaVMInitArgs(&arg)<0) {
+        log_error("Cannot init default JVM default args");
+        return(false);
+    }
+#endif
     arg.ignoreUnrecognized=FALSE;
     arg.nOptions=args->onum;
     arg.nOptions++; /* Add abort code */
@@ -182,7 +194,8 @@
         jsvc_xlate_to_ascii(opt[x].optionString);
         opt[x].extraInfo=NULL;
     }
-    opt[x].optionString="abort";
+    opt[x].optionString=strdup("abort");
+    jsvc_xlate_to_ascii(opt[x].optionString);
     opt[x].extraInfo=java_abort123;
     arg.options=opt;
 
@@ -204,8 +217,12 @@
     }
 
     /* And finally create the Java VM */
+#ifdef OSD_POSIX
+    ret=JNI_CreateJavaVM(&jvm, &env, &arg);
+#else
     ret=(*symb)(&jvm, &env, &arg);
-    if (ret!=0) {
+#endif
+    if (ret<0) {
         log_error("Cannot create Java VM");
         return(false);
     }

Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=165006&r1=165005&r2=165006&view=diff
==============================================================================
--- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c (original)
+++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Wed Apr 27 09:28:57
2005
@@ -501,7 +501,13 @@
     controlled = getpid();
     log_debug("Waiting for a signal to be delivered");
     create_tmp_file(args);
-    while (!stopping) sleep(60); /* pause() not threadsafe */
+    while (!stopping) {
+#ifdef OSD_POSIX
+        pause();
+#else
+        sleep(60); /* pause() not threadsafe */
+#endif
+    }
     remove_tmp_file(args);
     log_debug("Shutdown or reload requested: exiting");
 

Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c?rev=165006&r1=165005&r2=165006&view=diff
==============================================================================
--- jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c (original)
+++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/location.c Wed Apr 27 09:28:57
2005
@@ -80,8 +80,8 @@
        we're not going to find anything, but hope never dies... */
     "$JAVA_HOME/jre/lib/" CPU "/classic/green_threads/libjvm.so",
 #if defined(OSD_POSIX)
-    "$JAVA_HOME/jre/lib/sparc/client/green_threads/libjvm.so",
-    "$JAVA_HOME/jre/lib/s390/client/green_threads/libjvm.so",
+    "$JAVA_HOME/lib/s390/client/green_threads/libjvm.so",
+    "$JAVA_HOME/lib/sparc/client/green_threads/libjvm.so",
 #endif
     "$JAVA_HOME/jre/lib/classic/libjvm.so",
     "$JAVA_HOME/jre/lib/client/libjvm.so",



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message