Android NDK R8e does not provide ftruncate64, but bionic has the
assembler code to access kernel function. We borrowed those
ftruncate64.S files from android source code repository. It turns out
that x86 asm.h in NDK R8e is also broken, so latest asm.h was also
borrowed.
By default, libaria2 feature is disabled. Use --enable-libaria2
to enable it. libaria2 static build is also disabled by default.
Use --enable-static to enable it.
Both tcmalloc_minimal and jemalloc outperform the native malloc
implemention on Windows (MSVCRT) in terms of committed memory
consumption (~-30%) and performance (e.g. far less page faults, ~-60%),
depending, of course, on the actual workload.
The longer the download queue, the bigger the impact ;)
On *nix the picture is a little different... tcmalloc usually still
outperforms the native malloc implementation, but not that significantly
than on Windows. jemalloc however is only marginally better than recent
native Linux implementations, while it is already used by some BSD as the
native allocator.
tcmalloc is part of gperftools and very mature and tested by now. It
doesn't work on OSX in the default configuration, however.
http://code.google.com/p/gperftools/
jemalloc is the default allocator at least on FreeBSD and NetBSD and
used in Firefox.
http://www.canonware.com/jemalloc/index.html
LibUV event will use the best available polling method on a system, kind
of like aria2 does already with the different *EventPoll
implementations.
However, libuv may support different/newer polling mechanisms; for
example on Windows it will use IO Completion Ports which are superior to
select() ;)
Most other software uses --disable/--without for features it does build
or at least check by default.
Change aria2 configure options so that:
* --enable-*: do not build by default, unless --enable specified
* --disable-*: check and build by default, unless --disable specified
* --with-*: do not use by default, unless --with specified
* --without-*: check and use by default, unless without specified
Saved sessions may very large, as in hundreds and even thousands of
megabyte when dealing with large queues.
Add support to save and reload sessions to gzipped files, when libz is
available.
The session serializer will output gzipped contents when the file ends
with .gz, while the input file reader (UriListParser) will accept
whatever is thrown at it.
mingw-w64 does not actually have sys/signal.h, while OSX currently has a
broken signal.h
Better check the presence of both and use sys/signal.h if present, else
signal.h
I tried CreateFile but the subsequent ReadFile fails with Access
Denied if sparse file is read on NTFS. I mostly reverted previous
changes and use _wsopen with read/write share enabled instead of
CreateFile.
This change also includes --enable-mmap support for MinGW32
build. Memory mapped file may be useful for 64-bits OS and lots of
RAM. Currently, FlushViewOfFile is not called during the download, so
it is slightly vulnerable against sudden power loss. I found lots of
read when resuming download due to page fault. So for now it is useful
for the initial download. I recommend not to use
--file-allocation=prealloc with --enable-mmap for MinGW32, because it
triggers page faults even in the initial download. Anyway, the option
is experimental.
Don't use AC_FUNC_MMAP becaue it fails on some platforms (e.g.,
OpenWRT) which have mmap and it works in the way we use in aria2.
Instead use mmap in AC_CHECK_FUNCS list.
Use system-wide certificates for SSL. For GnuTLS it requires the
latest version, 3.0.20. OpenSSL had it for longer. This means that if
SSL library is properly configured to locate system-wide certificates
store, the user don't have to use --ca-certificate option. Also
packagers don't have to use --with-ca-bundle configure option.
Patch from Cristian Morales Vega
Check sockaddr_in.sin_len and sockaddr_in6.sin6_len are available and
assign values to them properly. This change fixes unit test error and
most error related to getnameinfo() on netbsd.
By default, bash_completion file named aria2c is installed to the
directory $prefix/share/doc/aria2/bash_completion. To change the
install directory of the file, use --with-bashcompletiondir option.
The source files for manual pages are placed under doc/manual-src.
The built manual pages are placed under doc/manual.
When installed, manual pages are placed under $(docdir)/manual/.
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
Implemented clock_gettime() using mach_absolute_time in Mac OS X.
* configure.ac
* src/Makefile.am
* src/a2time.h
* src/clock_gettime_osx.cc
* src/clock_gettime_osx.h
Fixed the bug that if --without-sqlite3 is given, pkg-config is
not properly used in configure script and failed to detect gnutls.
This is because explicit call of PKG_PROG_PKG_CONFIG is missing
and the initialization of pkg-config is done in first occurrence
of PKG_CHECK_MODULES which is not executed because it is inside of
sqlite3.m4. Added explicit PKG_PROG_PKG_CONFIG call.
* configure.ac
In configure script, if --with-PACKAGE and --enable-FEATURE are
given and PACKAGE is missing in the system or FEATURE cannot be
enabled, print error message and stop the script.
* configure.ac
* m4/aria2_arg.m4
Added --install to ACLOCAL_AMFLAGS.
Removed m4 from SUBDIRS.
Updated automake 1.11 and autoconf 2.64.
Replaced some obsolute macros with new one.
* Makefile.am
* configure.ac
* m4/aria2_arg.m4
Added our own daemon() function for systems which desn't have
daemon(3).
* configure.ac
* src/Makefile.am
* src/daemon.cc
* src/daemon.h
* src/option_processing.cc
Since upcoming libgnutls 2.8 doesn't have libgnutls-config, Check
presence of libgnutls using pkg-config first. If it fails, fall
back to old macro libgnutls.m4.
* configure.ac