From 5f0f8e68b29e6f446787c31e3241550bb5f49ca4 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 6 Feb 2009 16:49:24 +0000 Subject: [PATCH] 2009-02-07 Tatsuhiro Tsujikawa Fixed compile error when HAVE_EPOLL is not defined. Fixed linker error on bigendian systems. * src/SocketCore.cc * src/SocketCore.h * test/DefaultBtProgressInfoFileTest.cc --- ChangeLog | 8 ++++++++ src/SocketCore.cc | 2 +- src/SocketCore.h | 5 ++--- test/DefaultBtProgressInfoFileTest.cc | 8 ++++++++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20065c8e..eca88e4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-02-07 Tatsuhiro Tsujikawa + + Fixed compile error when HAVE_EPOLL is not defined. + Fixed linker error on bigendian systems. + * src/SocketCore.cc + * src/SocketCore.h + * test/DefaultBtProgressInfoFileTest.cc + 2009-02-04 Tatsuhiro Tsujikawa Added --bt-external-ip option. You can specify the external IP diff --git a/src/SocketCore.cc b/src/SocketCore.cc index 29361ec8..e01f5af6 100644 --- a/src/SocketCore.cc +++ b/src/SocketCore.cc @@ -1062,11 +1062,11 @@ void SocketCore::useEpoll() { _pollMethod = SocketCore::POLL_METHOD_EPOLL; } +#endif // HAVE_EPOLL void SocketCore::useSelect() { _pollMethod = SocketCore::POLL_METHOD_SELECT; } -#endif // HAVE_EPOLL } // namespace aria2 diff --git a/src/SocketCore.h b/src/SocketCore.h index 11578616..1c0c553e 100644 --- a/src/SocketCore.h +++ b/src/SocketCore.h @@ -82,15 +82,14 @@ private: struct epoll_event _epEvent; +#endif // HAVE_EPOLL + enum PollMethod { POLL_METHOD_EPOLL, POLL_METHOD_SELECT }; static PollMethod _pollMethod; -#endif // HAVE_EPOLL - - bool blocking; int secure; diff --git a/test/DefaultBtProgressInfoFileTest.cc b/test/DefaultBtProgressInfoFileTest.cc index 3c5cb365..c192aa30 100644 --- a/test/DefaultBtProgressInfoFileTest.cc +++ b/test/DefaultBtProgressInfoFileTest.cc @@ -26,11 +26,15 @@ class DefaultBtProgressInfoFileTest:public CppUnit::TestFixture { #ifdef ENABLE_BITTORRENT CPPUNIT_TEST(testSave); CPPUNIT_TEST(testLoad); +#ifndef WORDS_BIGENDIAN CPPUNIT_TEST(testLoad_compat); +#endif // !WORDS_BIGENDIAN #endif // ENABLE_BITTORRENT CPPUNIT_TEST(testSave_nonBt); CPPUNIT_TEST(testLoad_nonBt); +#ifndef WORDS_BIGENDIAN CPPUNIT_TEST(testLoad_nonBt_compat); +#endif // !WORDS_BIGENDIAN CPPUNIT_TEST(testLoad_nonBt_pieceLengthShorter); CPPUNIT_TEST(testUpdateFilename); CPPUNIT_TEST_SUITE_END(); @@ -74,11 +78,15 @@ public: #ifdef ENABLE_BITTORRENT void testSave(); void testLoad(); +#ifndef WORDS_BIGENDIAN void testLoad_compat(); +#endif // !WORDS_BIGENDIAN #endif // ENABLE_BITTORRENT void testSave_nonBt(); void testLoad_nonBt(); +#ifndef WORDS_BIGENDIAN void testLoad_nonBt_compat(); +#endif // !WORDS_BIGENDIAN void testLoad_nonBt_pieceLengthShorter(); void testUpdateFilename(); };