tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r545126 - in /tomcat/connectors/trunk: jk/native/common/jk_global.h jni/java/org/apache/tomcat/Apr.java
Date Thu, 07 Jun 2007 09:32:09 GMT
Author: mturk
Date: Thu Jun  7 02:32:08 2007
New Revision: 545126

URL: http://svn.apache.org/viewvc?view=rev&rev=545126
Log:
Use JK_OPT_FWDURICOMPAT again as default

Modified:
    tomcat/connectors/trunk/jk/native/common/jk_global.h
    tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java

Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_global.h?view=diff&rev=545126&r1=545125&r2=545126
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_global.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_global.h Thu Jun  7 02:32:08 2007
@@ -234,7 +234,7 @@
 #define JK_OPT_FWDURICOMPATUNPARSED 0x0002
 #define JK_OPT_FWDURIESCAPED        0x0003
 
-#define JK_OPT_FWDURIDEFAULT        JK_OPT_FWDURICOMPATUNPARSED
+#define JK_OPT_FWDURIDEFAULT        JK_OPT_FWDURICOMPAT
 
 #define JK_OPT_FWDKEYSIZE           0x0004
 

Modified: tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java?view=diff&rev=545126&r1=545125&r2=545126
==============================================================================
--- tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java (original)
+++ tomcat/connectors/trunk/jni/java/org/apache/tomcat/Apr.java Thu Jun  7 02:32:08 2007
@@ -22,9 +22,51 @@
 import java.util.Properties;
 
 public class Apr {
-    private static String aprInfo = null;
+    public  static String Platform = null;
+    public  static String Cpu      = null;
+    public  static String[] Libraries = null;
 
     static {
+        String prop = System.getProperty("os.name");
+        String platform = "unknown";
+
+        if (name.startsWith("Windows"))
+            Platform = "windows";
+        else if (name.equals("Linux"))
+            Platform = "linux2";
+        else if (name.equals("SunOS"))
+            Platform = "solaris";
+        else if (name.equals("HP-UX"))
+            Platform = "hpux";
+        else
+            Platform = "unknown";
+       prop = System.getProperty("os.arch");
+
+        if (Platform.equals("windows")) {
+            if (prop.equals("x86"))
+                Cpu = "i686";
+            else
+                Cpu = prop;
+        }
+        else if (Platform.equals("linux2")) {
+            if (prop.equals("x86"))
+                Cpu = "i686";
+            else
+                Cpu = prop;
+        }
+        else if (Platform.equals("solaris")) {
+            Cpu = prop;
+        }
+        else if (Platform.equals("hpux")) {
+            if (prop.startsWith("PA_RISC"))
+                Cpu = "parisc2";
+            else if (prop.startsWith("IA64"))
+                Cpu = "ia64";
+            else
+                Cpu = prop;
+        }
+        else
+            Cpu = "unknown";
 
         try {
             InputStream is = Apr.class.getResourceAsStream
@@ -32,7 +74,11 @@
             Properties props = new Properties();
             props.load(is);
             is.close();
-            aprInfo = props.getProperty("tcn.info");
+            int count = Integer.parseInt(props.getProperty(Platform + ".count"));
+            Libraries = new String[count];
+            for (int i = 0; i < count; i++) {
+                Libraries[i] = props.getProperty(Platfrom + "." + i);
+            }
         }
         catch (Throwable t) {
             ; // Nothing



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


Mime
View raw message