APPROVE COMMIT 21.5
This patch should fix the compilation problems introduced on WIN32
platforms by the large image crash fix. Let me know if any other
problems are encountered.
diff -r 64ac4337298b src/ChangeLog
--- a/src/ChangeLog Wed Aug 19 23:06:32 2009 +1000
+++ b/src/ChangeLog Mon Aug 24 15:16:48 2009 -0600
@@ -1,3 +1,10 @@
+2009-08-24 Jerry James <james(a)xemacs.org>
+
+ * lisp.h (INT_64_BIT): define as __int64 on WIN32.
+ * glyphs-eimage.c (tiff_instantiate): cast argument of
+ xnew_binbytes to size_t (guaranteed to fit because of immediately
+ preceding check).
+
2009-08-11 Aidan Kehoe <kehoea(a)parhasard.net>
* floatfns.c (ROUNDING_CONVERT, CONVERT_WITH_NUMBER_TYPES)
diff -r 64ac4337298b src/glyphs-eimage.c
--- a/src/glyphs-eimage.c Wed Aug 19 23:06:32 2009 +1000
+++ b/src/glyphs-eimage.c Mon Aug 24 15:16:48 2009 -0600
@@ -1337,7 +1337,7 @@
pixels_sq = (UINT_64_BIT) width * (UINT_64_BIT) height;
if (pixels_sq >= 1 << 29)
signal_image_error ("TIFF image too large to instantiate",
instantiator);
- unwind.eimage = xnew_binbytes (pixels_sq * 3);
+ unwind.eimage = xnew_binbytes ((size_t) pixels_sq * 3);
/* #### This is little more than proof-of-concept/function testing.
It needs to be reimplemented via scanline reads for both memory
diff -r 64ac4337298b src/lisp.h
--- a/src/lisp.h Wed Aug 19 23:06:32 2009 +1000
+++ b/src/lisp.h Mon Aug 24 15:16:48 2009 -0600
@@ -210,6 +210,10 @@
#define INT_64_BIT long long
#define UINT_64_BIT unsigned long long
#define MAKE_64_BIT_UNSIGNED_CONSTANT(num) num##ULL
+#elif defined(WIN32_ANY)
+#define INT_64_BIT __int64
+#define UINT_64_BIT unsigned __int64
+#define MAKE_64_BIT_UNSIGNED_CONSTANT(num) num##UI64
/* No error otherwise; just leave undefined */
#endif
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches