activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r881452 - in /activemq/sandbox/activemq-apollo/activemq-syscall/src/main: java/org/apache/activemq/syscall/AIO.java native-package/src/activemq-syscall.h
Date Tue, 17 Nov 2009 19:31:24 GMT
Author: chirino
Date: Tue Nov 17 19:31:22 2009
New Revision: 881452

URL: http://svn.apache.org/viewvc?rev=881452&view=rev
Log:
Adding more conditional so that this can also build on windows

Modified:
    activemq/sandbox/activemq-apollo/activemq-syscall/src/main/java/org/apache/activemq/syscall/AIO.java
    activemq/sandbox/activemq-apollo/activemq-syscall/src/main/native-package/src/activemq-syscall.h

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=881452&r1=881451&r2=881452&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 19:31:22 2009
@@ -45,7 +45,7 @@
     @JniField(flags={FieldFlag.CONSTANT}, conditional="#ifdef HAVE_AIO_H", accessor="1")
     public static boolean SUPPORTED;
     
-    @JniField(flags={FieldFlag.CONSTANT})
+    @JniField(flags={FieldFlag.CONSTANT}, conditional="#ifdef HAVE_AIO_H")
     public static int EINPROGRESS;
     
 //    @JniField(flags={FieldFlag.CONSTANT})
@@ -77,11 +77,13 @@
         // int aio_lio_opcode;
         // int aio_flags;
         
+        @JniMethod(conditional="#ifdef HAVE_AIO_H")
         public static final native void memmove (
                 @JniArg(cast="void *", flags={NO_IN, CRITICAL}) aiocb dest, 
                 @JniArg(cast="const void *") long src, 
                 @JniArg(cast="size_t") long size);
         
+        @JniMethod(conditional="#ifdef HAVE_AIO_H")
         public static final native void memmove (
                 @JniArg(cast="void *") long dest, 
                 @JniArg(cast="const void *", flags={NO_OUT, CRITICAL}) aiocb src, 
@@ -105,7 +107,20 @@
         @JniField(cast="time_t")
         long tv_sec;  
         @JniField(cast="long")
-        long tv_nsec; 
+        long tv_nsec;
+        
+        @JniMethod(conditional="#ifdef HAVE_AIO_H")
+        public static final native void memmove (
+                @JniArg(cast="void *", flags={NO_IN, CRITICAL}) timespec dest, 
+                @JniArg(cast="const void *") long src, 
+                @JniArg(cast="size_t") long size);
+        
+        @JniMethod(conditional="#ifdef HAVE_AIO_H")
+        public static final native void memmove (
+                @JniArg(cast="void *") long dest, 
+                @JniArg(cast="const void *", flags={NO_OUT, CRITICAL}) timespec src, 
+                @JniArg(cast="size_t") long size);
+        
     }    
     
     /**

Modified: activemq/sandbox/activemq-apollo/activemq-syscall/src/main/native-package/src/activemq-syscall.h
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo/activemq-syscall/src/main/native-package/src/activemq-syscall.h?rev=881452&r1=881451&r2=881452&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo/activemq-syscall/src/main/native-package/src/activemq-syscall.h
(original)
+++ activemq/sandbox/activemq-apollo/activemq-syscall/src/main/native-package/src/activemq-syscall.h
Tue Nov 17 19:31:22 2009
@@ -4,12 +4,17 @@
 #ifdef HAVE_CONFIG_H
   /* configure based build.. we will use what it discovered about the platform */
   #include "config.h"
-#else
-  #ifdef WIN32
-    /* Windows based build */
-    #define HAVE_STDLIB_H 1
-    #define HAVE_STRINGS_H 1
-  #endif
+#elif _WINDOWS
+  /* Windows based build */
+  #define HAVE_STDLIB_H 1
+  #define HAVE_STRINGS_H 1
+    
+  #include <io.h>
+  
+  #define bzero(ptr, len) memset(ptr, 0, len)
+  #define open _open
+  #define close _close 
+  #define fcntl _fcntl
 #endif
 
 #ifdef HAVE_UNISTD_H



Mime
View raw message