GNOME Bugzilla – Bug 608643
libpng 1.4.x incompatibilities
Last modified: 2010-03-23 12:15:47 UTC
Created attachment 152703 [details] [review] gstgl patch libpng 1.4.0+ has removed some typedefs. I've attached a quick fix, but everywhere png_infopp_NULL and int_p_NULL appear should be substituted with NULL. But this patch does allow for backward compatibility.
commit eb3170e516b89e496f84bbd561d9d5aa468861ff Author: David Hoyt <dhoyt@llnl.gov> Date: Tue Mar 9 01:24:06 2010 +0100 glbumper/gldifferencematte/gloverlay: libpng 1.4.x compatible Fix bug #608643
I would argue against such fix in favor of using typecasts directly (such as "(png_infopp) NULL") instead of creating needless macros. libpng changelog from 1.0.x to 1.2.x says: Typecasted NULL definitions such as #define png_voidp_NULL (png_voidp)NULL were eliminated. If you used these in your application, just use NULL instead. That is, png_*_NULL macros are only useful for maintaining compatibility with pre-1.2.x versions of libpng, as these macros were dropped right in 1.2.0 (which came out roughly 9 years ago, in 2001).