[mlview-list] [Patch] Fix build Mlview 0.8.0 w/ gcc 2.95



Hi,

here are some patches that are necessary in order to build mlview with
gcc 2.95 (variables need to be declared at the beginning of a {} block).

Could you please consider adding them to your CVS?

Best regards,
 Simon

[Please Cc: me in your answers, I am not subscribed to your list]
--- src/mlview-editor-dbc.c.orig	Mon Sep  5 12:55:40 2005
+++ src/mlview-editor-dbc.c	Mon Sep  5 12:56:44 2005
@@ -168,13 +168,16 @@
 			0,
 			(GInstanceInitFunc)mlview_editor_dbc_init
 		} ;
-		type = g_type_register_static (G_TYPE_OBJECT,
-				               "MlViewEditorDBC",
-					       &type_info, 0) ;
+
 		static const GInterfaceInfo idbc_info = {
 			(GInterfaceInitFunc) mlview_editor_dbc_idbc_init,
 			NULL, NULL
 		} ;
+
+                type = g_type_register_static (G_TYPE_OBJECT,
+                                               "MlViewEditorDBC",
+                                               &type_info, 0) ;
+
 		g_type_add_interface_static (type, MLVIEW_TYPE_IDBC,
 				             &idbc_info) ;
 	}
--- src/mlview-editor-dbo.c.orig	Mon Sep  5 12:50:28 2005
+++ src/mlview-editor-dbo.c	Mon Sep  5 12:51:41 2005
@@ -303,14 +303,16 @@
 			0,
 			(GInstanceInitFunc) mlview_editor_dbo_init
 		} ;
-		type = g_type_register_static (G_TYPE_OBJECT,
-				               "MlViewEditorDBO",
-					       &type_info, 0) ;
 
 		static const GInterfaceInfo idbo_info = {
 			(GInterfaceInitFunc) mlview_editor_dbo_idbo_init,
 			NULL, NULL
 		} ;
+
+                type = g_type_register_static (G_TYPE_OBJECT,
+                                               "MlViewEditorDBO",
+                                               &type_info, 0) ;
+
 		g_type_add_interface_static (type, MLVIEW_TYPE_IDBO,
 				             &idbo_info) ;
 	}
--- src/mlview-ping-dbc.c.orig	Mon Sep  5 12:57:39 2005
+++ src/mlview-ping-dbc.c	Mon Sep  5 12:58:35 2005
@@ -166,14 +166,16 @@
 			0,
 			(GInstanceInitFunc) mlview_ping_dbc_init
 		} ;
-		type = g_type_register_static (G_TYPE_OBJECT,
-				               "MlViewPingDBC",
-					       &type_info, 0) ;
 
 		static const GInterfaceInfo idbc_info = {
 			(GInterfaceInitFunc) mlview_ping_dbc_idbc_init,
 			NULL, NULL
 		} ;
+
+                type = g_type_register_static (G_TYPE_OBJECT,
+                                               "MlViewPingDBC",
+                                               &type_info, 0) ;
+
 		g_type_add_interface_static (type, MLVIEW_TYPE_IDBC,
 				             &idbc_info) ;
 	}
--- src/mlview-ping-dbo.c.orig	Mon Sep  5 12:52:49 2005
+++ src/mlview-ping-dbo.c	Mon Sep  5 12:53:50 2005
@@ -362,13 +362,16 @@
 			0,
 			(GInstanceInitFunc) mlview_ping_dbo_init
 		} ;
-		type = g_type_register_static (G_TYPE_OBJECT,
-				               "MlViewPingDBO",
-					       &type_info, 0) ;
+
 		static const GInterfaceInfo idbo_info = {
 			(GInterfaceInitFunc) mlview_ping_dbo_idbo_init,
 			NULL, NULL
 		} ;
+
+                type = g_type_register_static (G_TYPE_OBJECT,
+                                               "MlViewPingDBO",
+                                               &type_info, 0) ;
+
 		g_type_add_interface_static (type, MLVIEW_TYPE_IDBO,
 					     &idbo_info) ;
 	}
--- src/mlview-source-view.c.orig	Mon Sep  5 12:24:55 2005
+++ src/mlview-source-view.c	Mon Sep  5 12:25:47 2005
@@ -1321,15 +1321,17 @@
                         (GInstanceInitFunc)
                         mlview_source_view_init
                 } ;
-                type = g_type_register_static
-                        (MLVIEW_TYPE_VIEW_ADAPTER,
-                         "MlViewSourceView", &type_info, 0);
 
 		static const GInterfaceInfo iview_info = {
 			(GInterfaceInitFunc) mlview_source_view_iview_init,
 			NULL,
 			NULL
 		} ;
+
+		type = g_type_register_static
+                        (MLVIEW_TYPE_VIEW_ADAPTER,
+			 "MlViewSourceView", &type_info, 0);
+
 		g_type_add_interface_static (type, MLVIEW_TYPE_IVIEW,
 		                             &iview_info) ;
         }
--- src/mlview-tree-view.c.orig	Mon Sep  5 12:22:34 2005
+++ src/mlview-tree-view.c	Mon Sep  5 12:24:10 2005
@@ -2628,15 +2628,17 @@
                         (GInstanceInitFunc)
                         mlview_tree_view_init
                 };                
-                type = g_type_register_static
-                        (MLVIEW_TYPE_VIEW_ADAPTER,
-                         "MlViewTreeView", &type_info, 0);
 
 		static const GInterfaceInfo iview_info = {
 			(GInterfaceInitFunc) mlview_tree_view_iview_init,
 			NULL,
 			NULL
 		} ;
+
+                type = g_type_register_static
+                        (MLVIEW_TYPE_VIEW_ADAPTER,
+                         "MlViewTreeView", &type_info, 0);
+		
 		g_type_add_interface_static (type, MLVIEW_TYPE_IVIEW, &iview_info) ;
         }
         return type;
--- src/mlview-view-adapter.c.orig	Mon Sep  5 12:19:12 2005
+++ src/mlview-view-adapter.c	Mon Sep  5 12:21:26 2005
@@ -865,14 +865,17 @@
                         (GInstanceInitFunc)
                         mlview_view_adapter_init
                 };
-                type_id = g_type_register_static (GTK_TYPE_VBOX,
-                                                  "MlViewViewAdapter",
-                                                  &type_info, 0);
+
 		static const GInterfaceInfo iview_info = {
 			(GInterfaceInitFunc) mlview_view_adapter_iview_init,
 			NULL,
 			NULL
 		} ;
+
+                type_id = g_type_register_static (GTK_TYPE_VBOX,
+		                                  "MlViewViewAdapter",
+						  &type_info, 0);
+
 		g_type_add_interface_static (type_id, MLVIEW_TYPE_IVIEW,
 		                             &iview_info) ;
         }

Attachment: pgpy6ua7IWBOw.pgp
Description: PGP signature



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