X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpngsize.c;h=1a7b4378948d818ca6de1897eb6c66acfc51da9a;hb=c24cf5317f753d0bfb376835b4f907462a770384;hp=1705fc8cc7d14cf7d1c72300bcf85eeb1a331f00;hpb=7383625ce0413ce5dbcc0ced4ee4873c6df37735;p=rrdtool.git diff --git a/src/pngsize.c b/src/pngsize.c index 1705fc8..1a7b437 100644 --- a/src/pngsize.c +++ b/src/pngsize.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.99907080300 Copyright by Tobi Oetiker, 1997-2007 + * RRDtool 1.3rc9 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 */ -#ifdef jmpbuf -#undef 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 #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; }