]> git.ipfire.org Git - thirdparty/kmod.git/commit
Convert most #ifdef HAVE_FOO checks to #if HAVE_FOO
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 24 May 2025 15:21:18 +0000 (16:21 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 30 May 2025 14:02:15 +0000 (09:02 -0500)
commit1996121ec105198928f37cdd16f87e2ac0a206e3
tree8a743c4b3ec441187f6c9a0907ca6d771348a48b
parentdcd652b57c6e60b15cfe8e5791f94e152e08063a
Convert most #ifdef HAVE_FOO checks to #if HAVE_FOO

The former is somewhat error prone, since the pre-processor will
evaluate the presence of the define, which might have been omitted due
to wrong include or otherwise.

Swap for the other solution we already have in-tree - always set the
relevant define(s) and evaluate them numerically. That combined with
-Wundef means that we'll get meaningful compiler warning when we get
something wrong.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/356
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-internal.h
meson.build
shared/macro.h
testsuite/path.c