diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-10-03 10:41:51 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-10-04 12:09:29 +0200 |
commit | 349cc4a507c4d84fcadf61f42159ea6412717896 (patch) | |
tree | 8d6e64af681fb4e1e41a1fc01b4f225f56aa147d /src/libsystemd/sd-bus | |
parent | meson: check for sys/auxv.h (diff) | |
download | systemd-349cc4a507c4d84fcadf61f42159ea6412717896.tar.xz systemd-349cc4a507c4d84fcadf61f42159ea6412717896.zip |
build-sys: use #if Y instead of #ifdef Y everywhere
The advantage is that is the name is mispellt, cpp will warn us.
$ git grep -Ee "conf.set\('(HAVE|ENABLE)_" -l|xargs sed -r -i "s/conf.set\('(HAVE|ENABLE)_/conf.set10('\1_/"
$ git grep -Ee '#ifn?def (HAVE|ENABLE)' -l|xargs sed -r -i 's/#ifdef (HAVE|ENABLE)/#if \1/; s/#ifndef (HAVE|ENABLE)/#if ! \1/;'
$ git grep -Ee 'if.*defined\(HAVE' -l|xargs sed -i -r 's/defined\((HAVE_[A-Z0-9_]*)\)/\1/g'
$ git grep -Ee 'if.*defined\(ENABLE' -l|xargs sed -i -r 's/defined\((ENABLE_[A-Z0-9_]*)\)/\1/g'
+ manual changes to meson.build
squash! build-sys: use #if Y instead of #ifdef Y everywhere
v2:
- fix incorrect setting of HAVE_LIBIDN2
Diffstat (limited to 'src/libsystemd/sd-bus')
-rw-r--r-- | src/libsystemd/sd-bus/bus-control.c | 2 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-kernel.c | 2 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/test-bus-gvariant.c | 6 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/test-bus-marshal.c | 8 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c index 3c770a6e2e..fcd4d27e07 100644 --- a/src/libsystemd/sd-bus/bus-control.c +++ b/src/libsystemd/sd-bus/bus-control.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#ifdef HAVE_VALGRIND_MEMCHECK_H +#if HAVE_VALGRIND_MEMCHECK_H #include <valgrind/memcheck.h> #endif diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c index 9b1dad9cfc..5a3c4d6f50 100644 --- a/src/libsystemd/sd-bus/bus-kernel.c +++ b/src/libsystemd/sd-bus/bus-kernel.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#ifdef HAVE_VALGRIND_MEMCHECK_H +#if HAVE_VALGRIND_MEMCHECK_H #include <valgrind/memcheck.h> #endif diff --git a/src/libsystemd/sd-bus/test-bus-gvariant.c b/src/libsystemd/sd-bus/test-bus-gvariant.c index e8301f9556..94fa964595 100644 --- a/src/libsystemd/sd-bus/test-bus-gvariant.c +++ b/src/libsystemd/sd-bus/test-bus-gvariant.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#ifdef HAVE_GLIB +#if HAVE_GLIB #include <glib.h> #endif @@ -155,7 +155,7 @@ static void test_marshal(void) { assert_se(bus_message_seal(m, 4711, 0) >= 0); -#ifdef HAVE_GLIB +#if HAVE_GLIB { GVariant *v; char *t; @@ -184,7 +184,7 @@ static void test_marshal(void) { assert_se(bus_message_get_blob(m, &blob, &sz) >= 0); -#ifdef HAVE_GLIB +#if HAVE_GLIB { GVariant *v; char *t; diff --git a/src/libsystemd/sd-bus/test-bus-marshal.c b/src/libsystemd/sd-bus/test-bus-marshal.c index e60c30b1b4..221dbd35cc 100644 --- a/src/libsystemd/sd-bus/test-bus-marshal.c +++ b/src/libsystemd/sd-bus/test-bus-marshal.c @@ -20,11 +20,11 @@ #include <math.h> #include <stdlib.h> -#ifdef HAVE_GLIB +#if HAVE_GLIB #include <gio/gio.h> #endif -#ifdef HAVE_DBUS +#if HAVE_DBUS #include <dbus/dbus.h> #endif @@ -215,7 +215,7 @@ int main(int argc, char *argv[]) { log_info("message size = %zu, contents =\n%s", sz, h); free(h); -#ifdef HAVE_GLIB +#if HAVE_GLIB { GDBusMessage *g; char *p; @@ -232,7 +232,7 @@ int main(int argc, char *argv[]) { } #endif -#ifdef HAVE_DBUS +#if HAVE_DBUS { DBusMessage *w; DBusError error; |