Author: rjung
Date: Wed Sep 16 13:24:54 2009
New Revision: 815768

URL: http://svn.apache.org/viewvc?rev=815768&view=rev
Log:
Sync java parts of tcnative with C part.

Modified:
    tomcat/native/branches/1.1.x/STATUS.txt
    tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Buffer.java
    tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/File.java
    tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Registry.java
    tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/SSLContext.java
    tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Socket.java
    tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Stdlib.java

Modified: tomcat/native/branches/1.1.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/STATUS.txt?rev=815768&r1=815767&r2=815768&view=diff
==============================================================================
--- tomcat/native/branches/1.1.x/STATUS.txt (original)
+++ tomcat/native/branches/1.1.x/STATUS.txt Wed Sep 16 13:24:54 2009
@@ -30,18 +30,3 @@
 
 PATCHES PROPOSED TO BACKPORT:
   [ New proposals should be added at the end of the list ]
-
-* Backport remaining parts of
-  http://svn.eu.apache.org/viewvc?view=rev&revision=730523
-  I separated the non typo parts at
-  http://people.apache.org/~rjung/patches/jni.patch
-  +1: rjung
-  -1:
-
-* Sync native and Java methods. Patch available at
-  http://people.apache.org/~rjung/patches/tcnative-sync.patch
-  Partial backport of
-  http://svn.apache.org/viewvc?view=rev&revision=730523
-  +1: rjung, mturk
-   0: 
-  -1: 

Modified: tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Buffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Buffer.java?rev=815768&r1=815767&r2=815768&view=diff
==============================================================================
--- tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Buffer.java 
(original)
+++ tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Buffer.java Wed Sep 
16 13:24:54 2009
@@ -32,7 +32,7 @@
      * @param size The amount of memory to allocate
      * @return The ByteBuffer with allocated memory
      */
-    public static native ByteBuffer alloc(int size);
+    public static native ByteBuffer malloc(int size);
 
     /**
      * Allocate a new ByteBuffer from memory and set all of the memory to 0
@@ -86,6 +86,6 @@
      * Returns the allocated memory size of the ByteBuffer.
      * @param buf Previously allocated ByteBuffer.
      */
-    public static native int size(ByteBuffer buf);
+    public static native long size(ByteBuffer buf);
 
 }

Modified: tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/File.java
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/File.java?rev=815768&r1=815767&r2=815768&view=diff
==============================================================================
--- tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/File.java (original)
+++ tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/File.java Wed Sep 
16 13:24:54 2009
@@ -693,6 +693,16 @@
     public static native int stat(FileInfo finfo, String fname, int wanted, 
long pool);
 
     /**
+     * Get the specified file's stats.  The file is specified by filename,
+     * instead of using a pre-opened file.
+     * @param fname The name of the file to stat.
+     * @param wanted The desired apr_finfo_t fields, as a bit flag of 
APR_FINFO_ values
+     * @param pool the pool to use to allocate the new file.
+     * @return FileInfo object.
+     */
+    public static native FileInfo getStat(String fname, int wanted, long pool);
+
+    /**
      * Get the specified file's stats.
      * @param finfo Where to store the information about the file.
      * @param wanted The desired apr_finfo_t fields, as a bit flag of 
APR_FINFO_ values
@@ -700,4 +710,13 @@
      */
     public static native int infoGet(FileInfo finfo, int wanted, long thefile);
 
+
+    /**
+     * Get the specified file's stats.
+     * @param wanted The desired apr_finfo_t fields, as a bit flag of 
APR_FINFO_ values
+     * @param thefile The file to get information about.
+     * @return FileInfo object.
+     */
+    public static native FileInfo getInfo(int wanted, long thefile);
+
 }

Modified: tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Registry.java
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Registry.java?rev=815768&r1=815767&r2=815768&view=diff
==============================================================================
--- tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Registry.java 
(original)
+++ tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Registry.java Wed 
Sep 16 13:24:54 2009
@@ -156,7 +156,7 @@
      * @param val The the value to set
      * @return If the function succeeds, the return value is 0
      */
-    public static native int setValueJ(long key, String name, int val);
+    public static native int setValueJ(long key, String name, long val);
 
     /**
      * Set the Registry value for REG_SZ

Modified: 
tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/SSLContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/SSLContext.java?rev=815768&r1=815767&r2=815768&view=diff
==============================================================================
--- tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/SSLContext.java 
(original)
+++ tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/SSLContext.java Wed 
Sep 16 13:24:54 2009
@@ -226,6 +226,13 @@
         throws Exception;
 
     /**
+     * Set file for randomness
+     * @param ctx Server or Client context to use.
+     * @param file random file.
+     */
+    public static native void setRandom(long ctx, String file);
+
+    /**
      * Set SSL connection shutdown type
      * <br />
      * The following levels are available for level:

Modified: tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Socket.java
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Socket.java?rev=815768&r1=815767&r2=815768&view=diff
==============================================================================
--- tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Socket.java 
(original)
+++ tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Socket.java Wed Sep 
16 13:24:54 2009
@@ -170,6 +170,16 @@
      *          made the connection request.  This is the socket which should
      *          be used for all future communication.
      */
+    public static native long acceptx(long sock, long pool)
+        throws Exception;
+
+    /**
+     * Accept a new connection request
+     * @param sock The socket we are listening on.
+     * @return  A copy of the socket that is connected to the socket that
+     *          made the connection request.  This is the socket which should
+     *          be used for all future communication.
+     */
     public static native long accept(long sock)
         throws Exception;
 

Modified: tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Stdlib.java
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Stdlib.java?rev=815768&r1=815767&r2=815768&view=diff
==============================================================================
--- tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Stdlib.java 
(original)
+++ tomcat/native/branches/1.1.x/java/org/apache/tomcat/jni/Stdlib.java Wed Sep 
16 13:24:54 2009
@@ -67,7 +67,7 @@
      * @param num Number of elements.
      * @param sz Length in bytes of each element.
      */
-    public static native long calloc(long num, int sz);
+    public static native long calloc(int num, int sz);
 
     /**
      * Deallocates or frees a memory block.



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

Reply via email to