[network-manager-vpnc] build: minor updates



commit 2ae40f34d7cc46beec1872a875d1b24c2047cb00
Author: Dan Winship <danw gnome org>
Date:   Mon Feb 18 18:11:27 2013 -0500

    build: minor updates
    
    Only call g_type_init() on older glibs.
    
    Add a missing #include (that presumably used to get accidentally
    pulled in by something else).
    
    Use -DGDK_VERSION_MIN_REQUIRED to avoid deprecation warnings on
    GtkTable.

 configure.ac                          |    2 ++
 properties/tests/test-import-export.c |    3 +++
 src/nm-vpnc-service-vpnc-helper.c     |    3 +++
 src/nm-vpnc-service.c                 |    3 +++
 4 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4fb35dd..b039ad2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,6 +85,8 @@ if test x"$with_gnome" != xno; then
        AC_SUBST(GTK_CFLAGS)
        AC_SUBST(GTK_LIBS)
 
+       GTK_CFLAGS="$GTK_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_0"
+
        PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1)
        AC_SUBST(GNOMEKEYRING_CFLAGS)
        AC_SUBST(GNOMEKEYRING_LIBS)
diff --git a/properties/tests/test-import-export.c b/properties/tests/test-import-export.c
index bdd06bd..5c435c6 100644
--- a/properties/tests/test-import-export.c
+++ b/properties/tests/test-import-export.c
@@ -771,7 +771,10 @@ int main (int argc, char **argv)
        if (argc != 3)
                FAIL ("args", "usage: %s <pcf path> <tmp path>", argv[0]);
 
+#if !GLIB_CHECK_VERSION (2, 35, 0)
        g_type_init ();
+#endif
+
        bus = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
 
        if (!nm_utils_init (&error))
diff --git a/src/nm-vpnc-service-vpnc-helper.c b/src/nm-vpnc-service-vpnc-helper.c
index bc91771..39be98f 100644
--- a/src/nm-vpnc-service-vpnc-helper.c
+++ b/src/nm-vpnc-service-vpnc-helper.c
@@ -28,6 +28,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <errno.h>
+#include <locale.h>
 #include <dbus/dbus.h>
 #include <dbus/dbus-glib-lowlevel.h>
 #include <dbus/dbus-glib.h>
@@ -320,7 +321,9 @@ main (int argc, char *argv[])
        guint32 prefix = 0;
        gboolean netmask_found = FALSE;
 
+#if !GLIB_CHECK_VERSION (2, 35, 0)
        g_type_init ();
+#endif
 
        /* vpnc 0.3.3 gives us a "reason" code.  If we are given one,
         * don't proceed unless its "connect".
diff --git a/src/nm-vpnc-service.c b/src/nm-vpnc-service.c
index 671b061..ec6f399 100644
--- a/src/nm-vpnc-service.c
+++ b/src/nm-vpnc-service.c
@@ -30,6 +30,7 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <errno.h>
+#include <locale.h>
 #include <glib/gi18n.h>
 
 #include <nm-setting-vpn.h>
@@ -724,7 +725,9 @@ main (int argc, char *argv[])
                {NULL}
        };
 
+#if !GLIB_CHECK_VERSION (2, 35, 0)
        g_type_init ();
+#endif
 
        /* locale will be set according to environment LC_* variables */
        setlocale (LC_ALL, "");


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