aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-navigation/omgps/omgps/fix.build.with.glib.2.34.patch
blob: e9536639d2ebe4577db270a3b4ec4ea7feb852eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
diff -uNr omgps.orig/src/dbus_intf.c omgps/src/dbus_intf.c
--- omgps.orig/src/dbus_intf.c	2011-12-12 12:22:47.000000000 +0100
+++ omgps/src/dbus_intf.c	2012-11-14 14:44:45.435381443 +0100
@@ -171,7 +171,7 @@
 	gpsdata->svinfo_valid = TRUE;
 
 	int i, j;
-	GValueArray *val;
+	GArray *val;
 	svinfo_channel_t *sv;
 
 	j = 0;
@@ -179,16 +179,16 @@
 		val = satellites->pdata[i];
 
 		sv = &gpsdata->sv_channels[j];
-		sv->sv_id = g_value_get_uint(g_value_array_get_nth(val, 0));
+		sv->sv_id = g_array_index(val, guint, 0);
 
-		if (g_value_get_boolean(g_value_array_get_nth(val, 1))) {
+		if (g_array_index(val, gboolean, 1)) {
 			++gpsdata->sv_in_use;
 			sv->flags = 0x01;
 		}
 
-		sv->elevation = (int)g_value_get_uint(g_value_array_get_nth(val, 2));
-		sv->azimuth = (int)g_value_get_uint(g_value_array_get_nth(val, 3));
-		sv->cno = g_value_get_uint(g_value_array_get_nth(val, 4));
+		sv->elevation = (int)g_array_index(val, guint, 2);
+		sv->azimuth = (int)g_array_index(val, guint, 3);
+		sv->cno = g_array_index(val, guint, 4);
 		if (sv->cno > 0)
 			++gpsdata->sv_get_signal;
 
diff -uNr omgps.orig/src/main.c omgps/src/main.c
--- omgps.orig/src/main.c	2011-12-12 12:22:47.000000000 +0100
+++ omgps/src/main.c	2012-11-14 14:46:00.345402222 +0100
@@ -489,9 +489,6 @@
 
 	g_type_init();
 
-	if (! g_thread_supported ())
-		g_thread_init(NULL);
-
 	gdk_threads_init();
 
 	gdk_threads_enter();
diff -uNr omgps.orig/src/tab_gpscfg.c omgps/src/tab_gpscfg.c
--- omgps.orig/src/tab_gpscfg.c	2011-12-12 12:22:47.000000000 +0100
+++ omgps/src/tab_gpscfg.c	2012-11-14 15:23:47.526925258 +0100
@@ -222,7 +222,7 @@
 
 static gboolean change_platform_model_cmd(void *model_id)
 {
-	U1 model = (U1)(int) model_id;
+	U1 model = (U1)GPOINTER_TO_INT(model_id);
 	int gps_dev_fd = 0;
 
 	/* non ubx means: we need open serial port
@@ -269,7 +269,7 @@
 static void change_platmodel_button_clicked(GtkWidget *widget, gpointer data)
 {
 	int idx = gtk_combo_box_get_active(GTK_COMBO_BOX(platmodel_list));
-	char *model_id = (void *)(int)platmodel_values[idx];
+	void *model_id = (void *)GINT_TO_POINTER(platmodel_values[idx]);
 
 	if (POLL_ENGINE_TEST(UBX)) {
 		gtk_widget_set_sensitive(change_platmodel_button, FALSE);
diff -uNr omgps.orig/src/tab_menu.c omgps/src/tab_menu.c
--- omgps.orig/src/tab_menu.c	2011-12-12 12:22:47.000000000 +0100
+++ omgps/src/tab_menu.c	2012-11-14 15:25:08.217941513 +0100
@@ -65,7 +65,7 @@
 
 static void poll_button_clicked(GtkWidget *widget, gpointer data)
 {
-	gboolean is_start_bt = (gboolean)data;
+	gboolean is_start_bt = (gboolean) GPOINTER_TO_INT(data);
 
 	if (POLL_STATE_TEST(RUNNING) == is_start_bt)
 		return;
diff -uNr omgps.orig/src/tab_tile.c omgps/src/tab_tile.c
--- omgps.orig/src/tab_tile.c	2011-12-12 12:22:47.000000000 +0100
+++ omgps/src/tab_tile.c	2012-11-14 15:25:30.392945800 +0100
@@ -101,7 +101,7 @@
 static gboolean set_bg_map(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
 {
 	map_repo_t *repo;
-	gboolean clear = (gboolean)data;
+	gboolean clear = (gboolean)GPOINTER_TO_INT(data);
 
 	int type;
 
@@ -240,7 +240,7 @@
 
 static void alpha_radio_toggled (GtkWidget *widget, gpointer user_data)
 {
-	int idx = (int)user_data;
+	int idx = (int)GPOINTER_TO_INT(user_data);
 
 	if (g_view.bg_alpha_idx == idx)
 		return;
@@ -384,7 +384,7 @@
 
 	for (i=0; i<ALPHA_LEVELS; i++) {
 		g_signal_connect (G_OBJECT (alpha_radios[i]), "toggled",
-			G_CALLBACK (alpha_radio_toggled), (gpointer)i);
+			G_CALLBACK (alpha_radio_toggled), GINT_TO_POINTER(i));
 		gtk_container_add(GTK_CONTAINER (alpha_hbox), alpha_radios[i]);
 	}
 
diff -uNr omgps.orig/src/tab_view.c omgps/src/tab_view.c
--- omgps.orig/src/tab_view.c	2011-12-12 12:22:47.000000000 +0100
+++ omgps/src/tab_view.c	2012-11-14 15:25:47.018949453 +0100
@@ -534,7 +534,7 @@
 
 static void* change_zoom_routine(void *args)
 {
-	gboolean is_zoom_in = (gboolean)args;
+	gboolean is_zoom_in = (gboolean)GPOINTER_TO_INT(args);
 	stop = FALSE;
 
 	int hi = (is_zoom_in)?