Fix Windows SIZE_T_MAX definition.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Sun, 7 Apr 2013 08:12:30 +0000 (18:12 +1000)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Sun, 7 Apr 2013 08:12:35 +0000 (18:12 +1000)
Problem reported by Ulrich Klauer <ulrich@chirlu.de>.
Patch from Janne Hyvärinen <cse@sci.fi>.

include/share/alloc.h

index 8fc17f7..969209e 100644 (file)
 #ifndef SIZE_MAX
 # ifndef SIZE_T_MAX
 #  ifdef _MSC_VER
-#   define SIZE_T_MAX SIZE_MAX
+#   ifdef _WIN64
+#    define SIZE_T_MAX 0xffffffffffffffffui64
+#   else
+#    define SIZE_T_MAX 0xffffffff
+#   endif
 #  else
 #   error
 #  endif