2010-10-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Use inet_ntoa if inet_ntop is not available. Since inet_ntoa does
	not handle IPv6 address, IPv6 support is limited in this
	case. Fixed unit test error under mingw32.
	* configure.ac
	* src/AsyncNameResolver.cc
	* src/SocketCore.cc
	* src/bittorrent_helper.cc
	* test/BittorrentHelperTest.cc
	* test/DHTMessageFactoryImplTest.cc
	* test/DHTRoutingTableDeserializerTest.cc
	* test/DHTRoutingTableSerializerTest.cc
	* test/DefaultBtAnnounceTest.cc
	* test/Metalink2RequestGroupTest.cc
	* test/UTPexExtensionMessageTest.cc
This commit is contained in:
Tatsuhiro Tsujikawa 2010-10-04 14:33:49 +00:00
parent 329de2a9b5
commit 5db7b123b5
14 changed files with 98 additions and 6 deletions

View file

@ -20,7 +20,9 @@ class DHTRoutingTableSerializerTest:public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(DHTRoutingTableSerializerTest);
CPPUNIT_TEST(testSerialize);
#ifdef HAVE_INET_NTOP
CPPUNIT_TEST(testSerialize6);
#endif // HAVE_INET_NTOP
CPPUNIT_TEST_SUITE_END();
private:
char zero[256];
@ -222,6 +224,7 @@ void DHTRoutingTableSerializerTest::testSerialize()
CPPUNIT_ASSERT(ss.eof());
}
#ifdef HAVE_INET_NTOP
void DHTRoutingTableSerializerTest::testSerialize6()
{
SharedHandle<DHTNode> localNode(new DHTNode());
@ -309,5 +312,6 @@ void DHTRoutingTableSerializerTest::testSerialize6()
CPPUNIT_ASSERT_EQUAL((std::streamsize)0, ss.gcount());
CPPUNIT_ASSERT(ss.eof());
}
#endif // HAVE_INET_NTOP
} // namespace aria2