mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-17 15:42:30 +00:00
* Added byte alignment check, if required use a different means of
reading ints from ProtocolBuffer. * Don't round the task for ThrottleScheduler to the nearest second since it has a sub-second timeout. Change the other timeouts to first add cached and timespan, then round to the nearest seconds. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@529 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -118,3 +118,25 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([TORRENT_CHECK_ALIGN], [
|
||||
AC_MSG_CHECKING(byte alignment)
|
||||
|
||||
AC_RUN_IFELSE(
|
||||
[[#include <inttypes.h>
|
||||
int main() {
|
||||
char buf[5] = { 0, 0, 0, 0, 1 };
|
||||
int i;
|
||||
for (i = 0; i < 4; ++i)
|
||||
if (*(uint32_t*)(buf + 1) == 0) return -1;
|
||||
return 0;
|
||||
}
|
||||
]],
|
||||
[
|
||||
AC_MSG_RESULT(none)
|
||||
], [
|
||||
AC_DEFINE(USE_ALIGN, 1, Require byte alignment)
|
||||
AC_MSG_RESULT(required)
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user