Selaa lähdekoodia

* common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a
compiler
does not define these macros.

Tatsuhiro Tsujikawa 19 vuotta sitten
vanhempi
commit
d770d1c40a
2 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  1. 2 0
      ChangeLog
  2. 5 0
      src/common.h

+ 2 - 0
ChangeLog

@@ -12,6 +12,8 @@
 	* DownloadCommand.h: added #include directive of sys/time.h.
 	* *.h: added #include directive of common.h to all base classes.
 	subclasses' one was removed.
+	* common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
+	does not define these macros.
 	
 2006-02-23  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 

+ 5 - 0
src/common.h

@@ -26,4 +26,9 @@
 # include <config.h>
 #endif
 
+#ifndef LONG_LONG_MAX
+# define LONG_LONG_MAX      9223372036854775807LL
+# define LONG_LONG_MIN      (-LONG_LONG_MAX - 1LL)
+#endif // LONG_LONG_MAX
+
 using namespace std;