activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r617310 - in /activemq/activemq-cpp/decaf/trunk/src: main/decaf/io/ main/decaf/lang/ main/decaf/net/ main/decaf/security_provider/ test/decaf/io/
Date Thu, 31 Jan 2008 23:58:15 GMT
Author: tabish
Date: Thu Jan 31 15:58:06 2008
New Revision: 617310

URL: http://svn.apache.org/viewvc?rev=617310&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQCPP-103

Modified:
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BlockingByteArrayInputStream.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.h
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/ByteArrayInputStream.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Double.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Integer.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Long.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Math.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/System.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/SocketInputStream.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/security_provider/SecurityProviderMap.h
    activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.cpp
    activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.h
    activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/DataInputStreamTest.cpp

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BlockingByteArrayInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BlockingByteArrayInputStream.cpp?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BlockingByteArrayInputStream.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BlockingByteArrayInputStream.cpp Thu
Jan 31 15:58:06 2008
@@ -144,7 +144,7 @@
                 "BlockingByteArrayInputStream::read - close occurred during read" );
         }
 
-        return ix;
+        return (int)ix;
     }
 
     return 0;

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.cpp?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.cpp Thu Jan 31
15:58:06 2008
@@ -185,7 +185,7 @@
         }
 
         // Return the total number of bytes read.
-        return totalRead;
+        return (int)totalRead;
     }
     DECAF_CATCH_RETHROW( IOException )
     DECAF_CATCH_RETHROW( NullPointerException )

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.h?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.h (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/BufferedInputStream.h Thu Jan 31 15:58:06
2008
@@ -164,7 +164,7 @@
          */
         virtual void mark( int readLimit ) {
             this->markLimit = readLimit;
-            this->markpos = head;
+            this->markpos = (int)head;
         }
 
         /**

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/ByteArrayInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/ByteArrayInputStream.cpp?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/ByteArrayInputStream.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/io/ByteArrayInputStream.cpp Thu Jan 31
15:58:06 2008
@@ -141,7 +141,7 @@
             buffer[ix + offset] = *(pos);
         }
 
-        return ix;
+        return (int)ix;
     }
     DECAF_CATCH_RETHROW( IOException )
     DECAF_CATCH_RETHROW( NullPointerException )

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Double.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Double.cpp?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Double.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Double.cpp Thu Jan 31 15:58:06 2008
@@ -69,7 +69,7 @@
 int Double::compare( double d1, double d2 ) {
 
     long long l1, l2 = 0;
-    long NaNbits = Double::doubleToLongBits( Double::NaN );
+    long long NaNbits = Double::doubleToLongBits( Double::NaN );
 
     if( ( l1 = Double::doubleToLongBits( d1 ) ) == NaNbits ) {
         if( Double::doubleToLongBits( d2 ) == NaNbits ) {

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Integer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Integer.cpp?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Integer.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Integer.cpp Thu Jan 31 15:58:06
2008
@@ -273,7 +273,7 @@
             "Integer:decode - Invalid radix" );
     }
 
-    int length = value.length(), i = 0;
+    int length = (int)value.length(), i = 0;
     if( length == 0 ) {
         throw NumberFormatException(
             __FILE__, __LINE__,
@@ -308,7 +308,7 @@
 Integer Integer::decode( const std::string& value )
     throw ( exceptions::NumberFormatException ) {
 
-    int length = value.length(), i = 0;
+    int length = (int)value.length(), i = 0;
     if( length == 0 ) {
         throw NumberFormatException(
             __FILE__, __LINE__,
@@ -364,7 +364,7 @@
     throw ( exceptions::NumberFormatException ) {
 
     int max = Integer::MIN_VALUE / radix;
-    int result = 0, length = value.size();
+    int result = 0, length = (int)value.size();
 
     while( offset < length ) {
         int digit = Character::digit( value[offset++], radix );

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Long.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Long.cpp?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Long.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Long.cpp Thu Jan 31 15:58:06 2008
@@ -65,7 +65,7 @@
 Long Long::decode( const std::string& value )
     throw ( exceptions::NumberFormatException ) {
 
-    int length = value.length(), i = 0;
+    int length = (int)value.length(), i = 0;
     if( length == 0 ) {
         throw exceptions::NumberFormatException(
             __FILE__, __LINE__,
@@ -190,7 +190,7 @@
             "Long::parseLong - Given Radix is out of range." );
     }
 
-    int length = value.length();
+    int length = (int)value.length();
     int i = 0;
 
     if( length == 0 ) {
@@ -355,7 +355,7 @@
     char* buffer = new char[length + 1];
 
     do {
-        int ch = 0 - ( j % radix );
+        int ch = (int)( 0 - ( j % radix ) );
         if( ch > 9 ) {
             ch = ch - 10 + 'a';
         } else {
@@ -460,7 +460,7 @@
     char* buffer = new char[length + 1];
 
     do {
-        int t = value & 15;
+        int t = (int)( value & 15 );
         if( t > 9 ) {
             t = t - 10 + 'a';
         } else {

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Math.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Math.cpp?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Math.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Math.cpp Thu Jan 31 15:58:06 2008
@@ -26,6 +26,7 @@
 using namespace decaf::lang;
 
 #include <cmath>
+#include <cstdio>
 #include <cstdlib>
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -79,7 +80,7 @@
         return value;
     }
 
-    return ::cbrt( value );
+    return cbrt( value );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -183,7 +184,7 @@
         return value;
     }
 
-    return ::rint( value );
+    return rint( value );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -213,7 +214,7 @@
         return value;
     }
 
-    return ::expm1( value );
+    return expm1( value );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -350,7 +351,7 @@
         return value;
     }
 
-    return ::log1p( value );
+    return log1p( value );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -409,8 +410,8 @@
     } else if( Double::isInfinite( f2 ) ) {
         return f1;
     }
-
-    return ::remainder( f1, f2 );
+    
+    return remainder( f1, f2 );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -481,7 +482,7 @@
     }
 
     value = abs( value );
-    return ::nextafterf( value, Float::MAX_VALUE ) - value;
+    return nextafterf( value, Float::MAX_VALUE ) - value;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -498,5 +499,5 @@
     }
 
     value = abs( value );
-    return ::nextafter( value, Double::MAX_VALUE ) - value;
+    return nextafter( value, Double::MAX_VALUE ) - value;
 }

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/System.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/System.cpp?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/System.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/System.cpp Thu Jan 31 15:58:06 2008
@@ -26,7 +26,7 @@
 #include <apr_errno.h>
 #include <apr_env.h>
 
-#ifdef APR_HAVE_UNISTD_H
+#if APR_HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 
@@ -144,7 +144,7 @@
         } else if( tokens > 2 ) {
             // special case: first equals delimits the key value, the rest are
             // part of the variable
-            int pos = env[i].find( "=" );
+            int pos = (int)env[i].find( "=" );
             key = env[i].substr( 0, pos );
             value = env[i].substr( pos + 1, string::npos );
         } else if( tokens == 0 ) {
@@ -180,7 +180,7 @@
 
     lpvEnv = GetEnvironmentStrings();
     if( NULL == lpvEnv ){
-        return NULL;
+        return buffer;
     }
 
     lpszVars = (LPTSTR)lpvEnv;

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.cpp?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.cpp Thu Jan 31 15:58:06 2008
@@ -99,7 +99,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 unsigned long Thread::getId() {
-    return (long)( apr_os_thread_current() );
+    return (unsigned long)( apr_os_thread_current() );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/SocketInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/SocketInputStream.cpp?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/SocketInputStream.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/SocketInputStream.cpp Thu Jan 31
15:58:06 2008
@@ -79,7 +79,7 @@
 
     unsigned long numBytes = 0;
 
-    if( ::ioctlsocket( *oss, FIONREAD, &numBytes ) == SOCKET_ERROR ){
+    if( ::ioctlsocket( oss, FIONREAD, &numBytes ) == SOCKET_ERROR ){
         throw SocketException( __FILE__, __LINE__, "ioctlsocket failed" );
     }
 
@@ -178,7 +178,7 @@
             SocketError::getErrorString().c_str() );
     }
 
-    return size;
+    return (int)size;
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.cpp?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.cpp Thu Jan 31 15:58:06
2008
@@ -290,7 +290,7 @@
         // Time is in microseconds so divide by 1000.
         apr_interval_time_t value = 0;
         checkResult( apr_socket_timeout_get( socketHandle, &value ) );
-        return value / 1000;
+        return (int)( value / 1000 );
     }
     DECAF_CATCH_RETHROW( SocketException )
     DECAF_CATCHALL_THROW( SocketException )

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/security_provider/SecurityProviderMap.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/security_provider/SecurityProviderMap.h?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/security_provider/SecurityProviderMap.h
(original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/security_provider/SecurityProviderMap.h
Thu Jan 31 15:58:06 2008
@@ -22,8 +22,7 @@
 #include <vector>
 #include <string>
 
-#include <activemq/exceptions/ActiveMQException.h>
-#include <activemq/connector/ConnectorFactory.h>
+#include <decaf/lang/Exception.h>
 
 namespace activemq{
 namespace connector{

Modified: activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.cpp?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.cpp Thu Jan
31 15:58:06 2008
@@ -83,7 +83,7 @@
     MyInputStream myStream2( testStr2 );
     BufferedInputStream bis( &myStream2, testStr2.length() );
 
-    int available;
+    std::size_t available;
 
     try {
         available = bis.available();

Modified: activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.h?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.h (original)
+++ activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/BufferedInputStreamTest.h Thu Jan
31 15:58:06 2008
@@ -135,7 +135,7 @@
 
                 pos += numToRead;
 
-                return numToRead;
+                return (int)numToRead;
             }
 
             virtual void close() throw(lang::Exception){

Modified: activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/DataInputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/DataInputStreamTest.cpp?rev=617310&r1=617309&r2=617310&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/DataInputStreamTest.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/DataInputStreamTest.cpp Thu Jan 31
15:58:06 2008
@@ -337,8 +337,8 @@
 
         CPPUNIT_ASSERT_MESSAGE(
             "Skipped should report " +
-            Integer::toString( testData.length() ) + " not " +
-            Integer::toString( skipped ),
+            Integer::toString( (int)testData.length() ) + " not " +
+            Integer::toString( (int)skipped ),
             skipped == testData.length() );
 
     } catch( IOException &e ) {



Mime
View raw message