diff options
| author | Eli Zaretskii | 2011-01-03 21:35:59 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2011-01-03 21:35:59 +0200 |
| commit | d82bce4a05766f18d2087cea845072a444780dcb (patch) | |
| tree | 6daa221e091f20b86617f349cab9ff1916d32626 /src/image.c | |
| parent | b173bdd92ffc4fcb558110719c2b1946dac9b020 (diff) | |
| download | emacs-d82bce4a05766f18d2087cea845072a444780dcb.tar.gz emacs-d82bce4a05766f18d2087cea845072a444780dcb.zip | |
Don't use png_jmpbuf, it doesn't work with dynamic loading.
image.c (png_jmpbuf): Remove definition.
(my_png_error, png_load): Don't use png_jmpbuf.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/image.c b/src/image.c index 41c9cb8f534..edfa208dd29 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -5528,12 +5528,6 @@ init_png_functions (Lisp_Object libraries) | |||
| 5528 | 5528 | ||
| 5529 | #endif /* HAVE_NTGUI */ | 5529 | #endif /* HAVE_NTGUI */ |
| 5530 | 5530 | ||
| 5531 | /* libpng before 1.4.0 didn't have png_jmpbuf; v1.4.0 and later | ||
| 5532 | deprecate direct access to png_ptr fields. */ | ||
| 5533 | #ifndef png_jmpbuf | ||
| 5534 | # define png_jmpbuf(PTR) ((PTR)->jmpbuf) | ||
| 5535 | #endif | ||
| 5536 | |||
| 5537 | /* Error and warning handlers installed when the PNG library | 5531 | /* Error and warning handlers installed when the PNG library |
| 5538 | is initialized. */ | 5532 | is initialized. */ |
| 5539 | 5533 | ||
| @@ -5544,7 +5538,7 @@ my_png_error (png_struct *png_ptr, const char *msg) | |||
| 5544 | /* Avoid compiler warning about deprecated direct access to | 5538 | /* Avoid compiler warning about deprecated direct access to |
| 5545 | png_ptr's fields in libpng versions 1.4.x. */ | 5539 | png_ptr's fields in libpng versions 1.4.x. */ |
| 5546 | image_error ("PNG error: %s", build_string (msg), Qnil); | 5540 | image_error ("PNG error: %s", build_string (msg), Qnil); |
| 5547 | longjmp (png_jmpbuf (png_ptr), 1); | 5541 | longjmp (png_ptr->jmpbuf, 1); |
| 5548 | } | 5542 | } |
| 5549 | 5543 | ||
| 5550 | 5544 | ||
| @@ -5706,7 +5700,7 @@ png_load (struct frame *f, struct image *img) | |||
| 5706 | 5700 | ||
| 5707 | /* Set error jump-back. We come back here when the PNG library | 5701 | /* Set error jump-back. We come back here when the PNG library |
| 5708 | detects an error. */ | 5702 | detects an error. */ |
| 5709 | if (setjmp (png_jmpbuf (png_ptr))) | 5703 | if (setjmp (png_ptr->jmpbuf)) |
| 5710 | { | 5704 | { |
| 5711 | error: | 5705 | error: |
| 5712 | if (png_ptr) | 5706 | if (png_ptr) |