[svn:parrot] r40157 - trunk/config/gen/platform/generic

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Sun Jul 19 17:44:48 UTC 2009


Author: whiteknight
Date: Sun Jul 19 17:44:47 2009
New Revision: 40157
URL: https://trac.parrot.org/parrot/changeset/40157

Log:
[win64] commit a small fix, probably in the worst possible way, to account for the fact that LLONG_MAX and LLONG_MIN don't appear to be defined in 64-bit cl.exe

Modified:
   trunk/config/gen/platform/generic/platform_limits.h

Modified: trunk/config/gen/platform/generic/platform_limits.h
==============================================================================
--- trunk/config/gen/platform/generic/platform_limits.h	Sun Jul 19 16:47:49 2009	(r40156)
+++ trunk/config/gen/platform/generic/platform_limits.h	Sun Jul 19 17:44:47 2009	(r40157)
@@ -9,10 +9,24 @@
 /*
  * Define the values for PARROT_INTVAL_MAX and PARROT_INTVAL_MIN
  * in platforms that does no have limits.h or gives wrong values.
- * The generic versions assumes limits.h availability,
- * and does nothing.
+ * The generic versions assumes limits.h availability.
  */
 
+/* LLONG_MAX doesn't appear to be provided for some compilers of Win64, so
+   try to define them here. */
+#ifdef _MSC_VER
+#  ifndef LLONG_MAX
+#    ifdef _I64_MAX
+#      define LLONG_MAX _I64_MAX
+#    endif
+#  endif
+#  ifndef LLONG_MIN
+#    ifdef _I64_MIN
+#      define LLONG_MIN _I64_MIN
+#    endif
+#  endif
+#endif
+
 #endif /* PARROT_PLATFORM_GENERIC_PLATFORM_LIMITS_GUARD */
 
 /*


More information about the parrot-commits mailing list