]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation fixes for 64 bit platforms
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Jan 2009 17:41:25 +0000 (17:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Jan 2009 17:41:25 +0000 (17:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/net/socket.cpp
tests/streams/bstream.h

index c0eb7e8fe945e733f47be547b4b4bdc4080f039a..5928915e410a556341833d6936a22e8e3b09f03c 100644 (file)
@@ -179,7 +179,7 @@ void SocketTestCase::ReadNormal()
     sock->Read(bufSmall, WXSIZEOF(bufSmall));
 
     CPPUNIT_ASSERT_EQUAL( wxSOCKET_NOERROR, sock->LastError() );
-    CPPUNIT_ASSERT_EQUAL( WXSIZEOF(bufSmall), sock->LastCount() );
+    CPPUNIT_ASSERT_EQUAL( WXSIZEOF(bufSmall), (size_t)sock->LastCount() );
 
 
     char bufBig[102400];
@@ -199,7 +199,7 @@ void SocketTestCase::ReadBlock()
     sock->Read(bufSmall, WXSIZEOF(bufSmall));
 
     CPPUNIT_ASSERT_EQUAL( wxSOCKET_NOERROR, sock->LastError() );
-    CPPUNIT_ASSERT_EQUAL( WXSIZEOF(bufSmall), sock->LastCount() );
+    CPPUNIT_ASSERT_EQUAL( WXSIZEOF(bufSmall), (size_t)sock->LastCount() );
 
 
     char bufBig[102400];
@@ -235,7 +235,7 @@ void SocketTestCase::ReadWaitall()
     sock->Read(buf, WXSIZEOF(buf));
 
     CPPUNIT_ASSERT_EQUAL( wxSOCKET_NOERROR, sock->LastError() );
-    CPPUNIT_ASSERT_EQUAL( WXSIZEOF(buf), sock->LastCount() );
+    CPPUNIT_ASSERT_EQUAL( WXSIZEOF(buf), (size_t)sock->LastCount() );
 }
 
 void SocketTestCase::UrlTest()
index 36394c56f3b414c5908e5e93bbeceda5ce438062..73041339778921b1b65126d999211033d30f2fc9 100644 (file)
     CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( Name, COMPOSE_TEST_NAME(Name) ); \
     STREAM_IMPLEMENT_SUB_REGISTRATION_ROUTINE( Name )
 
-
+// under 64 bit platforms wxFileOffset is the same as long and we already have
+// WX_CPPUNIT_ALLOW_EQUALS_TO_INT(long) in wx/cppunit.h
+#if SIZEOF_LONG != 8
 WX_CPPUNIT_ALLOW_EQUALS_TO_INT(wxFileOffset)
+#endif
 
 ///////////////////////////////////////////////////////////////////////////////
 // Template class that implements a test for all base stream functions.