]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: compiler: add a TOSTR() macro to turn a value into a string
authorWilly Tarreau <w@1wt.eu>
Mon, 20 Feb 2023 18:18:47 +0000 (19:18 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 22 Feb 2023 08:10:53 +0000 (09:10 +0100)
commit27629a7d65915361b88b1500d2470114cd0c3dd6
treeede814742f093e54562199eafc527d824628cc3f
parent25917cdb12412378a80e755ffc18b5cb67c36fd2
MINOR: compiler: add a TOSTR() macro to turn a value into a string

Pretty often we have to emit a value (setting, limit etc) in an error
message, and this value is known at compile-time, and just doing this
forces to use a printf format such as "%d". Let's have a simple macro
to turn any other macro or value into a string that can be concatenated
with the rest of the string around. This simplifies error messages
production on the CLI for example.
include/haproxy/compiler.h