Add fallback min/max for compilers that don't have statement expressions
authorMichael Forney <mforney@mforney.org>
Mon, 17 Jun 2019 00:05:30 +0000 (17:05 -0700)
committerMichael Forney <mforney@mforney.org>
Thu, 6 Feb 2020 04:30:39 +0000 (20:30 -0800)
commit06ef34c86bc9c50ac18063121be761d99f816636
tree28713b15584786c0e507c7c7ca966d085c76d58a
parente74ba891f7f4d4e98133ffbc1cda0b671df5f008
Add fallback min/max for compilers that don't have statement expressions

Statement expressions are a GNU C extension and are not available
in ISO C.

On compilers that don't have them, define these macros as plain
conditional expressions, since they are only ever used with expressions
that have no side-effects.

The statement-expression version is still retained as an added
safety measure on GNU-compatible compilers.

Signed-off-by: Michael Forney <mforney@mforney.org>
libevdev/libevdev-util.h