[network-manager-openvpn/th/include-nm-default-bgo761198: 2/7] all: include nm-default.h everywhere
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/th/include-nm-default-bgo761198: 2/7] all: include nm-default.h everywhere
- Date: Wed, 27 Jan 2016 20:43:33 +0000 (UTC)
commit 6cf0e80675c0483f1f13f8af6c255b993c8598fe
Author: Thomas Haller <thaller redhat com>
Date: Wed Jan 27 15:31:45 2016 +0100
all: include nm-default.h everywhere
Thereby remove "common/nm-glib-compat.h" as g_clear_pointer()
is now provided by "shared/nm-glib.h".
auth-dialog/Makefile.am | 1 +
auth-dialog/main.c | 3 +-
common/Makefile.am | 11 +++----
common/nm-glib-compat.h | 49 -------------------------------
common/utils.c | 3 ++
properties/Makefile.am | 4 ++-
properties/auth-helpers.c | 2 +-
properties/import-export.c | 2 +-
properties/nm-openvpn.c | 3 +-
properties/tests/Makefile.am | 4 ++-
properties/tests/test-import-export.c | 2 +
src/Makefile.am | 1 +
src/nm-openvpn-service-openvpn-helper.c | 4 +-
src/nm-openvpn-service.c | 4 +-
14 files changed, 28 insertions(+), 65 deletions(-)
---
diff --git a/auth-dialog/Makefile.am b/auth-dialog/Makefile.am
index 8d9827a..eed5841 100644
--- a/auth-dialog/Makefile.am
+++ b/auth-dialog/Makefile.am
@@ -6,6 +6,7 @@ nm_openvpn_auth_dialog_CPPFLAGS = \
$(LIBNM_CFLAGS) \
$(LIBNMA_CFLAGS) \
$(LIBSECRET_CFLAGS) \
+ -I$(top_srcdir)/shared \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
-DBINDIR=\""$(bindir)"\" \
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index 6283b3a..ad4e675 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -29,12 +29,13 @@
#include <errno.h>
#include <string.h>
#include <stdlib.h>
-#include <glib/gi18n.h>
#include <gtk/gtk.h>
#define SECRET_API_SUBJECT_TO_CHANGE
#include <libsecret/secret.h>
+#include "nm-default.h"
+
#include <NetworkManager.h>
#include <nm-vpn-service-plugin.h>
#include <nma-vpn-password-dialog.h>
diff --git a/common/Makefile.am b/common/Makefile.am
index f99bfd0..f20671e 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -5,17 +5,18 @@ endif
libnm_vpn_plugin_openvpn_common_la_CPPFLAGS = \
$(LIBNM_CFLAGS) \
- -I$(top_srcdir)/src/
+ -I$(top_srcdir)/shared/ \
+ -I$(top_srcdir)/src/
libnm_openvpn_common_la_CPPFLAGS = \
-DNM_OPENVPN_OLD \
$(LIBNM_GLIB_CFLAGS) \
- -I$(top_srcdir)/src/
+ -I$(top_srcdir)/shared/ \
+ -I$(top_srcdir)/src/
libnm_vpn_plugin_openvpn_common_la_SOURCES= \
utils.c \
- utils.h \
- nm-glib-compat.h
+ utils.h
libnm_openvpn_common_la_SOURCES = \
$(libnm_vpn_plugin_openvpn_common_la_SOURCES)
@@ -25,5 +26,3 @@ libnm_vpn_plugin_openvpn_common_la_LIBADD = \
libnm_openvpn_common_la_LIBADD = \
$(LIBNM_GLIB_LIBS)
-
-EXTRA_DIST = nm-glib-compat.h
diff --git a/common/utils.c b/common/utils.c
index 3cdfbe2..4d0425a 100644
--- a/common/utils.c
+++ b/common/utils.c
@@ -20,6 +20,9 @@
*/
#include <string.h>
+
+#include "nm-default.h"
+
#ifdef NM_OPENVPN_OLD
#include <nm-setting-8021x.h>
#else
diff --git a/properties/Makefile.am b/properties/Makefile.am
index e9222c5..68e75da 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -23,7 +23,9 @@ ui_DATA = nm-openvpn-dialog.ui
common_CFLAGS = \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
+ -I$(top_srcdir)/shared \
-I$(top_srcdir)/src \
+ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \
-DICONDIR=\""$(datadir)/pixmaps"\" \
-DUIDIR=\""$(uidir)"\" \
-DLOCALEDIR=\"$(datadir)/locale\"
@@ -34,7 +36,7 @@ libnm_vpn_plugin_openvpn_la_CFLAGS = \
$(LIBNMA_CFLAGS)
libnm_openvpn_properties_la_CFLAGS = \
- -DNM_OPENVPN_OLD \
+ -DNM_OPENVPN_OLD \
$(common_CFLAGS) \
$(LIBNM_GLIB_CFLAGS) \
$(LIBNM_GTK_CFLAGS)
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index f1cc9ad..4b364ba 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -33,7 +33,7 @@
#include <unistd.h>
#include <errno.h>
-#include <glib/gi18n-lib.h>
+#include "nm-default.h"
#ifdef NM_OPENVPN_OLD
#define NM_VPN_LIBNM_COMPAT
diff --git a/properties/import-export.c b/properties/import-export.c
index 3adcf3e..3c2a8a2 100644
--- a/properties/import-export.c
+++ b/properties/import-export.c
@@ -34,7 +34,7 @@
#include <ctype.h>
#include <stdio.h>
-#include <glib/gi18n-lib.h>
+#include "nm-default.h"
#ifdef NM_OPENVPN_OLD
#define NM_VPN_LIBNM_COMPAT
diff --git a/properties/nm-openvpn.c b/properties/nm-openvpn.c
index 18183d1..81b31a7 100644
--- a/properties/nm-openvpn.c
+++ b/properties/nm-openvpn.c
@@ -33,10 +33,11 @@
#include <arpa/inet.h>
#include <errno.h>
#include <stdlib.h>
-#include <glib/gi18n-lib.h>
#include <string.h>
#include <gtk/gtk.h>
+#include "nm-default.h"
+
#ifdef NM_OPENVPN_OLD
#define NM_VPN_LIBNM_COMPAT
#include <nm-vpn-plugin-ui-interface.h>
diff --git a/properties/tests/Makefile.am b/properties/tests/Makefile.am
index 767ca9e..9f17753 100644
--- a/properties/tests/Makefile.am
+++ b/properties/tests/Makefile.am
@@ -1,6 +1,8 @@
SUBDIRS = conf
-AM_CFLAGS = -I${top_srcdir}
+AM_CFLAGS = \
+ -I${top_srcdir}/shared \
+ -I${top_srcdir}
noinst_PROGRAMS = test-import-export
diff --git a/properties/tests/test-import-export.c b/properties/tests/test-import-export.c
index a04f9fc..6e25e74 100644
--- a/properties/tests/test-import-export.c
+++ b/properties/tests/test-import-export.c
@@ -23,6 +23,8 @@
#include <arpa/inet.h>
#include <locale.h>
+#include "nm-default.h"
+
#include <NetworkManager.h>
#include "nm-test-helpers.h"
diff --git a/src/Makefile.am b/src/Makefile.am
index 68dc516..29a8105 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,7 @@
AM_CPPFLAGS = \
$(GLIB_CFLAGS) \
$(LIBNM_CFLAGS) \
+ -I$(top_srcdir)/shared \
-DBINDIR=\"$(bindir)\" \
-DPREFIX=\""$(prefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
diff --git a/src/nm-openvpn-service-openvpn-helper.c b/src/nm-openvpn-service-openvpn-helper.c
index 50027f9..1144906 100644
--- a/src/nm-openvpn-service-openvpn-helper.c
+++ b/src/nm-openvpn-service-openvpn-helper.c
@@ -23,10 +23,8 @@
* (C) Copyright 2005 Tim Niemueller
*
* $Id: nm-openvpn-service-openvpn-helper.c 4170 2008-10-11 14:44:45Z dcbw $
- *
*/
-#include <glib.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
@@ -39,6 +37,8 @@
#include <ctype.h>
#include <netdb.h>
+#include "nm-default.h"
+
#include <NetworkManager.h>
#include "nm-openvpn-service.h"
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 7ec7a22..f82ef15 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -27,7 +27,6 @@
#include <config.h>
#endif
-#include <glib/gi18n.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -47,6 +46,8 @@
#include <pwd.h>
#include <grp.h>
+#include "nm-default.h"
+
#include <NetworkManager.h>
#include <nm-vpn-service-plugin.h>
#include <nm-setting-vpn.h>
@@ -54,7 +55,6 @@
#include "nm-openvpn-service.h"
#include "nm-utils.h"
#include "../common/utils.h"
-#include "../common/nm-glib-compat.h"
#if !defined(DIST_VERSION)
# define DIST_VERSION VERSION
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]