On Wed, 20 Feb 2013 19:45:25 +0100, Sebastian Reitenbach
<sebastia@l00-bugdead-prods.de> wrote:
On Wednesday, February 20, 2013 18:36 CET, Riccardo Mottola
<riccardo.mottola@libero.it> wrote:
I upgraded libpng on NetBSD and now I cannot link gui anymore::
Making all for tool set_show_service...
Compiling file set_show_service.m ...
Linking tool set_show_service ...
../Source/./obj/libgnustep-gui.so: undefined reference to `png_sizeof'
gmake[4]: *** [obj/set_show_service] Error 1
I guess when compiling NSBitmapImageRep+PNG.m, you got a warning about
implicit declaration of function png_sizeof?
I have:
png-1.6.0nb1 Library for manipulating PNG images
looks as if the function was removed ? is anybody using this version of
libpng?
OpenBSD ships 1.5.10.
PNG 1.2 is the most widespread around. I will check what version my
NetBSD box has, which has also the oldest version of cairo we support,
so it would mace sense to about sync them.
http://refspecs.linuxfoundation.org/LSB_3.1.1/LSB-Desktop-generic/LSB-Desktop-generic/libpng12-ddefs.html
describes png_sizeof() as a macro
For now, during code-freeze, something like this should suffice:
Index: Source/NSBitmapImageRep+PNG.m
===================================================================
--- Source/NSBitmapImageRep+PNG.m (revision 36173)
+++ Source/NSBitmapImageRep+PNG.m (working copy)
@@ -48,6 +48,10 @@
#endif /* HAVE_LIBPNG */
+#if !defined png_sizeof
+#define png_sizeof(x) sizeof(x)
+#endif
+
/* we import all the standard headers to allow compilation without PNG */
#import <Foundation/NSData.h>
#import <Foundation/NSDictionary.h>