aboutsummaryrefslogtreecommitdiffstats
path: root/src/hooks.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-03-05 19:53:47 +0100
committerMattias Andrée <m@maandree.se>2025-03-05 19:53:47 +0100
commit066fac61e017824f7dccbd1ef3d7dc455cf4b95b (patch)
treeb240eee9ec49ab3b83fe4978d3a0472def7251ce /src/hooks.c
parentMerge config-ini.h and options.h into common.h (diff)
downloadredshift-ng-066fac61e017824f7dccbd1ef3d7dc455cf4b95b.tar.gz
redshift-ng-066fac61e017824f7dccbd1ef3d7dc455cf4b95b.tar.bz2
redshift-ng-066fac61e017824f7dccbd1ef3d7dc455cf4b95b.tar.xz
Consistently use (locally defined) WINDOWS macro over mixing __WIN32__ and _WIN32
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'src/hooks.c')
-rw-r--r--src/hooks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hooks.c b/src/hooks.c
index 1bd3efe..485f5f0 100644
--- a/src/hooks.c
+++ b/src/hooks.c
@@ -50,7 +50,7 @@ open_hooks_dir(char *hp)
return opendir(hp);
}
-#ifndef _WIN32
+#ifndef WINDOWS
struct passwd *pwd = getpwuid(getuid());
snprintf(hp, MAX_HOOK_PATH, "%s/.config/redshift/hooks", pwd->pw_dir);
return opendir(hp);
@@ -77,7 +77,7 @@ hooks_signal_period_change(enum period prev_period, enum period period)
snprintf(hook_path, sizeof(hook_path), "%s/%s",
hooksdir_path, hook_name);
-#ifndef _WIN32
+#ifndef WINDOWS
/* Fork and exec the hook. We close stdout
so the hook cannot interfere with the normal
output. */