r10069 mmu_man - /trunk/netsurf/image/png.c

netsurf at semichrome.net netsurf at semichrome.net
Wed Feb 17 22:25:04 GMT 2010


Author: mmu_man
Date: Wed Feb 17 16:25:03 2010
New Revision: 10069

URL: http://source.netsurf-browser.org?rev=10069&view=rev
Log:
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().

Modified:
    trunk/netsurf/image/png.c

Modified: trunk/netsurf/image/png.c
URL: http://source.netsurf-browser.org/trunk/netsurf/image/png.c?rev=10069&r1=10068&r2=10069&view=diff
==============================================================================
--- trunk/netsurf/image/png.c (original)
+++ trunk/netsurf/image/png.c Wed Feb 17 16:25:03 2010
@@ -39,6 +39,17 @@
 #include "utils/utils.h"
 
 #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)




More information about the netsurf-commits mailing list