aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2011-01-03 21:32:41 +0200
committerEli Zaretskii2011-01-03 21:32:41 +0200
commitfb724e553757e9d3344be443ab5f329afc9bf91c (patch)
tree6096358a396dbc98cd20a353bba99c53fa5a32c6
parent97382176bd803d6b0ef43d36b176859f374d2b8e (diff)
downloademacs-fb724e553757e9d3344be443ab5f329afc9bf91c.tar.gz
emacs-fb724e553757e9d3344be443ab5f329afc9bf91c.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.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/image.c10
2 files changed, 7 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 17952ed10b2..f947b5aeef6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12011-01-03 Eli Zaretskii <eliz@gnu.org>
2
3 * image.c (png_jmpbuf): Remove definition.
4 (my_png_error, png_load): Don't use png_jmpbuf.
5
12010-12-31 Eli Zaretskii <eliz@gnu.org> 62010-12-31 Eli Zaretskii <eliz@gnu.org>
2 7
3 * image.c <Qlibpng_version>: New variable. 8 * image.c <Qlibpng_version>: New variable.
diff --git a/src/image.c b/src/image.c
index 070ed32d59b..8dcd2da67d4 100644
--- a/src/image.c
+++ b/src/image.c
@@ -5648,12 +5648,6 @@ init_png_functions (Lisp_Object libraries)
5648 5648
5649#endif /* HAVE_NTGUI */ 5649#endif /* HAVE_NTGUI */
5650 5650
5651/* libpng before 1.4.0 didn't have png_jmpbuf; v1.4.0 and later
5652 deprecate direct access to png_ptr fields. */
5653#ifndef png_jmpbuf
5654# define png_jmpbuf(PTR) ((PTR)->jmpbuf)
5655#endif
5656
5657/* Error and warning handlers installed when the PNG library 5651/* Error and warning handlers installed when the PNG library
5658 is initialized. */ 5652 is initialized. */
5659 5653
@@ -5666,7 +5660,7 @@ my_png_error (png_ptr, msg)
5666 /* Avoid compiler warning about deprecated direct access to 5660 /* Avoid compiler warning about deprecated direct access to
5667 png_ptr's fields in libpng versions 1.4.x. */ 5661 png_ptr's fields in libpng versions 1.4.x. */
5668 image_error ("PNG error: %s", build_string (msg), Qnil); 5662 image_error ("PNG error: %s", build_string (msg), Qnil);
5669 longjmp (png_jmpbuf (png_ptr), 1); 5663 longjmp (png_ptr->jmpbuf, 1);
5670} 5664}
5671 5665
5672 5666
@@ -5842,7 +5836,7 @@ png_load (f, img)
5842 5836
5843 /* Set error jump-back. We come back here when the PNG library 5837 /* Set error jump-back. We come back here when the PNG library
5844 detects an error. */ 5838 detects an error. */
5845 if (setjmp (png_jmpbuf (png_ptr))) 5839 if (setjmp (png_ptr->jmpbuf))
5846 { 5840 {
5847 error: 5841 error:
5848 if (png_ptr) 5842 if (png_ptr)