X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpngsize.c;h=f74a71851bc2a5b57dd9faa2d817f1bfbc546f15;hb=31b44f6c4b0208dd2e7f75a21d683dfdfa96a6e9;hp=18e89c53300fcf639d44d896899797f7a2823db0;hpb=2a6a270edfda89b04722b42b57992907f871c671;p=rrdtool.git diff --git a/src/pngsize.c b/src/pngsize.c index 18e89c5..f74a718 100644 --- a/src/pngsize.c +++ b/src/pngsize.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.23 Copyright by Tobi Oetiker, 1997-2007 + * RRDtool 1.3.1 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * pngsize.c determine the size of a PNG image *****************************************************************************/ @@ -27,11 +27,18 @@ int PngSize( /* 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 +# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) +#endif +#endif - if (setjmp(png_read_ptr->jmpbuf)) { + if (setjmp(png_jmpbuf(png_read_ptr))) { png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp) NULL); return 0; }