libnettle and libgmp is used by default. Old implementation uses
libgcrypt as default. If more and more Linux distributions offer
libnettle linked GnuTLS, then this change decrease library dependency
against libgcrypt and libgpg-error. The current library detection for
libnettle and libgmp is very simple, just use AC_SEARCH_LIBS.
util::generateRandomData() was written using SimpleRandomizer, thus no
external library dependency from this function.
In MinGW32 build, global::cout is WinConsoleFile. When outputing to
console, it uses WriteConsoleW, so Unicode characters are written.
Fixed memory leak in WChar<->MultiByte conversion functions. The
portion of code which uses std::cout is rewritten to use global::cout.
We use SetFilePointerEx and SetEndOfFile to allocate extents. This
only works with NTFS. To enable this feature, --file-allocation=falloc
must be given.
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
Fixed the bug that HAVE_SOME_FALLOCATE gets undefined if fallocate
is not available even if posix_fallocate is available. This causes
FallocFileAllocationIterator.cc is out of compile targets and
linker error.
* configure.ac
When allocating disk space, for Linux system with fallocate()
system call, first check file system supports fallocate. This
just run fallocate with small chunk and see it succeeds or fails.
If it succeeds, use fallocate() to allocate entire file otherwise
fall back to traditional slower method: writing zeros. This
behavior is enabled in --file-allocation=prealloc, so this is
enabled by default for most modern Linux.
* configure.ac
* src/AbstractDiskWriter.cc
* src/AbstractDiskWriter.h
* src/AbstractSingleDiskAdaptor.cc
* src/AdaptiveFileAllocationIterator.cc
* src/AdaptiveFileAllocationIterator.h
* src/DefaultPieceStorage.cc
* src/DiskAdaptor.cc
* src/DiskAdaptor.h
* src/FallocFileAllocationIterator.cc
* src/Makefile.am
* src/MultiFileAllocationIterator.cc
* src/OptionHandlerFactory.cc
* test/FallocFileAllocationIteratorTest.cc
* test/Makefile.am
Supported poll() for socket event notification. --event-poll can
take value "poll". Fixed the bug that timeout for
SocketCore::isReadable()/isWritable() is ignored when epoll is
used.
* src/OptionHandlerFactory.cc
* src/a2io.h
* src/prefs.h
* src/SocketCore.h
* src/Makefile.am
* src/main.cc
* src/PollEventPoll.h
* src/SocketCore.cc
* src/DownloadEngineFactory.cc
* src/PollEventPoll.cc
* src/prefs.cc
* configure.ac