# HG changeset patch # User Jerry James # Date 1251148881 21600 # Node ID 648f4a0dac3ed2748ec5c817ea8c282408c8cdcf # Parent 64ac4337298bff098cb1b229d8b7e5b05b0023ac Fix build problems on WIN32 platforms caused by the large image crash fix. See the thread on xemacs-patches@xemacs.org beginning with message <20a807210907081256y6c02f4bbv72d34c9f3c72ab02@mail.gmail.com>. diff -r 64ac4337298b -r 648f4a0dac3e src/ChangeLog --- a/src/ChangeLog Wed Aug 19 23:06:32 2009 +1000 +++ b/src/ChangeLog Mon Aug 24 15:21:21 2009 -0600 @@ -1,3 +1,10 @@ +2009-08-24 Jerry James + + * 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 * floatfns.c (ROUNDING_CONVERT, CONVERT_WITH_NUMBER_TYPES) diff -r 64ac4337298b -r 648f4a0dac3e 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:21:21 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 -r 648f4a0dac3e src/lisp.h --- a/src/lisp.h Wed Aug 19 23:06:32 2009 +1000 +++ b/src/lisp.h Mon Aug 24 15:21:21 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