]> git.proxmox.com Git - mirror_frr.git/commit - lib/zlog.c
lib: rework how we "override" assert()
authorDavid Lamparter <equinox@diac24.net>
Tue, 16 Mar 2021 10:03:44 +0000 (11:03 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Sun, 2 May 2021 14:27:17 +0000 (16:27 +0200)
commit64dd77361f7ab97365d264408afb538097c0339c
treefb9350dd6f43fae80b8d3e67cbb285901f42e125
parent642ac49da40a196c4e4ad74128de2056237d3cb4
lib: rework how we "override" assert()

The previous method, using zassert.h and hoping nothing includes
assert.h (which, on glibc at least, just does "#undef assert" and puts
its own definition in...) was fragile - and actually broke undetected.

Just provide our own assert.h and control overriding by putting it in a
separate directory to add to the include path (or not.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
12 files changed:
Makefile.am
lib/assert/assert.h [new file with mode: 0644]
lib/clippy.c
lib/log.c
lib/subdir.am
lib/xref.h
lib/zlog.c
tests/.gitignore
tests/lib/test_assert.c [new file with mode: 0644]
tests/lib/test_assert.py [new file with mode: 0644]
tests/subdir.am
tools/subdir.am