bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#7908: png-1.5 fix for emacs-23.2 and HEAD


From: Eli Zaretskii
Subject: bug#7908: png-1.5 fix for emacs-23.2 and HEAD
Date: Sat, 29 Jan 2011 21:02:09 +0200

> From: Chong Yidong <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Sat, 29 Jan 2011 13:29:32 -0500
> 
> Eli Zaretskii <address@hidden> 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 via email to

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