mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-06 10:57:38 +00:00
Merge pull request #2652 from LabNConsulting/working/master/confdate_cleanup
Simplify deprecation check
This commit is contained in:
commit
c4aee4fe31
@ -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 =
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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 ------------------------------
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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 **);
|
||||
|
||||
@ -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 */
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user