[Pkg-mono-svn-commits] rev 3255 - in ndesk-dbus-glib/trunk/debian: . patches

Sebastian Dröge slomo at alioth.debian.org
Sun Jul 22 17:31:04 UTC 2007


Author: slomo
Date: 2007-07-22 17:31:04 +0000 (Sun, 22 Jul 2007)
New Revision: 3255

Added:
   ndesk-dbus-glib/trunk/debian/patches/
   ndesk-dbus-glib/trunk/debian/patches/00list
   ndesk-dbus-glib/trunk/debian/patches/01_native-signatures.dpatch
Modified:
   ndesk-dbus-glib/trunk/debian/changelog
Log:
* debian/patches/01_native-signatures.dpatch:
  + Fix the signatures of the native GLib functions to prevent crashes on
    architectures where managed structs are not passed as pointer to native
    functions. This fixes the segfaults on PPC for example. (Closes: #431168)

Modified: ndesk-dbus-glib/trunk/debian/changelog
===================================================================
--- ndesk-dbus-glib/trunk/debian/changelog	2007-07-21 14:16:13 UTC (rev 3254)
+++ ndesk-dbus-glib/trunk/debian/changelog	2007-07-22 17:31:04 UTC (rev 3255)
@@ -1,3 +1,12 @@
+ndesk-dbus-glib (0.3-2) unstable; urgency=low
+
+  * debian/patches/01_native-signatures.dpatch:
+    + Fix the signatures of the native GLib functions to prevent crashes on
+      architectures where managed structs are not passed as pointer to native
+      functions. This fixes the segfaults on PPC for example. (Closes: #431168)
+
+ -- Sebastian Dröge <slomo at debian.org>  Sun, 22 Jul 2007 19:27:32 +0200
+
 ndesk-dbus-glib (0.3-1) unstable; urgency=low
 
   * Initial Revision

Added: ndesk-dbus-glib/trunk/debian/patches/00list
===================================================================
--- ndesk-dbus-glib/trunk/debian/patches/00list	                        (rev 0)
+++ ndesk-dbus-glib/trunk/debian/patches/00list	2007-07-22 17:31:04 UTC (rev 3255)
@@ -0,0 +1 @@
+01_native-signatures.dpatch

Added: ndesk-dbus-glib/trunk/debian/patches/01_native-signatures.dpatch
===================================================================
--- ndesk-dbus-glib/trunk/debian/patches/01_native-signatures.dpatch	                        (rev 0)
+++ ndesk-dbus-glib/trunk/debian/patches/01_native-signatures.dpatch	2007-07-22 17:31:04 UTC (rev 3255)
@@ -0,0 +1,110 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+
+ at DPATCH@
+
+--- ndesk-dbus-glib-0.3.orig/glib/GLib.IO.cs
++++ ndesk-dbus-glib-0.3/glib/GLib.IO.cs
+@@ -43,14 +43,12 @@
+ 		}
+ 
+ 		[DllImport(GLIB)]
+-			//static extern int g_io_channel_unix_get_fd (IntPtr channel);
+-			static extern int g_io_channel_unix_get_fd (IOChannel channel);
++			static extern int g_io_channel_unix_get_fd (IntPtr channel);
+ 
+ 		public int UnixFd
+ 		{
+ 			get {
+-				//return g_io_channel_unix_get_fd (Handle);
+-				return g_io_channel_unix_get_fd (this);
++				return g_io_channel_unix_get_fd (Handle);
+ 			}
+ 		}
+ 
+@@ -65,43 +63,43 @@
+ 
+ 
+ 		[DllImport(GLIB)]
+-			public static extern uint g_io_channel_get_buffer_size (IOChannel channel);
++			public static extern uint g_io_channel_get_buffer_size (IntPtr channel);
+ 
+ 		[DllImport(GLIB)]
+-			public static extern void g_io_channel_set_buffer_size (IOChannel channel, uint size);
++			public static extern void g_io_channel_set_buffer_size (IntPtr channel, uint size);
+ 
+ 		public uint BufferSize
+ 		{
+ 			get {
+-				return g_io_channel_get_buffer_size (this);
++				return g_io_channel_get_buffer_size (Handle);
+ 			} set {
+-				g_io_channel_set_buffer_size (this, value);
++				g_io_channel_set_buffer_size (Handle, value);
+ 			}
+ 		}
+ 
+ 		[DllImport(GLIB)]
+-			public static extern IOCondition g_io_channel_get_buffer_condition (IOChannel channel);
++			public static extern IOCondition g_io_channel_get_buffer_condition (IntPtr channel);
+ 
+ 		public IOCondition BufferCondition
+ 		{
+ 			get {
+-				return g_io_channel_get_buffer_condition (this);
++				return g_io_channel_get_buffer_condition (Handle);
+ 			}
+ 		}
+ 
+ 		[DllImport(GLIB)]
+-			public static extern IOFlags g_io_channel_get_flags (IOChannel channel);
++			public static extern IOFlags g_io_channel_get_flags (IntPtr channel);
+ 
+ 		[DllImport(GLIB)]
+-			static extern short g_io_channel_set_flags (IOChannel channel, IOFlags flags, IntPtr error);
++			static extern short g_io_channel_set_flags (IntPtr channel, IOFlags flags, IntPtr error);
+ 
+ 		public IOFlags Flags
+ 		{
+ 			get {
+-				return g_io_channel_get_flags (this);
++				return g_io_channel_get_flags (Handle);
+ 			} set {
+ 				//TODO: fix return and error
+-				g_io_channel_set_flags (this, value, IntPtr.Zero);
++				g_io_channel_set_flags (Handle, value, IntPtr.Zero);
+ 			}
+ 		}
+ 	}
+@@ -124,13 +122,13 @@
+ 		Returns: the event source id.
+ 		*/
+ 		[DllImport(GLIB)]
+-			protected static extern uint g_io_add_watch (IOChannel channel, IOCondition condition, IOFunc func, IntPtr user_data);
++			protected static extern uint g_io_add_watch (IntPtr channel, IOCondition condition, IOFunc func, IntPtr user_data);
+ 
+ 		public static uint AddWatch (IOChannel channel, IOCondition condition, IOFunc func)
+ 		{
+ 			objs.Add (func);
+ 
+-			return g_io_add_watch (channel, condition, func, IntPtr.Zero);
++			return g_io_add_watch (channel.Handle, condition, func, IntPtr.Zero);
+ 		}
+ 
+ 		/*
+@@ -146,14 +144,14 @@
+ 		Returns: the event source id.
+ 		*/
+ 		[DllImport(GLIB)]
+-			protected static extern uint g_io_add_watch_full (IOChannel channel, int priority, IOCondition condition, IOFunc func, IntPtr user_data, DestroyNotify notify);
++			protected static extern uint g_io_add_watch_full (IntPtr channel, int priority, IOCondition condition, IOFunc func, IntPtr user_data, DestroyNotify notify);
+ 
+ 		public static uint AddWatch (IOChannel channel, int priority, IOCondition condition, IOFunc func, DestroyNotify notify)
+ 		{
+ 			objs.Add (func);
+ 			objs.Add (notify);
+ 
+-			return g_io_add_watch_full (channel, priority, condition, func, IntPtr.Zero, notify);
++			return g_io_add_watch_full (channel.Handle, priority, condition, func, IntPtr.Zero, notify);
+ 		}
+ 
+ 		[DllImport(GLIB)]




More information about the Pkg-mono-svn-commits mailing list