From 092f5b30b7d9c449a1cad23df10c7e98a57661de Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 8 Jun 2008 16:23:39 +0000 Subject: [PATCH] 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@1409 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/pngsize.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/program/src/pngsize.c b/program/src/pngsize.c index 7cdf6c18..0f8fd8bf 100644 --- a/program/src/pngsize.c +++ b/program/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))) { -- 2.30.2