projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix for ticket #121 jmpbuf on aix is a problem it seems, maybe this makes it better.
[rrdtool.git]
/
src
/
pngsize.c
diff --git
a/src/pngsize.c
b/src/pngsize.c
index
7cdf6c1
..
0f8fd8b
100644
(file)
--- a/
src/pngsize.c
+++ b/
src/pngsize.c
@@
-27,13
+27,16
@@
int PngSize(
/* this is to make compile on aix work since they seem to define jmpbuf
to be _jmpbuf which breaks compilation */
/* this is to make compile on aix work since they seem to define jmpbuf
to be _jmpbuf which breaks compilation */
-#ifdef jmpbuf
-#undef jmpbuf
-#endif
-
#ifndef png_jmpbuf
#ifndef png_jmpbuf
+#ifdef PNG_SETJMP_SUPPORTED
+# define png_jmpbuf(png_ptr) ((png_ptr)->PNG_jmpbuf)
+#else
+#ifdef jmpbuf
+#undef jmpbuf
+#endif
# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
#endif
# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
#endif
+#endif
if (setjmp(png_jmpbuf(png_read_ptr))) {
png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp) NULL);
if (setjmp(png_jmpbuf(png_read_ptr))) {
png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp) NULL);