view src/gdk-pixbuf-1-fixes.patch @ 1612:10b34eba8a06

package gdk-pixbuf: libpng 1.5 compatibility
author Mark Brand <mabrand@mabrand.nl>
date Wed, 02 Mar 2011 22:07:17 +0100
parents ffb6a86b8f9a
children 861ed76f2041
line wrap: on
line source

This file is part of mingw-cross-env.
See doc/index.html for further information.

Contains ad hoc patches for cross building.

From d5e7a81cbe6339e1d0dbf97f8814c28e2c806d80 Mon Sep 17 00:00:00 2001
From: mingw-cross-env
Date: Fri, 24 Sep 2010 23:31:24 +0200
Subject: [PATCH] s,DllMain,static _disabled_DllMain,


diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index aa4964f..c925934 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -226,12 +226,12 @@ skip_space (const char **pos)
   
 #ifdef G_OS_WIN32
 
-/* DllMain function needed to tuck away the gdk-pixbuf DLL handle */
+/* static _disabled_DllMain function needed to tuck away the gdk-pixbuf DLL handle */
 
 static HMODULE gdk_pixbuf_dll;
 
 BOOL WINAPI
-DllMain (HINSTANCE hinstDLL,
+static _disabled_DllMain (HINSTANCE hinstDLL,
          DWORD     fdwReason,
          LPVOID    lpvReserved)
 {
-- 
1.7.1

From e6a5b2472a4a5d554b587dfcb798b95035caa6fd Mon Sep 17 00:00:00 2001
From: Maarten Bosmans <mkbosmans@gmail.com>
Date: Mon, 24 Jan 2011 10:39:22 +0000
Subject: Use png_jmpbuf macro

This makes the png loader compatible with libpng 1.5
---
diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c
index 79c81fd..76f3304 100644
--- a/gdk-pixbuf/io-png.c
+++ b/gdk-pixbuf/io-png.c
@@ -183,7 +183,7 @@ png_simple_error_callback(png_structp png_save_ptr,
                              error_msg);
         }
 
-        longjmp (png_save_ptr->jmpbuf, 1);
+        longjmp (png_jmpbuf(png_save_ptr), 1);
 }
 
 static void
@@ -287,7 +287,7 @@ gdk_pixbuf__png_image_load (FILE *f, GError **error)
 		return NULL;
 	}
 
-	if (setjmp (png_ptr->jmpbuf)) {
+	if (setjmp (png_jmpbuf(png_ptr))) {
 	    	g_free (rows);
 
 		if (pixbuf)
@@ -459,7 +459,7 @@ gdk_pixbuf__png_image_begin_load (GdkPixbufModuleSizeFunc size_func,
                 return NULL;
         }
         
-	if (setjmp (lc->png_read_ptr->jmpbuf)) {
+	if (setjmp (png_jmpbuf(lc->png_read_ptr))) {
 		if (lc->png_info_ptr)
 			png_destroy_read_struct(&lc->png_read_ptr, NULL, NULL);
                 g_free(lc);
@@ -531,7 +531,7 @@ gdk_pixbuf__png_image_load_increment(gpointer context,
         lc->error = error;
         
         /* Invokes our callbacks as needed */
-	if (setjmp (lc->png_read_ptr->jmpbuf)) {
+	if (setjmp (png_jmpbuf(lc->png_read_ptr))) {
                 lc->error = NULL;
 		return FALSE;
 	} else {
@@ -769,7 +769,7 @@ png_error_callback(png_structp png_read_ptr,
                              error_msg);
         }
 
-        longjmp (png_read_ptr->jmpbuf, 1);
+        longjmp (png_jmpbuf(png_read_ptr), 1);
 }
 
 static void
@@ -978,7 +978,7 @@ static gboolean real_save_png (GdkPixbuf        *pixbuf,
 	       success = FALSE;
 	       goto cleanup;
        }
-       if (setjmp (png_ptr->jmpbuf)) {
+       if (setjmp (png_jmpbuf(png_ptr))) {
 	       success = FALSE;
 	       goto cleanup;
        }
--
cgit v0.8.3.4