X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpngsize.c;h=b937a245dac028b9caf54285d4d25801e750ba0d;hb=81645751d54a976a0bd49cf87c0b88bd9623599d;hp=23dbce7d5cda53bd9eaf30fa0968a4ba6ba437ba;hpb=b894ebf96ca888b9e3e13b2ab86a6c6f284b757c;p=rrdtool.git diff --git a/src/pngsize.c b/src/pngsize.c index 23dbce7..b937a24 100644 --- a/src/pngsize.c +++ b/src/pngsize.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc5 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.4.3 Copyright by Tobi Oetiker, 1997-2010 ***************************************************************************** * pngsize.c determine the size of a PNG image *****************************************************************************/ @@ -27,13 +27,16 @@ 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 - -#ifndef png_jmpbuf # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) #endif +#endif if (setjmp(png_jmpbuf(png_read_ptr))) { png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp) NULL);