Pārlūkot izejas kodu

2008-06-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	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)
Tatsuhiro Tsujikawa 17 gadi atpakaļ
vecāks
revīzija
1f084fc5dc
2 mainītis faili ar 13 papildinājumiem un 0 dzēšanām
  1. 8 0
      ChangeLog
  2. 5 0
      src/Util.cc

+ 8 - 0
ChangeLog

@@ -1,3 +1,11 @@
+2008-06-01  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	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  <tujikawa at rednoah dot com>
 
 	Added epoll support. Use epoll if it is available. If not, use select.

+ 5 - 0
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 ");