summary refs log tree commit diff
path: root/libnm-util
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-util')
-rw-r--r--libnm-util/Makefile.am10
-rw-r--r--libnm-util/Makefile.in19
-rw-r--r--libnm-util/NetworkManager.h4
-rw-r--r--libnm-util/nm-setting-adsl.c7
-rw-r--r--libnm-util/nm-setting-cdma.c2
-rw-r--r--libnm-util/nm-setting-ip6-config.c1
-rw-r--r--libnm-util/nm-setting-vlan.c2
-rw-r--r--libnm-util/nm-utils-enum-types.c4
-rw-r--r--libnm-util/nm-version.h (renamed from libnm-util/nm-version.h.in)58
-rw-r--r--libnm-util/tests/Makefile.am1
-rw-r--r--libnm-util/tests/Makefile.in2
11 files changed, 38 insertions, 72 deletions
diff --git a/libnm-util/Makefile.am b/libnm-util/Makefile.am
index fbf8c0b3..f83780dc 100644
--- a/libnm-util/Makefile.am
+++ b/libnm-util/Makefile.am
@@ -5,6 +5,7 @@ SUBDIRS = . tests
 AM_CPPFLAGS = \
 	-I${top_srcdir} \
 	-I${top_srcdir}/include \
+	-I$(top_builddir)/include \
 	-DG_LOG_DOMAIN=\""libnm-util"\" \
 	-DLOCALEDIR=\"$(datadir)/locale\" \
 	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
@@ -23,6 +24,7 @@ endif
 lib_LTLIBRARIES=libnm-util.la
 
 libnm_util_include_HEADERS = 		\
+	$(top_builddir)/include/nm-version-macros.h \
 	NetworkManager.h		\
 	NetworkManagerVPN.h		\
 	nm-connection.h			\
@@ -53,11 +55,11 @@ libnm_util_include_HEADERS = 		\
 	nm-setting-wireless.h		\
 	nm-setting-wireless-security.h	\
 	nm-setting-vpn.h		\
-	nm-utils.h
+	nm-utils.h \
+	nm-version.h
 
 nodist_libnm_util_include_HEADERS = \
-	nm-utils-enum-types.h		\
-	nm-version.h
+	nm-utils-enum-types.h
 
 libnm_util_la_private_headers = \
 	crypto.h			\
@@ -156,7 +158,7 @@ pkgconfig_DATA = libnm-util.pc
 
 DISTCLEANFILES = libnm-util.pc
 
-EXTRA_DIST = libnm-util.pc.in libnm-util.ver nm-version.h.in
+EXTRA_DIST = libnm-util.pc.in libnm-util.ver
 
 -include $(INTROSPECTION_MAKEFILE)
 INTROSPECTION_GIRS =
diff --git a/libnm-util/Makefile.in b/libnm-util/Makefile.in
index 327b3234..03f0eb24 100644
--- a/libnm-util/Makefile.in
+++ b/libnm-util/Makefile.in
@@ -122,7 +122,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(libnm_util_include_HEADERS) \
 	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = libnm-util.pc nm-version.h
+CONFIG_CLEAN_FILES = libnm-util.pc
 CONFIG_CLEAN_VPATH_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
@@ -293,8 +293,7 @@ ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libnm-util.pc.in \
-	$(srcdir)/nm-version.h.in $(top_srcdir)/build-aux/depcomp \
-	COPYING
+	$(top_srcdir)/build-aux/depcomp COPYING
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -443,6 +442,7 @@ LOG_DRIVER = @LOG_DRIVER@
 LTLIBICONV = @LTLIBICONV@
 LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -585,12 +585,13 @@ with_resolvconf = @with_resolvconf@
 with_valgrind = @with_valgrind@
 SUBDIRS = . tests
 AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/include \
-	-DG_LOG_DOMAIN=\""libnm-util"\" \
+	-I$(top_builddir)/include -DG_LOG_DOMAIN=\""libnm-util"\" \
 	-DLOCALEDIR=\"$(datadir)/locale\" \
 	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE $(GLIB_CFLAGS) \
 	$(DBUS_CFLAGS) $(UUID_CFLAGS) $(am__append_1) $(am__append_2)
 lib_LTLIBRARIES = libnm-util.la
 libnm_util_include_HEADERS = \
+	$(top_builddir)/include/nm-version-macros.h \
 	NetworkManager.h		\
 	NetworkManagerVPN.h		\
 	nm-connection.h			\
@@ -621,11 +622,11 @@ libnm_util_include_HEADERS = \
 	nm-setting-wireless.h		\
 	nm-setting-wireless-security.h	\
 	nm-setting-vpn.h		\
-	nm-utils.h
+	nm-utils.h \
+	nm-version.h
 
 nodist_libnm_util_include_HEADERS = \
-	nm-utils-enum-types.h		\
-	nm-version.h
+	nm-utils-enum-types.h
 
 libnm_util_la_private_headers = \
 	crypto.h			\
@@ -694,7 +695,7 @@ libtest_crypto_la_LIBADD = $(GLIB_LIBS) $(am__append_8) \
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libnm-util.pc
 DISTCLEANFILES = libnm-util.pc
-EXTRA_DIST = libnm-util.pc.in libnm-util.ver nm-version.h.in
+EXTRA_DIST = libnm-util.pc.in libnm-util.ver
 INTROSPECTION_GIRS = $(am__append_11)
 INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
@@ -747,8 +748,6 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 libnm-util.pc: $(top_builddir)/config.status $(srcdir)/libnm-util.pc.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-nm-version.h: $(top_builddir)/config.status $(srcdir)/nm-version.h.in
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
diff --git a/libnm-util/NetworkManager.h b/libnm-util/NetworkManager.h
index e8dec062..d83e4ab5 100644
--- a/libnm-util/NetworkManager.h
+++ b/libnm-util/NetworkManager.h
@@ -26,7 +26,9 @@
 #ifndef NETWORK_MANAGER_H
 #define NETWORK_MANAGER_H
 
-#include "nm-version.h"
+/* This header must not include glib or libnm. */
+
+#include <nm-version-macros.h>
 
 /*
  * dbus services details
diff --git a/libnm-util/nm-setting-adsl.c b/libnm-util/nm-setting-adsl.c
index 5355011c..51560a78 100644
--- a/libnm-util/nm-setting-adsl.c
+++ b/libnm-util/nm-setting-adsl.c
@@ -287,6 +287,7 @@ set_property (GObject *object, guint prop_id,
               const GValue *value, GParamSpec *pspec)
 {
 	NMSettingAdslPrivate *priv = NM_SETTING_ADSL_GET_PRIVATE (object);
+	const char *str;
 
 	switch (prop_id) {
 	case PROP_USERNAME:
@@ -302,11 +303,13 @@ set_property (GObject *object, guint prop_id,
 		break;
 	case PROP_PROTOCOL:
 		g_free (priv->protocol);
-		priv->protocol = g_ascii_strdown (g_value_get_string (value), -1);
+		str = g_value_get_string (value);
+		priv->protocol = str ? g_ascii_strdown (str, -1) : NULL;
 		break;
 	case PROP_ENCAPSULATION:
 		g_free (priv->encapsulation);
-		priv->encapsulation = g_ascii_strdown (g_value_get_string (value), -1);
+		str = g_value_get_string (value);
+		priv->encapsulation = str ? g_ascii_strdown (str, -1) : NULL;
 		break;
 	case PROP_VPI:
 		priv->vpi = g_value_get_uint (value);
diff --git a/libnm-util/nm-setting-cdma.c b/libnm-util/nm-setting-cdma.c
index 53f886ec..94b10b1f 100644
--- a/libnm-util/nm-setting-cdma.c
+++ b/libnm-util/nm-setting-cdma.c
@@ -167,7 +167,7 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
 		g_set_error_literal (error,
 		                     NM_SETTING_CDMA_ERROR,
 		                     NM_SETTING_CDMA_ERROR_INVALID_PROPERTY,
-		                     _("property is empty'"));
+		                     _("property is empty"));
 		g_prefix_error (error, "%s.%s: ", NM_SETTING_CDMA_SETTING_NAME, NM_SETTING_CDMA_NUMBER);
 		return FALSE;
 	}
diff --git a/libnm-util/nm-setting-ip6-config.c b/libnm-util/nm-setting-ip6-config.c
index 4e69a072..b929ebac 100644
--- a/libnm-util/nm-setting-ip6-config.c
+++ b/libnm-util/nm-setting-ip6-config.c
@@ -854,7 +854,6 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
 			g_set_error (error,
 			             NM_SETTING_IP6_CONFIG_ERROR,
 			             NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD,
-			             _("'%s' not allowed for %s=%s"),
 			             _("this property is not allowed for '%s=%s'"),
 			             NM_SETTING_IP6_CONFIG_METHOD, priv->method);
 			g_prefix_error (error, "%s.%s: ", NM_SETTING_IP6_CONFIG_SETTING_NAME, NM_SETTING_IP6_CONFIG_DNS);
diff --git a/libnm-util/nm-setting-vlan.c b/libnm-util/nm-setting-vlan.c
index 43b6a91c..d3bc0a37 100644
--- a/libnm-util/nm-setting-vlan.c
+++ b/libnm-util/nm-setting-vlan.c
@@ -806,7 +806,7 @@ nm_setting_vlan_class_init (NMSettingVlanClass *setting_class)
 	g_object_class_install_property
 		(object_class, PROP_FLAGS,
 		 g_param_spec_uint (NM_SETTING_VLAN_FLAGS, "", "",
-		                    0, G_MAXUINT32, 0,
+		                    0, G_MAXUINT32, NM_VLAN_FLAG_REORDER_HEADERS,
 		                    G_PARAM_READWRITE |
 		                    G_PARAM_CONSTRUCT |
 		                    NM_SETTING_PARAM_INFERRABLE |
diff --git a/libnm-util/nm-utils-enum-types.c b/libnm-util/nm-utils-enum-types.c
index 6ef157da..e5dde28e 100644
--- a/libnm-util/nm-utils-enum-types.c
+++ b/libnm-util/nm-utils-enum-types.c
@@ -5,6 +5,7 @@
 
 #include "nm-utils-enum-types.h"
 
+#include "nm-version-macros.h" 
 #include "nm-connection.h" 
 #include "nm-setting.h" 
 #include "nm-setting-8021x.h" 
@@ -33,7 +34,8 @@
 #include "nm-setting-wireless.h" 
 #include "nm-setting-wireless-security.h" 
 #include "nm-setting-vpn.h" 
-#include "nm-utils.h"
+#include "nm-utils.h" 
+#include "nm-version.h"
 
 GType
 nm_connection_error_get_type (void)
diff --git a/libnm-util/nm-version.h.in b/libnm-util/nm-version.h
index e00f4055..68955099 100644
--- a/libnm-util/nm-version.h.in
+++ b/libnm-util/nm-version.h
@@ -23,60 +23,10 @@
 
 #include <glib.h>
 
-/**
- * NM_MAJOR_VERSION:
- *
- * Evaluates to the major version number of NetworkManager which this source
- * is compiled against.
- */
-#define NM_MAJOR_VERSION (@NM_MAJOR_VERSION@)
-
-/**
- * NM_MINOR_VERSION:
- *
- * Evaluates to the minor version number of NetworkManager which this source
- * is compiled against.
- */
-#define NM_MINOR_VERSION (@NM_MINOR_VERSION@)
-
-/**
- * NM_MICRO_VERSION:
- *
- * Evaluates to the micro version number of NetworkManager which this source
- * compiled against.
- */
-#define NM_MICRO_VERSION (@NM_MICRO_VERSION@)
-
-/**
- * NM_CHECK_VERSION:
- * @major: major version (e.g. 1 for version 1.2.5)
- * @minor: minor version (e.g. 2 for version 1.2.5)
- * @micro: micro version (e.g. 5 for version 1.2.5)
- *
- * Returns: %TRUE if the version of the NetworkManager header files
- * is the same as or newer than the passed-in version.
- */
-#define NM_CHECK_VERSION(major,minor,micro)                         \
-    (NM_MAJOR_VERSION > (major) ||                                  \
-     (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION > (minor)) || \
-     (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION == (minor) && NM_MICRO_VERSION >= (micro)))
-
+#include <nm-version-macros.h>
 
 /* Deprecation / Availability macros */
 
-#define NM_ENCODE_VERSION(major,minor,micro) ((major) << 16 | (minor) << 8 | (micro))
-
-#define NM_VERSION_0_9_8  (NM_ENCODE_VERSION (0, 9, 8))
-#define NM_VERSION_0_9_10 (NM_ENCODE_VERSION (0, 9, 10))
-#define NM_VERSION_1_0    (NM_ENCODE_VERSION (1, 0, 0))
-#define NM_VERSION_1_0_2  (NM_ENCODE_VERSION (1, 0, 2))
-#define NM_VERSION_1_0_4  (NM_ENCODE_VERSION (1, 0, 4))
-#define NM_VERSION_1_0_6  (NM_ENCODE_VERSION (1, 0, 6))
-#define NM_VERSION_1_0_8  (NM_ENCODE_VERSION (1, 0, 8))
-
-#define NM_VERSION_CUR_STABLE  NM_VERSION_1_0_6
-#define NM_VERSION_NEXT_STABLE NM_VERSION_1_0_8
-
 #if !defined (NM_VERSION_MIN_REQUIRED) || (NM_VERSION_MIN_REQUIRED == 0)
 # undef NM_VERSION_MIN_REQUIRED
 # define NM_VERSION_MIN_REQUIRED (NM_VERSION_CUR_STABLE)
@@ -138,4 +88,10 @@
 # define NM_AVAILABLE_IN_1_0_6
 #endif
 
+#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_0_8
+# define NM_AVAILABLE_IN_1_0_8          G_UNAVAILABLE(1,0.8)
+#else
+# define NM_AVAILABLE_IN_1_0_8
+#endif
+
 #endif  /* NM_VERSION_H */
diff --git a/libnm-util/tests/Makefile.am b/libnm-util/tests/Makefile.am
index 16a7f8f3..e580a134 100644
--- a/libnm-util/tests/Makefile.am
+++ b/libnm-util/tests/Makefile.am
@@ -2,6 +2,7 @@ if ENABLE_TESTS
 
 AM_CPPFLAGS = \
 	-I$(top_srcdir)/include \
+	-I$(top_builddir)/include \
 	-I$(top_srcdir)/libnm-util \
 	-I$(top_builddir)/libnm-util \
 	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
diff --git a/libnm-util/tests/Makefile.in b/libnm-util/tests/Makefile.in
index 0767e19a..df7ab974 100644
--- a/libnm-util/tests/Makefile.in
+++ b/libnm-util/tests/Makefile.in
@@ -570,6 +570,7 @@ LOG_DRIVER = @LOG_DRIVER@
 LTLIBICONV = @LTLIBICONV@
 LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -712,6 +713,7 @@ with_resolvconf = @with_resolvconf@
 with_valgrind = @with_valgrind@
 @ENABLE_TESTS_TRUE@AM_CPPFLAGS = \
 @ENABLE_TESTS_TRUE@	-I$(top_srcdir)/include \
+@ENABLE_TESTS_TRUE@	-I$(top_builddir)/include \
 @ENABLE_TESTS_TRUE@	-I$(top_srcdir)/libnm-util \
 @ENABLE_TESTS_TRUE@	-I$(top_builddir)/libnm-util \
 @ENABLE_TESTS_TRUE@	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \