X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Fpngsize.c;h=6e55238461ef6d6250a4a026820d24f58ab5db0e;hp=919fe16f0cbb07cdc5c371a08a6afa2af07ed124;hb=75b8cf7a1eff3d24a8567f3209aa023ad4473e95;hpb=e1c12d5c14b4a716ea999204cedb13e98466ff15 diff --git a/src/pngsize.c b/src/pngsize.c index 919fe16..6e55238 100644 --- a/src/pngsize.c +++ b/src/pngsize.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.3rc3 Copyright by Tobi Oetiker, 1997-2008 + * RRDtool 1.3.2 Copyright by Tobi Oetiker, 1997-2008 ***************************************************************************** * 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);