unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 7908@debbugs.gnu.org, tk@giga.or.at
Subject: bug#7908: png-1.5 fix for emacs-23.2 and HEAD
Date: Sat, 29 Jan 2011 21:02:09 +0200	[thread overview]
Message-ID: <831v3vh6tq.fsf@gnu.org> (raw)
In-Reply-To: <87ipx7y35f.fsf@stupidchicken.com>

> From: Chong Yidong <cyd@stupidchicken.com>
> Cc: tk@giga.or.at, 7908@debbugs.gnu.org
> Date: Sat, 29 Jan 2011 13:29:32 -0500
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Sorry, I used an old patch.  But with this line corrected, the
> > compilation still fails with the same error message.
> >
> > (I'm using libpng 1.4.x here, but I modified the #ifdef conditionals
> > to make the new code in effect on 1.4.x.  Maybe that's the reason for
> > the difference?)
> 
> Yeah, it makes a big difference.  png_set_longjmp_fn is new to
> libpng-1.5, it's the new non-backward compatible way to access the png
> jmpbuf.

But I do see png_set_longjmp_fn in png.h from libpng 1.4.3:

  #ifdef PNG_SETJMP_SUPPORTED
  /* This function returns the jmp_buf built in to *png_ptr.  It must be
   * supplied with an appropriate 'longjmp' function to use on that jmp_buf
   * unless the default error function is overridden in which case NULL is
   * acceptable.  The size of the jmp_buf is checked against the actual size
   * allocated by the library - the call will return NULL on a mismatch
   * indicating an ABI mismatch.
   */
  extern PNG_EXPORT(jmp_buf*, png_set_longjmp_fn)
     PNGARG((png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t
	 jmp_buf_size));
  #  define png_jmpbuf(png_ptr) \
     (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))
  #else
  #  define png_jmpbuf(png_ptr) \
     (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP)
  #endif

Could it be that image.c compiles for you on GNU/Linux because
DEF_IMGLIB_FN and LOAD_IMGLIB_FN are not compiled except on Windows?

> If it's too much trouble for you to install libpng 1.5 on Windows, I
> think I'll go ahead and commit the patch.

There's no Windows port of libpng 1.5 yet, but I will at least try
compiling with the headers from there.

> The way the conditionals are now written, compilation with libpng
> 1.4 is unaffected, so it should be very safe.

Yes, but if we want Emacs 23.3 to be stable until Emacs 24.1 is
released, we better make it compatible with libpng 1.4.x.  So I'd
prefer that you wait until we understand this issue, if not resolve
it.  Thanks.





  reply	other threads:[~2011-01-29 19:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-24 12:54 bug#7908: png-1.5 fix for emacs-23.2 and HEAD Thomas Klausner
2011-01-24 17:43 ` Eli Zaretskii
2011-01-24 21:59   ` Thomas Klausner
2011-01-25  3:49     ` Eli Zaretskii
2011-01-25  7:18       ` Thomas Klausner
2011-01-25 10:53         ` Eli Zaretskii
2011-01-25 11:29           ` Thomas Klausner
2011-01-25 20:57       ` Chong Yidong
2011-01-25 21:09         ` Chong Yidong
2011-01-25 21:56         ` Eli Zaretskii
2011-01-25 23:35           ` Chong Yidong
2011-01-29 13:54         ` Eli Zaretskii
2011-01-29 15:44           ` Chong Yidong
2011-01-29 16:16             ` Eli Zaretskii
2011-01-29 18:29               ` Chong Yidong
2011-01-29 19:02                 ` Eli Zaretskii [this message]
2011-01-29 19:50                   ` Eli Zaretskii
2011-01-29 20:33                     ` Chong Yidong
2011-01-29 20:46                       ` Eli Zaretskii
2011-01-29 21:29                         ` Chong Yidong
2011-01-29 22:03                       ` Andreas Schwab
2011-01-29 22:27                         ` Chong Yidong
2011-01-30  0:00                           ` Andreas Schwab

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=831v3vh6tq.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=7908@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=tk@giga.or.at \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).