diff options
author | François Revel <mmu_man@netsurf-browser.org> | 2010-02-17 22:25:03 +0000 |
---|---|---|
committer | François Revel <mmu_man@netsurf-browser.org> | 2010-02-17 22:25:03 +0000 |
commit | 093d9567f1e37c8375985a0ed497d4e9ec26049f (patch) | |
tree | 53f9cc053af944f4cdcdbf14f6b48d03a4a575b2 /image/png.c | |
parent | da54611fb64287eca1898edf809f1c627a91558a (diff) | |
download | netsurf-093d9567f1e37c8375985a0ed497d4e9ec26049f.tar.gz netsurf-093d9567f1e37c8375985a0ed497d4e9ec26049f.tar.bz2 |
Accomodate for antique versions of libpng (as found with the BeOS R5 devkit), which either:
- don't define the png_jmpbuf macro,
- have a different name for png_set_expand_gray_1_2_4_to_8().
svn path=/trunk/netsurf/; revision=10069
Diffstat (limited to 'image/png.c')
-rw-r--r-- | image/png.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/image/png.c b/image/png.c index 4fe7c982a..e8bd55c59 100644 --- a/image/png.c +++ b/image/png.c @@ -40,6 +40,17 @@ #ifdef WITH_PNG +/* accomodate for old versions of libpng (beware security holes!) */ + +#ifndef png_jmpbuf +#warning you have an antique libpng +#define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) +#endif + +#if PNG_LIBPNG_VER < 10209 +#define png_set_expand_gray_1_2_4_to_8(png) png_set_gray_1_2_4_to_8(png) +#endif + /* I hate doing this, but without g_strdup_printf or similar, we're a tad stuck. */ #define NSPNG_TITLE_LEN (100) |