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: Fred Kiefer
Subject: Re: png Error while linking gui
Date: Fri, 22 Feb 2013 09:21:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2

On 21.02.2013 11:08, Riccardo Mottola wrote:
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?

You are right the code would still work on 1.6. The function png_info_init_3() has been deprecated there, but was only removed in 1.7. Did you get any warnings about other deprecated functions? We should pay more attention to these. I am on OpenSuse and they are traditionally very conservative with their choice of libraries. Just because things compile perfect for me, doesn't mean we are up to date.





reply via email to

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