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.2.29~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b29d0efca5c5bbfa1ad1553a19c18bd9e86d47f4;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/branches/1.2/program@1409 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/pngsize.c b/src/pngsize.c index c9254d48..eb12596c 100644 --- a/src/pngsize.c +++ b/src/pngsize.c @@ -25,12 +25,16 @@ PngSize(FILE *fd, long *width, long *height) /* this is to make compile on aix work since they seem to define jmpbuf to be _jmpbuf which breaks compilation */ + +#ifndef png_jmpbuf +#ifdef PNG_SETJMP_SUPPORTED +# define png_jmpbuf(png_ptr) ((png_ptr)->PNG_jmpbuf) +#else #ifdef jmpbuf #undef jmpbuf #endif - -#ifndef png_jmpbuf # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) +#endif #endif if (setjmp(png_jmpbuf(png_read_ptr))){