Mercurial > hg > xemacs-beta
changeset 4682:648f4a0dac3e
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>.
author | Jerry James <james@xemacs.org> |
---|---|
date | Mon, 24 Aug 2009 15:21:21 -0600 |
parents | 64ac4337298b |
children | 0cc9d22c3732 |
files | src/ChangeLog src/glyphs-eimage.c src/lisp.h |
diffstat | 3 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 <james@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@parhasard.net> * floatfns.c (ROUNDING_CONVERT, CONVERT_WITH_NUMBER_TYPES)
--- 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
--- 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