activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r881387 - in /activemq/sandbox/activemq-apollo/activemq-syscall/src/main/java/org/apache/activemq/syscall: AIO.java IO.java
Date Tue, 17 Nov 2009 17:22:33 GMT
Author: chirino
Date: Tue Nov 17 17:22:32 2009
New Revision: 881387

URL: http://svn.apache.org/viewvc?rev=881387&view=rev
Log:
adding conditionals

Modified:
    activemq/sandbox/activemq-apollo/activemq-syscall/src/main/java/org/apache/activemq/syscall/AIO.java
    activemq/sandbox/activemq-apollo/activemq-syscall/src/main/java/org/apache/activemq/syscall/IO.java

Modified: activemq/sandbox/activemq-apollo/activemq-syscall/src/main/java/org/apache/activemq/syscall/AIO.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo/activemq-syscall/src/main/java/org/apache/activemq/syscall/AIO.java?rev=881387&r1=881386&r2=881387&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo/activemq-syscall/src/main/java/org/apache/activemq/syscall/AIO.java
(original)
+++ activemq/sandbox/activemq-apollo/activemq-syscall/src/main/java/org/apache/activemq/syscall/AIO.java
Tue Nov 17 17:22:32 2009
@@ -42,13 +42,16 @@
     @JniMethod(flags={CONSTANT_INITIALIZER})
     private static final native void init();
     
+    @JniField(flags={FieldFlag.CONSTANT}, conditional="#ifdef HAVE_AIO_H", accessor="1")
+    public static boolean SUPPORTED;
+    
     @JniField(flags={FieldFlag.CONSTANT})
     public static int EINPROGRESS;
     
 //    @JniField(flags={FieldFlag.CONSTANT})
 //    public static int ECANCELLED;
 
-    @JniClass(flags={ClassFlag.STRUCT, ClassFlag.ZERO_OUT})
+    @JniClass(flags={ClassFlag.STRUCT, ClassFlag.ZERO_OUT}, conditional="#ifdef HAVE_AIO_H")
     static public class aiocb {
         static {
             CLibrary.LIBRARY.load();
@@ -85,7 +88,7 @@
                 @JniArg(cast="size_t") long size);
     }
     
-    @JniClass(flags={ClassFlag.STRUCT})
+    @JniClass(flags={ClassFlag.STRUCT}, conditional="#ifdef HAVE_AIO_H")
     static public class timespec {
         
         public static final native int timespec_sizeof ();
@@ -102,6 +105,7 @@
      * int aio_read(struct aiocb *aiocbp);
      * </pre></code>
      */
+    @JniMethod(conditional="#ifdef HAVE_AIO_H")
     public static final native int aio_read(
             @JniArg(cast="struct aiocb *")long aiocbp);
 
@@ -110,6 +114,7 @@
      * int aio_write(struct aiocb *aiocbp);
      * </pre></code>
      */
+    @JniMethod(conditional="#ifdef HAVE_AIO_H")
     public static final native int aio_write(
             @JniArg(cast="struct aiocb *")long aiocbp);
 
@@ -118,6 +123,7 @@
      * int aio_cancel(int fd, struct aiocb *aiocbp);
      * </pre></code>
      */
+    @JniMethod(conditional="#ifdef HAVE_AIO_H")
     public static final native int aio_cancel(
             int fd, 
             @JniArg(cast="struct aiocb *")long aiocbp);
@@ -127,6 +133,7 @@
      * int aio_error(const struct aiocb *aiocbp);
      * </pre></code>
      */
+    @JniMethod(conditional="#ifdef HAVE_AIO_H")
     public static final native int aio_error(
             @JniArg(cast="const struct aiocb *")long aiocbp);
     
@@ -135,6 +142,7 @@
      * ssize_t aio_return(struct aiocb *aiocbp);
      * </pre></code>
      */
+    @JniMethod(conditional="#ifdef HAVE_AIO_H")
     public static final native long aio_return(
             @JniArg(cast="struct aiocb *")long aiocbp);
 
@@ -143,6 +151,7 @@
      * int aio_suspend(const struct aiocb *const list[], int nent, const struct timespec
*timeout);
      * </pre></code>
      */
+    @JniMethod(conditional="#ifdef HAVE_AIO_H")
     public static final native int aio_suspend(
             @JniArg(cast="const struct aiocb *const*")long[] list,
             int nent,

Modified: activemq/sandbox/activemq-apollo/activemq-syscall/src/main/java/org/apache/activemq/syscall/IO.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo/activemq-syscall/src/main/java/org/apache/activemq/syscall/IO.java?rev=881387&r1=881386&r2=881387&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo/activemq-syscall/src/main/java/org/apache/activemq/syscall/IO.java
(original)
+++ activemq/sandbox/activemq-apollo/activemq-syscall/src/main/java/org/apache/activemq/syscall/IO.java
Tue Nov 17 17:22:32 2009
@@ -56,7 +56,19 @@
     public static int O_EXCL;
     @JniField(flags={CONSTANT})
     public static int O_ASYNC;
-
+    
+    @JniField(flags={CONSTANT}, conditional="#ifdef O_SHLOCK")
+    public static int O_SHLOCK;
+    @JniField(flags={CONSTANT}, conditional="#ifdef O_EXLOCK")
+    public static int O_EXLOCK;
+    @JniField(flags={CONSTANT}, conditional="#ifdef O_NOFOLLOW")
+    public static int O_NOFOLLOW;
+    @JniField(flags={CONSTANT}, conditional="#ifdef O_SYMLINK")
+    public static int O_SYMLINK;
+    @JniField(flags={CONSTANT}, conditional="#ifdef O_EVTONLY")
+    public static int O_EVTONLY;
+    
+    // Mode Constants
     @JniField(flags={CONSTANT})
     public static int S_IRWXU;
     @JniField(flags={CONSTANT})
@@ -64,8 +76,7 @@
     @JniField(flags={CONSTANT})
     public static int S_IWUSR;
     @JniField(flags={CONSTANT})
-    public static int S_IXUSR;
-            
+    public static int S_IXUSR;            
     @JniField(flags={CONSTANT})
     public static int S_IRWXG;
     @JniField(flags={CONSTANT})
@@ -73,8 +84,7 @@
     @JniField(flags={CONSTANT})
     public static int S_IWGRP;
     @JniField(flags={CONSTANT})
-    public static int S_IXGRP;
-            
+    public static int S_IXGRP;            
     @JniField(flags={CONSTANT})
     public static int S_IRWXO;
     @JniField(flags={CONSTANT})
@@ -82,8 +92,7 @@
     @JniField(flags={CONSTANT})
     public static int S_IWOTH;
     @JniField(flags={CONSTANT})
-    public static int S_IXOTH;
-            
+    public static int S_IXOTH;            
     @JniField(flags={CONSTANT})
     public static int S_ISUID;
     @JniField(flags={CONSTANT})
@@ -111,6 +120,27 @@
     public static int F_SETLK;
     @JniField(flags={CONSTANT})
     public static int F_SETLKW;
+
+    @JniField(flags={CONSTANT}, conditional="#ifdef F_GETPATH")
+    public static int F_GETPATH;
+    @JniField(flags={CONSTANT}, conditional="#ifdef F_PREALLOCATE")
+    public static int F_PREALLOCATE;
+    @JniField(flags={CONSTANT}, conditional="#ifdef F_SETSIZE")
+    public static int F_SETSIZE;
+    @JniField(flags={CONSTANT}, conditional="#ifdef F_RDADVISE")
+    public static int F_RDADVISE;
+    @JniField(flags={CONSTANT}, conditional="#ifdef F_RDAHEAD")
+    public static int F_RDAHEAD;
+    @JniField(flags={CONSTANT}, conditional="#ifdef F_READBOOTSTRAP")
+    public static int F_READBOOTSTRAP;
+    @JniField(flags={CONSTANT}, conditional="#ifdef F_WRITEBOOTSTRAP")
+    public static int F_WRITEBOOTSTRAP;
+    @JniField(flags={CONSTANT}, conditional="#ifdef F_NOCACHE")
+    public static int F_NOCACHE;
+    @JniField(flags={CONSTANT}, conditional="#ifdef F_LOG2PHYS")
+    public static int F_LOG2PHYS;
+    @JniField(flags={CONSTANT}, conditional="#ifdef F_FULLFSYNC")
+    public static int F_FULLFSYNC;
     
     ///////////////////////////////////////////////////////////////////
     //



Mime
View raw message