[network-manager-pptp] build: modernize a bit



commit 8c5c986cb47d41d9491dffeb9a22074ff671177a
Author: Dan Winship <danw gnome org>
Date:   Mon Feb 18 16:09:35 2013 -0500

    build: modernize a bit
    
    Remove -DGDK_DISABLE_DEPRECATED and -DGTK_DISABLE_DEPRECATED, since
    this is still using very old gtk stuff.
    
    Only call g_type_init() on older glibs.
    
    Add a missing #include (that presumably used to get accidentally
    pulled in by something else).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693866

 auth-dialog/Makefile.am   |    2 --
 properties/Makefile.am    |    2 --
 src/nm-pptp-pppd-plugin.c |    2 ++
 src/nm-pptp-service.c     |    3 +++
 4 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/auth-dialog/Makefile.am b/auth-dialog/Makefile.am
index 026e4a2..7cc18b1 100644
--- a/auth-dialog/Makefile.am
+++ b/auth-dialog/Makefile.am
@@ -11,8 +11,6 @@ nm_pptp_auth_dialog_CPPFLAGS =                        \
        -DUIDIR=\""$(uidir)"\"                  \
        -DBINDIR=\""$(bindir)"\"                \
        -DG_DISABLE_DEPRECATED                  \
-       -DGDK_DISABLE_DEPRECATED                \
-       -DGTK_DISABLE_DEPRECATED                \
        -DVERSION=\"$(VERSION)\"
 
 nm_pptp_auth_dialog_SOURCES = \
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 97cce16..094b412 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -20,8 +20,6 @@ libnm_pptp_properties_la_CFLAGS =                       \
         -DICONDIR=\""$(datadir)/pixmaps"\"              \
         -DUIDIR=\""$(uidir)"\"                          \
         -DG_DISABLE_DEPRECATED                          \
-        -DGDK_DISABLE_DEPRECATED                        \
-       -DGTK_DISABLE_DEPRECATED                        \
         -DVERSION=\"$(VERSION)\"
 
 libnm_pptp_properties_la_LIBADD = \
diff --git a/src/nm-pptp-pppd-plugin.c b/src/nm-pptp-pppd-plugin.c
index d17ef90..0d1e7a3 100644
--- a/src/nm-pptp-pppd-plugin.c
+++ b/src/nm-pptp-pppd-plugin.c
@@ -315,7 +315,9 @@ plugin_init (void)
        DBusGConnection *bus;
        GError *err = NULL;
 
+#if !GLIB_CHECK_VERSION (2, 35, 0)
        g_type_init ();
+#endif
 
        g_message ("nm-pptp-ppp-plugin: (%s): initializing", __func__);
 
diff --git a/src/nm-pptp-service.c b/src/nm-pptp-service.c
index a16677e..bca3e28 100644
--- a/src/nm-pptp-service.c
+++ b/src/nm-pptp-service.c
@@ -33,6 +33,7 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <ctype.h>
+#include <locale.h>
 
 #include <errno.h>
 #include <sys/socket.h>
@@ -1313,7 +1314,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]