From: Tobias Oetiker Date: Sun, 8 Jun 2008 16:23:39 +0000 (+0000) Subject: fix for ticket #121 jmpbuf on aix is a problem it seems, maybe this makes it better. X-Git-Tag: 1.3rc9~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32919acfa4cab395765d7cc59e2d3d4543b8ca5d;p=thirdparty%2Frrdtool-1.x.git fix for ticket #121 jmpbuf on aix is a problem it seems, maybe this makes it better. git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1409 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/pngsize.c b/src/pngsize.c index 7cdf6c18..0f8fd8bf 100644 --- a/src/pngsize.c +++ b/src/pngsize.c @@ -27,12 +27,15 @@ int PngSize( /* 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 +#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 #endif if (setjmp(png_jmpbuf(png_read_ptr))) {