discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: png Error while linking gui


From: Riccardo Mottola
Subject: Re: png Error while linking gui
Date: Thu, 21 Feb 2013 11:08:02 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15.2

Hi Fred,

Fred Kiefer wrote:
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>

In you changelog entry you stated that your change would work for libpng 1.6, but as far as I can see that function is gone for that release. Did you mean 1.5 instead?

I reverted you change and replace it with something that should work with libpng 1.6 as well. I think that the call to png_info_init_3() was never needed, but left it in to not break older libraries.
I am working on 1.6... and the patch does indeed that: since 1.2 at least png_sizeof() was defined to sizeof() exactly as in my small patch. In 1.6 they removed this, thus my patch checked for the symbol and declared it back, it has always been a commodity macro anyway. It is just a stop-gap solution, but it worked and compiled for me. i thought tis was the minimum impact.
Why do you think it did not work?

Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]