1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
$NetBSD: patch-af,v 1.1 2011/01/13 17:14:43 wiz Exp $
Fix build with png-1.5.
--- gdk-pixbuf/io-png.c.orig 2010-07-10 00:54:35.000000000 +0000
+++ gdk-pixbuf/io-png.c
@@ -183,7 +183,11 @@ png_simple_error_callback(png_structp pn
error_msg);
}
+#if (PNG_LIBPNG_VER < 10500)
longjmp (png_save_ptr->jmpbuf, 1);
+#else
+ png_longjmp (png_save_ptr, 1);
+#endif
}
static void
@@ -287,7 +291,7 @@ gdk_pixbuf__png_image_load (FILE *f, GEr
return NULL;
}
- if (setjmp (png_ptr->jmpbuf)) {
+ if (setjmp (png_jmpbuf(png_ptr))) {
g_free (rows);
if (pixbuf)
@@ -459,7 +463,7 @@ gdk_pixbuf__png_image_begin_load (GdkPix
return NULL;
}
- if (setjmp (lc->png_read_ptr->jmpbuf)) {
+ if (setjmp (png_jmpbuf(lc->png_read_ptr))) {
if (lc->png_info_ptr)
png_destroy_read_struct(&lc->png_read_ptr, NULL, NULL);
g_free(lc);
@@ -531,7 +535,7 @@ gdk_pixbuf__png_image_load_increment(gpo
lc->error = error;
/* Invokes our callbacks as needed */
- if (setjmp (lc->png_read_ptr->jmpbuf)) {
+ if (setjmp (png_jmpbuf(lc->png_read_ptr))) {
lc->error = NULL;
return FALSE;
} else {
@@ -654,7 +658,7 @@ png_info_callback (png_structp png_rea
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,
_("Insufficient memory to store a %ld by %ld image; try exiting some applications to reduce memory usage"),
- width, height);
+ (long)width, (long)height);
}
return;
}
@@ -769,7 +773,11 @@ png_error_callback(png_structp png_read_
error_msg);
}
+#if (PNG_LIBPNG_VER < 10500)
longjmp (png_read_ptr->jmpbuf, 1);
+#else
+ png_longjmp (png_read_ptr, 1);
+#endif
}
static void
@@ -978,7 +986,7 @@ static gboolean real_save_png (GdkPixbuf
success = FALSE;
goto cleanup;
}
- if (setjmp (png_ptr->jmpbuf)) {
+ if (setjmp (png_jmpbuf(png_ptr))) {
success = FALSE;
goto cleanup;
}
|