libpng 1.5 compile fixes

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1270 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: daf195c662
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-03-07 (Mon, 07 Mar 2011)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2011-03-07 09:06:10 +00:00
parent 870458f45e
commit 7788d01a3a
2 changed files with 14 additions and 2 deletions

View File

@@ -52,7 +52,11 @@ int fh_png_load(const char *name,unsigned char **buffer,int* /*xp*/,int* /*yp*/)
return(FH_ERROR_FORMAT); return(FH_ERROR_FORMAT);
} }
#if (PNG_LIBPNG_VER < 10500)
if (setjmp(png_ptr->jmpbuf)) if (setjmp(png_ptr->jmpbuf))
#else
if (setjmp(png_jmpbuf(png_ptr)))
#endif
{ {
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
fclose(fh); fclose(fh);
@@ -145,7 +149,11 @@ int fh_png_getsize(const char *name,int *x,int *y, int /*wanted_width*/, int /*w
return(FH_ERROR_FORMAT); return(FH_ERROR_FORMAT);
} }
#if (PNG_LIBPNG_VER < 10500)
if (setjmp(png_ptr->jmpbuf)) if (setjmp(png_ptr->jmpbuf))
#else
if (setjmp(png_jmpbuf(png_ptr)))
#endif
{ {
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
fclose(fh); fclose(fh);

View File

@@ -454,7 +454,11 @@ bool CLCDDisplay::load_png(const char * const filename)
png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL); png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL);
else else
{ {
#if (PNG_LIBPNG_VER < 10500)
if (!(setjmp(png_ptr->jmpbuf))) if (!(setjmp(png_ptr->jmpbuf)))
#else
if (!setjmp(png_jmpbuf(png_ptr)))
#endif
{ {
png_init_io(png_ptr,fh); png_init_io(png_ptr,fh);