diff options
| author | Juanma Barranquero | 2004-06-02 00:50:09 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2004-06-02 00:50:09 +0000 |
| commit | b0da69a77b64c420c6e6157ee1ca0baac29fcd8d (patch) | |
| tree | f47fb2fb4be79eb8be3b85487dc42ae68aee140f /src/image.c | |
| parent | 9857367f6fea924843d6adcde3528b98f334f787 (diff) | |
| download | emacs-b0da69a77b64c420c6e6157ee1ca0baac29fcd8d.tar.gz emacs-b0da69a77b64c420c6e6157ee1ca0baac29fcd8d.zip | |
Work around bugs/problems with MinGW builds of graphics libraries
called from MSVC builds of Emacs.
(lookup_image): Make pointer to img static.
(png_read_from_memory): Disable "global" optimization.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/image.c b/src/image.c index 700ab3fa2d9..3c53903b4b4 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -213,7 +213,7 @@ XDestroyImage (ximg) | |||
| 213 | { | 213 | { |
| 214 | UnlockPixels (GetGWorldPixMap (ximg)); | 214 | UnlockPixels (GetGWorldPixMap (ximg)); |
| 215 | } | 215 | } |
| 216 | #endif | 216 | #endif /* MAC_OS */ |
| 217 | 217 | ||
| 218 | 218 | ||
| 219 | /* Functions to access the contents of a bitmap, given an id. */ | 219 | /* Functions to access the contents of a bitmap, given an id. */ |
| @@ -1596,6 +1596,11 @@ lookup_image (f, spec) | |||
| 1596 | Lisp_Object spec; | 1596 | Lisp_Object spec; |
| 1597 | { | 1597 | { |
| 1598 | struct image_cache *c = FRAME_X_IMAGE_CACHE (f); | 1598 | struct image_cache *c = FRAME_X_IMAGE_CACHE (f); |
| 1599 | #ifdef _MSC_VER | ||
| 1600 | /* Work around a problem with MinGW builds of graphics libraries | ||
| 1601 | not honoring calling conventions. */ | ||
| 1602 | static | ||
| 1603 | #endif | ||
| 1599 | struct image *img; | 1604 | struct image *img; |
| 1600 | int i; | 1605 | int i; |
| 1601 | unsigned hash; | 1606 | unsigned hash; |
| @@ -4238,7 +4243,7 @@ xpm_load (f, img) | |||
| 4238 | } | 4243 | } |
| 4239 | 4244 | ||
| 4240 | #endif /* MAC_OS */ | 4245 | #endif /* MAC_OS */ |
| 4241 | 4246 | ||
| 4242 | 4247 | ||
| 4243 | 4248 | ||
| 4244 | /*********************************************************************** | 4249 | /*********************************************************************** |
| @@ -5688,6 +5693,12 @@ struct png_memory_storage | |||
| 5688 | PNG_PTR is a pointer to the PNG control structure. Copy LENGTH | 5693 | PNG_PTR is a pointer to the PNG control structure. Copy LENGTH |
| 5689 | bytes from the input to DATA. */ | 5694 | bytes from the input to DATA. */ |
| 5690 | 5695 | ||
| 5696 | #ifdef _MSC_VER | ||
| 5697 | /* Work around a problem with MinGW builds of graphics libraries | ||
| 5698 | not honoring calling conventions. */ | ||
| 5699 | #pragma optimize("g", off) | ||
| 5700 | #endif | ||
| 5701 | |||
| 5691 | static void | 5702 | static void |
| 5692 | png_read_from_memory (png_ptr, data, length) | 5703 | png_read_from_memory (png_ptr, data, length) |
| 5693 | png_structp png_ptr; | 5704 | png_structp png_ptr; |
| @@ -5704,6 +5715,11 @@ png_read_from_memory (png_ptr, data, length) | |||
| 5704 | tbr->index = tbr->index + length; | 5715 | tbr->index = tbr->index + length; |
| 5705 | } | 5716 | } |
| 5706 | 5717 | ||
| 5718 | #ifdef _MSC_VER | ||
| 5719 | /* Restore normal optimization, as specified on the command line. */ | ||
| 5720 | #pragma optimize("", on) | ||
| 5721 | #endif | ||
| 5722 | |||
| 5707 | /* Load PNG image IMG for use on frame F. Value is non-zero if | 5723 | /* Load PNG image IMG for use on frame F. Value is non-zero if |
| 5708 | successful. */ | 5724 | successful. */ |
| 5709 | 5725 | ||