g_type_init_deprecation.patch 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. diff -ru gypsy-0.9.orig/docs/gypsy-tutorial.html gypsy-0.9/docs/gypsy-tutorial.html
  2. --- gypsy-0.9.orig/docs/gypsy-tutorial.html 2011-08-09 13:20:15.000000000 +0200
  3. +++ gypsy-0.9/docs/gypsy-tutorial.html 2013-04-30 10:28:42.599711724 +0200
  4. @@ -97,10 +97,11 @@
  5. GError *error = NULL;
  6. char *path;
  7. + #if !GLIB_CHECK_VERSION(2,35,0)
  8. /* Libgypsy uses GObject, so the type system needs
  9. to be started up before any Gypsy calls */
  10. g_type_init ();
  11. -
  12. + #endif
  13. /* Retrieve the default control */
  14. control = gypsy_control_get_default ();
  15. diff -ru gypsy-0.9.orig/examples/list-known-gps-devices.c gypsy-0.9/examples/list-known-gps-devices.c
  16. --- gypsy-0.9.orig/examples/list-known-gps-devices.c 2011-10-17 18:32:37.000000000 +0200
  17. +++ gypsy-0.9/examples/list-known-gps-devices.c 2013-04-30 10:26:59.824754298 +0200
  18. @@ -21,8 +21,9 @@
  19. GPtrArray *known_devices;
  20. int i;
  21. +#if !GLIB_CHECK_VERSION(2,35,0)
  22. g_type_init ();
  23. -
  24. +#endif
  25. discovery = gypsy_discovery_new ();
  26. known_devices = gypsy_discovery_list_devices (discovery, &error);
  27. diff -ru gypsy-0.9.orig/examples/simple-gps-dbus.c gypsy-0.9/examples/simple-gps-dbus.c
  28. --- gypsy-0.9.orig/examples/simple-gps-dbus.c 2011-08-09 13:20:15.000000000 +0200
  29. +++ gypsy-0.9/examples/simple-gps-dbus.c 2013-04-30 10:26:20.862069029 +0200
  30. @@ -122,7 +122,9 @@
  31. DBusError error;
  32. GMainLoop *mainloop;
  33. +#if !GLIB_CHECK_VERSION(2,35,0)
  34. g_type_init ();
  35. +#endif
  36. conn = get_connection ();
  37. dbus_error_init (&error);
  38. diff -ru gypsy-0.9.orig/examples/simple-gps-gypsy.c gypsy-0.9/examples/simple-gps-gypsy.c
  39. --- gypsy-0.9.orig/examples/simple-gps-gypsy.c 2011-08-09 13:20:15.000000000 +0200
  40. +++ gypsy-0.9/examples/simple-gps-gypsy.c 2013-04-30 10:26:43.778354525 +0200
  41. @@ -68,8 +68,9 @@
  42. return 0;
  43. }
  44. +#if !GLIB_CHECK_VERSION(2,35,0)
  45. g_type_init ();
  46. -
  47. +#endif
  48. control = gypsy_control_get_default ();
  49. path = gypsy_control_create (control, argv[1], &error);
  50. if (path == NULL) {
  51. diff -ru gypsy-0.9.orig/examples/simple-gps-satellites.c gypsy-0.9/examples/simple-gps-satellites.c
  52. --- gypsy-0.9.orig/examples/simple-gps-satellites.c 2011-08-09 13:20:15.000000000 +0200
  53. +++ gypsy-0.9/examples/simple-gps-satellites.c 2013-04-30 10:27:21.314396881 +0200
  54. @@ -43,8 +43,9 @@
  55. return 0;
  56. }
  57. +#if !GLIB_CHECK_VERSION(2,35,0)
  58. g_type_init ();
  59. -
  60. +#endif
  61. control = gypsy_control_get_default ();
  62. path = gypsy_control_create (control, argv[1], &error);
  63. if (path == NULL) {
  64. diff -ru gypsy-0.9.orig/src/main.c gypsy-0.9/src/main.c
  65. --- gypsy-0.9.orig/src/main.c 2011-10-13 17:44:12.000000000 +0200
  66. +++ gypsy-0.9/src/main.c 2013-04-30 10:27:42.194049621 +0200
  67. @@ -188,8 +188,9 @@
  68. umask (022);
  69. +#if !GLIB_CHECK_VERSION(2,35,0)
  70. g_type_init ();
  71. -
  72. +#endif
  73. mainloop = g_main_loop_new (NULL, FALSE);
  74. conn = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);