[network-manager-vpnc/th/vpn-editor-split-bgo766170] build: rename define "NM_VPNC_OLD" to "NM_VPN_OLD"



commit a5d01960030e6d6d8ccea8f2820348926ec04f85
Author: Thomas Haller <thaller redhat com>
Date:   Mon May 9 13:37:53 2016 +0200

    build: rename define "NM_VPNC_OLD" to "NM_VPN_OLD"
    
    nm-vpnc and nm-openvpn projects are very similar. One difference is
    the name of this define.
    
    Rename it, so that the projects show less differences.

 properties/Makefile.am                |    2 +-
 properties/nm-vpnc-editor-plugin.c    |   14 +++++++-------
 properties/tests/Makefile.am          |    2 +-
 properties/tests/test-import-export.c |    2 +-
 shared/Makefile.am                    |    2 +-
 shared/nm-default.h                   |   12 ++++++------
 6 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/properties/Makefile.am b/properties/Makefile.am
index a36f597..cddbfd7 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -76,7 +76,7 @@ libnm_vpnc_properties_la_SOURCES = \
     $(editor_sources)
 
 libnm_vpnc_properties_la_CFLAGS = \
-    -DNM_VPNC_OLD \
+    -DNM_VPN_OLD \
     -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \
     $(common_CFLAGS) \
     $(GTK_CFLAGS) \
diff --git a/properties/nm-vpnc-editor-plugin.c b/properties/nm-vpnc-editor-plugin.c
index e535996..66531b4 100644
--- a/properties/nm-vpnc-editor-plugin.c
+++ b/properties/nm-vpnc-editor-plugin.c
@@ -35,7 +35,7 @@
 
 #include "nm-vpnc-helper.h"
 
-#ifdef NM_VPNC_OLD
+#ifdef NM_VPN_OLD
 #include "nm-vpnc-editor.h"
 #else
 #include "nm-vpn-plugin-utils.h"
@@ -69,7 +69,7 @@ add_routes (NMSettingIPConfig *s_ip4, const char *routelist)
        for (i = 0; substrs[i] != NULL; i++) {
                char *p, *str_route;
                long int prefix = 32;
-#ifdef NM_VPNC_OLD
+#ifdef NM_VPN_OLD
                struct in_addr tmp;
 #else
                NMIPRoute *route;
@@ -91,7 +91,7 @@ add_routes (NMSettingIPConfig *s_ip4, const char *routelist)
                }
                *p = '\0';
 
-#ifdef NM_VPNC_OLD
+#ifdef NM_VPN_OLD
                if (inet_pton (AF_INET, str_route, &tmp) > 0) {
                        NMIP4Route *route = nm_ip4_route_new ();
 
@@ -669,7 +669,7 @@ export (NMVpnEditorPlugin *plugin,
                int i;
 
                for (i = 0; i < nm_setting_ip_config_get_num_routes (s_ip4); i++) {
-#ifdef NM_VPNC_OLD
+#ifdef NM_VPN_OLD
                        NMIP4Route *route = nm_setting_ip_config_get_route (s_ip4, i);
                        char str_addr[INET_ADDRSTRLEN + 1];
                        struct in_addr num_addr;
@@ -679,7 +679,7 @@ export (NMVpnEditorPlugin *plugin,
 
                        if (routes_count)
                                g_string_append_c (routes, ' ');
-#ifdef NM_VPNC_OLD
+#ifdef NM_VPN_OLD
                        num_addr.s_addr = nm_ip4_route_get_dest (route);
                        if (inet_ntop (AF_INET, &num_addr, &str_addr[0], INET_ADDRSTRLEN + 1))
                                g_string_append_printf (routes, "%s/%d", str_addr, nm_ip4_route_get_prefix 
(route));
@@ -800,7 +800,7 @@ get_capabilities (NMVpnEditorPlugin *plugin)
        return (NM_VPN_EDITOR_PLUGIN_CAPABILITY_IMPORT | NM_VPN_EDITOR_PLUGIN_CAPABILITY_EXPORT);
 }
 
-#ifndef NM_VPNC_OLD
+#ifndef NM_VPN_OLD
 static NMVpnEditor *
 _call_editor_factory (gpointer factory,
                       NMVpnEditorPlugin *editor_plugin,
@@ -822,7 +822,7 @@ get_editor (NMVpnEditorPlugin *iface, NMConnection *connection, GError **error)
        g_return_val_if_fail (!error || !*error, NULL);
 
        {
-#ifdef NM_VPNC_OLD
+#ifdef NM_VPN_OLD
                return nm_vpnc_editor_new (connection, error);
 #else
                return nm_vpn_plugin_utils_load_editor (NM_PLUGIN_DIR"/libnm-vpn-plugin-vpnc-editor.so",
diff --git a/properties/tests/Makefile.am b/properties/tests/Makefile.am
index bacefcc..bac141c 100644
--- a/properties/tests/Makefile.am
+++ b/properties/tests/Makefile.am
@@ -34,7 +34,7 @@ test_import_export_glib_SOURCES = \
     test-import-export.c
 
 test_import_export_glib_CPPFLAGS = \
-    -DNM_VPNC_OLD \
+    -DNM_VPN_OLD \
     $(GLIB_CFLAGS) \
     $(GTK_CFLAGS) \
     $(LIBNM_GLIB_CFLAGS) \
diff --git a/properties/tests/test-import-export.c b/properties/tests/test-import-export.c
index 35359ac..8a46cb9 100644
--- a/properties/tests/test-import-export.c
+++ b/properties/tests/test-import-export.c
@@ -177,7 +177,7 @@ test_basic_import (void)
        g_assert_cmpint (nm_setting_ip_config_get_num_dns (s_ip4), ==, 0);
        g_assert_cmpint (nm_setting_ip_config_get_num_routes (s_ip4), ==, 2);
 
-#if NM_VPNC_OLD
+#if NM_VPN_OLD
        {
                NMIP4Route *route;
 
diff --git a/shared/Makefile.am b/shared/Makefile.am
index d728b0e..63695da 100644
--- a/shared/Makefile.am
+++ b/shared/Makefile.am
@@ -28,7 +28,7 @@ libnm_vpnc_shared_la_SOURCES = \
     $(shared_sources)
 
 libnm_vpnc_shared_la_CPPFLAGS = \
-    -DNM_VPNC_OLD \
+    -DNM_VPN_OLD \
     $(LIBNM_GLIB_CFLAGS) \
     -I$(top_srcdir)/shared
 
diff --git a/shared/nm-default.h b/shared/nm-default.h
index 9ce5f4f..9c78374 100644
--- a/shared/nm-default.h
+++ b/shared/nm-default.h
@@ -62,7 +62,7 @@
 
 /*****************************************************************************/
 
-#ifdef NM_VPNC_OLD
+#ifdef NM_VPN_OLD
 
 #define NM_VPN_LIBNM_COMPAT
 #include <nm-connection.h>
@@ -98,7 +98,7 @@
 #define VPNC_EDITOR_PLUGIN_ERROR_FILE_NOT_READABLE   NM_SETTING_VPN_ERROR_UNKNOWN
 #define VPNC_EDITOR_PLUGIN_ERROR_FILE_INVALID        NM_SETTING_VPN_ERROR_UNKNOWN
 
-#else /* !NM_VPNC_OLD */
+#else /* !NM_VPN_OLD */
 
 #include <NetworkManager.h>
 
@@ -110,17 +110,17 @@
 #define VPNC_EDITOR_PLUGIN_ERROR_FILE_NOT_READABLE   NM_CONNECTION_ERROR_FAILED
 #define VPNC_EDITOR_PLUGIN_ERROR_FILE_INVALID        NM_CONNECTION_ERROR_FAILED
 
-#endif /* NM_VPNC_OLD */
+#endif /* NM_VPN_OLD */
 
 /*****************************************************************************/
 
 #if (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_LIB_EDITOR
 
-#ifdef NM_VPNC_OLD
+#ifdef NM_VPN_OLD
 #include <nm-ui-utils.h>
-#else /* NM_VPNC_OLD */
+#else /* NM_VPN_OLD */
 #include <nma-ui-utils.h>
-#endif /* NM_VPNC_OLD */
+#endif /* NM_VPN_OLD */
 
 #endif /* NM_NETWORKMANAGER_COMPILATION_LIB_EDITOR */
 


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