libnm-util, libnm-glib: add NM_VERSION_1_0, NM_DEPRECATED_IN_1_0, and NM_DEPRECATED_IN_1_0 macros

System Internals / NetworkManager - Thomas Haller [redhat.com] - 27 June 2014 13:39 UTC



###

diff --git a/include/nm-version.h.in b/include/nm-version.h.in
index 711bfa9..e702ae8 100644
--- a/include/nm-version.h.in
+++ b/include/nm-version.h.in
@@ -66,18 +66,10 @@

#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))

-#if (NM_MICRO_VERSION % 2)
-#define NM_VERSION_CUR_STABLE (NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION - 1))
-#else
-#define NM_VERSION_CUR_STABLE (NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION))
-#endif
-
-#if (NM_MICRO_VERSION % 2)
-#define NM_VERSION_NEXT_STABLE (NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION +1))
-#else
-#define NM_VERSION_NEXT_STABLE (NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION + 2))
-#endif
+#define NM_VERSION_CUR_STABLE NM_VERSION_0_9_10
+#define NM_VERSION_NEXT_STABLE NM_VERSION_1_0

#if !defined (NM_VERSION_MIN_REQUIRED) || (NM_VERSION_MIN_REQUIRED == 0)
# undef NM_VERSION_MIN_REQUIRED
@@ -108,11 +100,25 @@
# define NM_DEPRECATED_IN_0_9_10_FOR(f)
#endif

+#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_0
+# define NM_DEPRECATED_IN_1_0 G_DEPRECATED
+# define NM_DEPRECATED_IN_1_0_FOR(f) G_DEPRECATED_FOR(f)
+#else
+# define NM_DEPRECATED_IN_1_0
+# define NM_DEPRECATED_IN_1_0_FOR(f)
+#endif
+
#if NM_VERSION_MAX_ALLOWED < NM_VERSION_0_9_10
# define NM_AVAILABLE_IN_0_9_10 G_UNAVAILABLE(0.9,10)
#else
# define NM_AVAILABLE_IN_0_9_10
#endif

+#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_0
+# define NM_AVAILABLE_IN_1_0 G_UNAVAILABLE(1,0)
+#else
+# define NM_AVAILABLE_IN_1_0
+#endif
+
#endif /* NM_VERSION_H */

87c4802 libnm-util, libnm-glib: add NM_VERSION_1_0, NM_DEPRECATED_IN_1_0, and NM_DEPRECATED_IN_1_0 macros
include/nm-version.h.in | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)

Upstream: cgit.freedesktop.org


  • Share