summaryrefslogtreecommitdiffstats
path: root/abs/extra/gypsy/g_type_init_deprecation.patch
blob: 80511f176c343e0f845ae7f00f005df034567282 (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
diff -ru gypsy-0.9.orig/docs/gypsy-tutorial.html gypsy-0.9/docs/gypsy-tutorial.html
--- gypsy-0.9.orig/docs/gypsy-tutorial.html	2011-08-09 13:20:15.000000000 +0200
+++ gypsy-0.9/docs/gypsy-tutorial.html	2013-04-30 10:28:42.599711724 +0200
@@ -97,10 +97,11 @@
 		GError *error = NULL;
 		char *path;
 
+	#if !GLIB_CHECK_VERSION(2,35,0)
 		/* Libgypsy uses GObject, so the type system needs
 		   to be started up before any Gypsy calls */
 		g_type_init ();
-
+	#endif
 		/* Retrieve the default control */
 		control = gypsy_control_get_default ();
 		
diff -ru gypsy-0.9.orig/examples/list-known-gps-devices.c gypsy-0.9/examples/list-known-gps-devices.c
--- gypsy-0.9.orig/examples/list-known-gps-devices.c	2011-10-17 18:32:37.000000000 +0200
+++ gypsy-0.9/examples/list-known-gps-devices.c	2013-04-30 10:26:59.824754298 +0200
@@ -21,8 +21,9 @@
     GPtrArray *known_devices;
     int i;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
     g_type_init ();
-
+#endif
     discovery = gypsy_discovery_new ();
     known_devices = gypsy_discovery_list_devices (discovery, &error);
 
diff -ru gypsy-0.9.orig/examples/simple-gps-dbus.c gypsy-0.9/examples/simple-gps-dbus.c
--- gypsy-0.9.orig/examples/simple-gps-dbus.c	2011-08-09 13:20:15.000000000 +0200
+++ gypsy-0.9/examples/simple-gps-dbus.c	2013-04-30 10:26:20.862069029 +0200
@@ -122,7 +122,9 @@
 	DBusError error;
 	GMainLoop *mainloop;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	conn = get_connection ();
 
 	dbus_error_init (&error);
diff -ru gypsy-0.9.orig/examples/simple-gps-gypsy.c gypsy-0.9/examples/simple-gps-gypsy.c
--- gypsy-0.9.orig/examples/simple-gps-gypsy.c	2011-08-09 13:20:15.000000000 +0200
+++ gypsy-0.9/examples/simple-gps-gypsy.c	2013-04-30 10:26:43.778354525 +0200
@@ -68,8 +68,9 @@
 		return 0;
 	}
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
-
+#endif
 	control = gypsy_control_get_default ();
 	path = gypsy_control_create (control, argv[1], &error);
 	if (path == NULL) {
diff -ru gypsy-0.9.orig/examples/simple-gps-satellites.c gypsy-0.9/examples/simple-gps-satellites.c
--- gypsy-0.9.orig/examples/simple-gps-satellites.c	2011-08-09 13:20:15.000000000 +0200
+++ gypsy-0.9/examples/simple-gps-satellites.c	2013-04-30 10:27:21.314396881 +0200
@@ -43,8 +43,9 @@
 		return 0;
 	}
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
-
+#endif
 	control = gypsy_control_get_default ();
 	path = gypsy_control_create (control, argv[1], &error);
 	if (path == NULL) {
diff -ru gypsy-0.9.orig/src/main.c gypsy-0.9/src/main.c
--- gypsy-0.9.orig/src/main.c	2011-10-13 17:44:12.000000000 +0200
+++ gypsy-0.9/src/main.c	2013-04-30 10:27:42.194049621 +0200
@@ -188,8 +188,9 @@
 
 	umask (022);
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
-
+#endif
 	mainloop = g_main_loop_new (NULL, FALSE);
 
 	conn = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);