summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0338569)
raw | patch | inline | side by side (parent: 0338569)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 15 Nov 2007 14:32:37 +0000 (14:32 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 15 Nov 2007 14:32:37 +0000 (14:32 +0000) |
program/src/pngsize.c | patch | blob | history |
diff --git a/program/src/pngsize.c b/program/src/pngsize.c
index 1705fc8cc7d14cf7d1c72300bcf85eeb1a331f00..59e2003f00c404722a5e13b519c28be0a72c948f 100644 (file)
--- a/program/src/pngsize.c
+++ b/program/src/pngsize.c
#undef jmpbuf
#endif
- if (setjmp(png_read_ptr->jmpbuf)) {
- png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp) NULL);
- return 0;
- }
+#ifndef png_jmpbuf
+# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
+#endif
+
+ if (setjmp(png_jmpbuf(png_read_ptr))){
+ png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp)NULL);
+ return 0;
+ }
png_init_io(png_read_ptr, fd);
png_read_info(png_read_ptr, info_ptr);