diff options
author | emersion <contact@emersion.fr> | 2018-11-18 00:33:06 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-11-18 00:33:06 +0100 |
commit | cad851805bea6b4777685df1c6adf8cb9fa71835 (patch) | |
tree | 145fcb048cc3df3d04a8b6afb90de68dd2dd80a9 /swayidle/main.c | |
parent | Merge pull request #3142 from RyanDwyer/move-view-properties (diff) | |
download | sway-cad851805bea6b4777685df1c6adf8cb9fa71835.tar.gz sway-cad851805bea6b4777685df1c6adf8cb9fa71835.tar.zst sway-cad851805bea6b4777685df1c6adf8cb9fa71835.zip |
Use #if instead of #ifdef
Diffstat (limited to 'swayidle/main.c')
-rw-r--r-- | swayidle/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/swayidle/main.c b/swayidle/main.c index 7d0f23f4..2b185949 100644 --- a/swayidle/main.c +++ b/swayidle/main.c | |||
@@ -18,10 +18,10 @@ | |||
18 | #include "config.h" | 18 | #include "config.h" |
19 | #include "idle-client-protocol.h" | 19 | #include "idle-client-protocol.h" |
20 | #include "list.h" | 20 | #include "list.h" |
21 | #ifdef SWAY_IDLE_HAS_SYSTEMD | 21 | #if HAVE_SYSTEMD |
22 | #include <systemd/sd-bus.h> | 22 | #include <systemd/sd-bus.h> |
23 | #include <systemd/sd-login.h> | 23 | #include <systemd/sd-login.h> |
24 | #elif defined(SWAY_IDLE_HAS_ELOGIND) | 24 | #elif HAVE_ELOGIND |
25 | #include <elogind/sd-bus.h> | 25 | #include <elogind/sd-bus.h> |
26 | #include <elogind/sd-login.h> | 26 | #include <elogind/sd-login.h> |
27 | #endif | 27 | #endif |
@@ -66,7 +66,7 @@ static void cmd_exec(char *param) { | |||
66 | } | 66 | } |
67 | } | 67 | } |
68 | 68 | ||
69 | #if defined(SWAY_IDLE_HAS_SYSTEMD) || defined(SWAY_IDLE_HAS_ELOGIND) | 69 | #if HAVE_SYSTEMD || HAVE_ELOGIND |
70 | static int lock_fd = -1; | 70 | static int lock_fd = -1; |
71 | static int ongoing_fd = -1; | 71 | static int ongoing_fd = -1; |
72 | static struct sd_bus *bus = NULL; | 72 | static struct sd_bus *bus = NULL; |
@@ -414,7 +414,7 @@ int main(int argc, char *argv[]) { | |||
414 | } | 414 | } |
415 | 415 | ||
416 | bool should_run = state.timeout_cmds->length > 0; | 416 | bool should_run = state.timeout_cmds->length > 0; |
417 | #if defined(SWAY_IDLE_HAS_SYSTEMD) || defined(SWAY_IDLE_HAS_ELOGIND) | 417 | #if HAVE_SYSTEMD || HAVE_ELOGIND |
418 | if (state.lock_cmd) { | 418 | if (state.lock_cmd) { |
419 | should_run = true; | 419 | should_run = true; |
420 | setup_sleep_listener(); | 420 | setup_sleep_listener(); |