all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Herbert J. Skuhra" <h.skuhra@gmail.com>
To: emacs-devel@gnu.org
Subject: libpng 1.4.x
Date: Sun, 24 Jan 2010 23:25:50 +0100	[thread overview]
Message-ID: <4b5cc8ee.1ade660a.555e.64d2@mx.google.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 439 bytes --]

Hi!

I am running Arch Linux with testing repositories enabled.
Recently libpng was updated to 1.4.0 and now Emacs no longer builds.

There is a patch availabe (by Eric Bélanger):

http://repos.archlinux.org/wsvn/packages/emacs/trunk/libpng14.patch

I slightly modified the patch so that it only applies to libpng-1.4.x,
although it seems that it also works for libpng-1.2.x.

Is there a better fix?

Thanks.

-Herbert


[-- Attachment #2: emacs_src_image_c.diff --]
[-- Type: application/octet-stream, Size: 1820 bytes --]

--- src/image.c.orig	2010-01-24 21:50:22.802800276 +0100
+++ src/image.c	2010-01-24 23:07:24.265671586 +0100
@@ -5559,7 +5559,11 @@
 /* PNG library details.  */
 
 DEF_IMGLIB_FN (png_get_io_ptr);
+#if PNG_LIBPNG_VER >= 10400
+DEF_IMGLIB_FN (png_sig_cmp);
+#else
 DEF_IMGLIB_FN (png_check_sig);
+#endif
 DEF_IMGLIB_FN (png_create_read_struct);
 DEF_IMGLIB_FN (png_create_info_struct);
 DEF_IMGLIB_FN (png_destroy_read_struct);
@@ -5590,7 +5594,11 @@
     return 0;
 
   LOAD_IMGLIB_FN (library, png_get_io_ptr);
+#if PNG_LIBPNG_VER >= 10400
+  LOAD_IMGLIB_FN (library, png_sig_cmp);
+#else
   LOAD_IMGLIB_FN (library, png_check_sig);
+#endif
   LOAD_IMGLIB_FN (library, png_create_read_struct);
   LOAD_IMGLIB_FN (library, png_create_info_struct);
   LOAD_IMGLIB_FN (library, png_destroy_read_struct);
@@ -5615,7 +5623,11 @@
 #else
 
 #define fn_png_get_io_ptr		png_get_io_ptr
+#if PNG_LIBPNG_VER >= 10400
+#define fn_png_sig_cmp                png_sig_cmp
+#else
 #define fn_png_check_sig		png_check_sig
+#endif
 #define fn_png_create_read_struct	png_create_read_struct
 #define fn_png_create_info_struct	png_create_info_struct
 #define fn_png_destroy_read_struct	png_destroy_read_struct
@@ -5762,7 +5774,11 @@
 
       /* Check PNG signature.  */
       if (fread (sig, 1, sizeof sig, fp) != sizeof sig
+#if PNG_LIBPNG_VER >= 10400
+	  || fn_png_sig_cmp (sig, 0, sizeof sig))
+#else
 	  || !fn_png_check_sig (sig, sizeof sig))
+#endif
 	{
 	  image_error ("Not a PNG file: `%s'", file, Qnil);
 	  UNGCPRO;
@@ -5779,7 +5795,11 @@
 
       /* Check PNG signature.  */
       if (tbr.len < sizeof sig
+#if PNG_LIBPNG_VER >= 10400
+	  || fn_png_sig_cmp (tbr.bytes, 0, sizeof sig))
+#else
 	  || !fn_png_check_sig (tbr.bytes, sizeof sig))
+#endif
 	{
 	  image_error ("Not a PNG image: `%s'", img->spec, Qnil);
 	  UNGCPRO;

[-- Attachment #3: Type: text/plain, Size: 1 bytes --]



             reply	other threads:[~2010-01-24 22:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-24 22:25 Herbert J. Skuhra [this message]
2010-01-24 23:06 ` libpng 1.4.x Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4b5cc8ee.1ade660a.555e.64d2@mx.google.com \
    --to=h.skuhra@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.