From 1f084fc5dcdf6af273d46e62ffeb95ab3aa108cc Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 1 Jun 2008 08:23:32 +0000 Subject: [PATCH] 2008-06-01 Tatsuhiro Tsujikawa Fixed compile error on debian etch. The libc6 shipped with debian etch doesn't define ULLONG_MAX properly even if _GNU_SOURCE is defined. So define ULLONG_MAX in case when it is undefined. * src/Util.cc (ULLONG_MAX) --- ChangeLog | 8 ++++++++ src/Util.cc | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 23f2de1a..467ae73f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-06-01 Tatsuhiro Tsujikawa + + Fixed compile error on debian etch. + The libc6 shipped with debian etch doesn't define ULLONG_MAX properly + even if _GNU_SOURCE is defined. So define ULLONG_MAX in case when + it is undefined. + * src/Util.cc (ULLONG_MAX) + 2008-05-31 Tatsuhiro Tsujikawa Added epoll support. Use epoll if it is available. If not, use select. diff --git a/src/Util.cc b/src/Util.cc index a6ce84d9..5f8273a8 100644 --- a/src/Util.cc +++ b/src/Util.cc @@ -61,6 +61,11 @@ # endif // HAVE_WINSOCK_H #endif // HAVE_SLEEP +// For libc6 which doesn't define ULLONG_MAX properly because of broken limits.h +#ifndef ULLONG_MAX +# define ULLONG_MAX 18446744073709551615ULL +#endif // ULLONG_MAX + namespace aria2 { const std::string Util::DEFAULT_TRIM_CHARSET("\r\n\t ");