X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Fpngsize.c;h=b8dc35ba67146cd207c752397ca5595dcee75917;hp=63315c90ac430df1d1ec680928b21330e8f73e3b;hb=2a9b0ff9cf29cf82b7b12ea80889c59273d66008;hpb=3d068765c6b6c8d096e0692f22e5b5e407948b54 diff --git a/src/pngsize.c b/src/pngsize.c index 63315c9..b8dc35b 100644 --- a/src/pngsize.c +++ b/src/pngsize.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc2 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.4.2 Copyright by Tobi Oetiker, 1997-2009 ***************************************************************************** * 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);