--- tools/inc/gen.hxx	2005-09-09 15:41:09.000000000 +0200
+++ tools/inc/gen.hxx	2007-02-26 17:08:21.000000000 +0100
@@ -254,8 +254,8 @@ inline Size::Size( long nWidth, long nHe
 // - Range -
 // ---------
 
-#define RANGE_MIN	((long)0x80000000L)
-#define RANGE_MAX	0x7FFFFFFFL
+#define RANGE_MIN	LONG_MIN
+#define RANGE_MAX	LONG_MAX
 
 class Range : public Pair
 {
@@ -302,8 +302,8 @@ inline void Range::Justify()
 // - Selection -
 // -------------
 
-#define SELECTION_MIN	((long)0x80000000L)
-#define SELECTION_MAX	0x7FFFFFFFL
+#define SELECTION_MIN	LONG_MIN
+#define SELECTION_MAX	LONG_MAX
 
 class Selection : public Pair
 {
