diff options
| -rw-r--r-- | Makefile.am | 3 | ||||
| -rw-r--r-- | bgpd/bgp_vty.c | 8 | ||||
| -rw-r--r-- | bgpd/bgpd.c | 2 | ||||
| -rwxr-xr-x | configure.ac | 8 | ||||
| -rw-r--r-- | doc/developer/workflow.rst | 2 | ||||
| -rw-r--r-- | lib/linklist.h | 2 | ||||
| -rw-r--r-- | lib/stream.h | 2 | ||||
| -rw-r--r-- | lib/workqueue.h | 2 | ||||
| -rw-r--r-- | lib/zclient.h | 4 | ||||
| -rw-r--r-- | ospf6d/ospf6_top.c | 4 |
10 files changed, 21 insertions, 16 deletions
diff --git a/Makefile.am b/Makefile.am index ed22c60e7c..f9fb231962 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,8 +5,7 @@ include common.am AM_CPPFLAGS += -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/lib \ -I$(top_builddir) -I$(top_builddir)/include -I$(top_builddir)/lib -VERSION_TYPE := $(shell if echo $(VERSION) | grep -q '^[0-9\.]*$$'; then echo RELEASE ; else echo DEV ; fi) -DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DCONFDATE=$(CONFDATE) -DVERSION_TYPE_$(VERSION_TYPE) +DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DCONFDATE=$(CONFDATE) LIBCAP = @LIBCAP@ EXTRA_DIST = diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 2acf39a699..f63d591d6f 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -772,7 +772,7 @@ static void bgp_clear_star_soft_out(struct vty *vty, const char *name) #endif /* BGP global configuration. */ -#if defined(VERSION_TYPE_DEV) && (CONFDATE > 20190601) +#if (CONFDATE > 20190601) CPP_NOTICE("bgpd: time to remove deprecated bgp multiple-instance") CPP_NOTICE("This includes BGP_OPT_MULTIPLE_INSTANCE") #endif @@ -806,7 +806,7 @@ DEFUN_HIDDEN (no_bgp_multiple_instance, return CMD_SUCCESS; } -#if defined(VERSION_TYPE_DEV) && (CONFDATE > 20190601) +#if (CONFDATE > 20190601) CPP_NOTICE("bgpd: time to remove deprecated cli bgp config-type cisco") CPP_NOTICE("This includes BGP_OPT_CISCO_CONFIG") #endif @@ -2013,7 +2013,7 @@ DEFUN (no_bgp_fast_external_failover, } /* "bgp enforce-first-as" configuration. */ -#if defined(VERSION_TYPE_DEV) && CONFDATE > 20180517 +#if CONFDATE > 20180517 CPP_NOTICE("bgpd: remove deprecated '[no] bgp enforce-first-as' commands") #endif @@ -9138,7 +9138,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, uint8_t use_json, uptime -= p->uptime; epoch_tbuf = time(NULL) - uptime; -#if defined(VERSION_TYPE_DEV) && CONFDATE > 20200101 +#if CONFDATE > 20200101 CPP_NOTICE( "bgpTimerUp should be deprecated and can be removed now"); #endif diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index e5b269eb70..b5fb653bae 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -7356,7 +7356,7 @@ static void bgp_config_write_family(struct vty *vty, struct bgp *bgp, afi_t afi, } /* clang-format off */ -#if defined(VERSION_TYPE_DEV) && CONFDATE > 20180517 +#if CONFDATE > 20180517 CPP_NOTICE("bgpd: remove 'bgp enforce-first-as' config migration from bgp_config_write") #endif /* clang-format on */ diff --git a/configure.ac b/configure.ac index 8846fcdf71..69a55d01ec 100755 --- a/configure.ac +++ b/configure.ac @@ -1832,7 +1832,13 @@ AM_CONDITIONAL([ZEROMQ], test "x$ZEROMQ" = "xtrue") dnl ---------- dnl configure date dnl ---------- -CONFDATE=`date '+%Y%m%d'` +dev_version=`echo $VERSION | grep dev` +#don't expire deprecated code in non 'dev' branch +if test "${dev_version}" = ""; then + CONFDATE=0 +else + CONFDATE=`date '+%Y%m%d'` +fi AC_SUBST(CONFDATE) dnl ------------------------------ diff --git a/doc/developer/workflow.rst b/doc/developer/workflow.rst index cd03d2733d..358cb9ac7b 100644 --- a/doc/developer/workflow.rst +++ b/doc/developer/workflow.rst @@ -776,7 +776,7 @@ annotations must be ignored non-development branches. For example: .. code-block:: c - #if defined(VERSION_TYPE_DEV) && CONFDATE > 20180403 + #if CONFDATE > 20180403 CPP_NOTICE("Use of <XYZ> is deprecated, please use <ABC>") #endif diff --git a/lib/linklist.h b/lib/linklist.h index 1e2631ea46..cee6c1e505 100644 --- a/lib/linklist.h +++ b/lib/linklist.h @@ -232,7 +232,7 @@ extern void list_sort(struct list *list, * and remove list_delete_original and the list_delete #define * Additionally remove list_free entirely */ -#if defined(VERSION_TYPE_DEV) && CONFDATE > 20181001 +#if CONFDATE > 20181001 CPP_NOTICE("list_delete without double pointer is deprecated, please fixup") #endif diff --git a/lib/stream.h b/lib/stream.h index 11af85c663..e808f039c6 100644 --- a/lib/stream.h +++ b/lib/stream.h @@ -133,7 +133,7 @@ struct stream_fifo { #define STREAM_CONCAT_REMAIN(S1, S2, size) ((size) - (S1)->endp - (S2)->endp) /* deprecated macros - do not use in new code */ -#if defined(VERSION_TYPE_DEV) && CONFDATE > 20181128 +#if CONFDATE > 20181128 CPP_NOTICE("lib: time to remove deprecated stream.h macros") #endif #define STREAM_PNT(S) stream_pnt((S)) diff --git a/lib/workqueue.h b/lib/workqueue.h index 6085820393..fe1700f8de 100644 --- a/lib/workqueue.h +++ b/lib/workqueue.h @@ -154,7 +154,7 @@ extern struct work_queue *work_queue_new(struct thread_master *, const char *); * The usage of work_queue_free is being transitioned to pass * in the double pointer to remove use after free's. */ -#if defined(VERSION_TYPE_DEV) && CONFDATE > 20190205 +#if CONFDATE > 20190205 CPP_NOTICE("work_queue_free without double pointer is deprecated, please fixup") #endif extern void work_queue_free_and_null(struct work_queue **); diff --git a/lib/zclient.h b/lib/zclient.h index ad98b8db87..10a1723010 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -457,7 +457,7 @@ struct zclient_options { extern struct zclient *zclient_new(struct thread_master *); /* clang-format off */ -#if defined(VERSION_TYPE_DEV) && CONFDATE > 20181101 +#if CONFDATE > 20181101 CPP_NOTICE("zclient_new_notify can take over or zclient_new now"); #endif /* clang-format on */ @@ -598,7 +598,7 @@ extern void zebra_interface_if_set_value(struct stream *, struct interface *); extern void zebra_router_id_update_read(struct stream *s, struct prefix *rid); /* clang-format off */ -#if defined(VERSION_TYPE_DEV) && CONFDATE > 20180823 +#if CONFDATE > 20180823 CPP_NOTICE("zapi_ipv4_route, zapi_ipv6_route, zapi_ipv4_route_ipv6_nexthop as well as the zapi_ipv4 and zapi_ipv6 data structures should be removed now"); #endif /* clang-format on */ diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 7bf099fbbf..fde47c74fe 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -425,13 +425,13 @@ DEFUN(no_ospf6_router_id, return CMD_SUCCESS; } -#if defined(VERSION_TYPE_DEV) && CONFDATE > 20180828 +#if CONFDATE > 20180828 CPP_NOTICE("ospf6: `router-id A.B.C.D` deprecated 2017/08/28") #endif ALIAS_HIDDEN(ospf6_router_id, ospf6_router_id_hdn_cmd, "router-id A.B.C.D", "Configure OSPF6 Router-ID\n" V4NOTATION_STR) -#if defined(VERSION_TYPE_DEV) && CONFDATE > 20180828 +#if CONFDATE > 20180828 CPP_NOTICE("ospf6: `no router-id A.B.C.D` deprecated 2017/08/28") #endif ALIAS_HIDDEN(no_ospf6_router_id, no_ospf6_router_id_hdn_cmd, |
