[BUGFIX] SILLY and libpng15

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

Undefined
Just popping in
Just popping in
Posts: 2
Joined: Wed Dec 31, 2008 15:28

[BUGFIX] SILLY and libpng15

Postby Undefined » Sun Feb 19, 2012 21:05

Here is my Patch for Building SILLIY-0.1.0 with libpng15

Code: Select all

/**
* @file   silly-0.1.0-libpng15.diff
* @since  Sun Feb 19 21:56:58 CET 2012
* @short  diff options:-Nau6
*/
--- ./src/loaders/SILLYPNGImageLoader.cpp.orig   2012-02-19 21:48:21.827658990 +0100
+++ ./src/loaders/SILLYPNGImageLoader.cpp   2012-02-19 21:56:21.368577116 +0100
@@ -38,12 +38,14 @@
 #include "loaders/SILLYPNGImageLoader.icpp"
 #undef inline
 #endif
 
 #include "loaders/SILLYPNGImageContext.h"
 #include <png.h>
+#include <zlib.h>
+
 // Start section of namespace SILLY
 namespace SILLY
 {
 void PNG_read_function(png_structp png_ptr, png_bytep data, png_size_t length)
 {
     PNGImageContext* png = reinterpret_cast<PNGImageContext*>(png_get_io_ptr(png_ptr));
@@ -63,13 +65,13 @@
 void PNG_error_function(png_structp png_ptr,
                         png_const_charp error)
 {
     //  printf("PNG Error: %s\n", error);
     // copied from libpng's pngerror.cpp
     jmp_buf buf;
-    memcpy(buf, png_ptr->jmpbuf, sizeof(jmp_buf));
+    memcpy(buf, png_jmpbuf(png_ptr), sizeof(jmp_buf));
     longjmp(buf, 1);
 }
 
 
 PNGImageLoader::PNGImageLoader()
     : ImageLoader("PNG Image Loader based on libpng")

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: [BUGFIX] SILLY and libpng15

Postby CrazyEddie » Mon Feb 20, 2012 11:54

Thanks, I'll check it out soon.

CE.

PaddyMac
Just popping in
Just popping in
Posts: 7
Joined: Sun Feb 19, 2012 23:59

Re: [BUGFIX] SILLY and libpng15

Postby PaddyMac » Tue Feb 21, 2012 03:56

Although I have not yet had an opportunity to actually use Silly, I can verify that Silly does compile with libpng 1.5.8 with this patch applied.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: [BUGFIX] SILLY and libpng15

Postby CrazyEddie » Tue Feb 21, 2012 08:40

Thanks for confirming it works for you.

CE.

KishukuOni
Not too shy to talk
Not too shy to talk
Posts: 25
Joined: Wed Nov 25, 2009 17:41

Re: [BUGFIX] SILLY and libpng15

Postby KishukuOni » Tue Feb 21, 2012 15:26

I ran into the exact same thing oven the weekend. I also like Undefined's patch better than what I came up with.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 2 guests