tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_vm_default.c
Date Fri, 25 Oct 2002 06:52:54 GMT
mturk       2002/10/24 23:52:54

  Modified:    jk/native2/common jk_vm_default.c
  Log:
  Use the PATH_SEPARATOR_STR for classpaths.
  The used one was the semicolon that is used only on WIN32
  
  Revision  Changes    Path
  1.24      +12 -6     jakarta-tomcat-connectors/jk/native2/common/jk_vm_default.c
  
  Index: jk_vm_default.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_vm_default.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- jk_vm_default.c	24 Oct 2002 15:37:18 -0000	1.23
  +++ jk_vm_default.c	25 Oct 2002 06:52:54 -0000	1.24
  @@ -424,27 +424,33 @@
               /* Check if the LD_LIBRARY_PATH points to the discovered jvm.
                * XXX only tested on Linux.
                */
  -            ldlib = getenv("LD_LIBRARY_PATH");
  +#if defined(LINUX)
  +            ldlib = getenv(PATH_ENV_VARIABLE);
               if (ldlib && strlen(ldlib)) {
                   char *token;
                   
  -                token = strtok(ldlib, ":");
  +                token = strtok(ldlib, PATH_SEPARATOR_STR);
                   while (token != NULL) {
                       if (strncmp(token, jvm, strlen(token)) == 0) {
                           env->l->jkLog(env, env->l, JK_LOG_INFO,
                                         "jni.guessJvmDll() found %s in %s.\n", jvm, token);
                           return jvm;
                       } 
  -                    token = strtok(NULL, ":");                   
  +                    token = strtok(NULL, PATH_SEPARATOR_STR);                   
                   }
                   env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                              "jni.guessJvmDll() could not find %s in the LD_LIBRARY_PATH\n",
  +                              "jni.guessJvmDll() could not find %s in the " \ 
  +                              "LD_LIBRARY_PATH\n",
                                 jvm);
                   return NULL;                                    
               }
               env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                          "jni.guessJvmDll() LD_LIBRARY_PATH environment var is not set\n");
  +                          "jni.guessJvmDll() LD_LIBRARY_PATH " \
  +                          "environment var is not set\n");
               return NULL;                                
  +#else
  +            return jvm;
  +#endif
           }
   
           env->l->jkLog(env, env->l, JK_LOG_INFO,
  @@ -535,7 +541,7 @@
           strcpy(classpath, "-Djava.class.path=");
           strcat(classpath, jkvm->classpath[0]);        
           for (i = 1; i < classn; i++) {
  -            strcat(classpath, ";");
  +            strcat(classpath, PATH_SEPARATOR_STR);
               strcat(classpath, jkvm->classpath[i]);
           }
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message