summaryrefslogtreecommitdiffstats
path: root/src/filesystem.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-01 17:54:42 +0100
committerDavid Robillard <d@drobilla.net>2021-01-02 13:23:51 +0100
commita124e36c3520e3f887b3a47aac685d9ad453bf09 (patch)
treeb1f43b0206024b06bf51725407c381691591ebb0 /src/filesystem.c
parent31cc05d5ef6e840ebe2b4c265f374f913f4758cc (diff)
downloadlilv-a124e36c3520e3f887b3a47aac685d9ad453bf09.tar.gz
lilv-a124e36c3520e3f887b3a47aac685d9ad453bf09.tar.bz2
lilv-a124e36c3520e3f887b3a47aac685d9ad453bf09.zip
Remove the need for a generated configuration header
Diffstat (limited to 'src/filesystem.c')
-rw-r--r--src/filesystem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/filesystem.c b/src/filesystem.c
index 0d6989b..c42c8d2 100644
--- a/src/filesystem.c
+++ b/src/filesystem.c
@@ -1,5 +1,5 @@
/*
- Copyright 2007-2020 David Robillard <http://drobilla.net>
+ Copyright 2007-2021 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -38,7 +38,7 @@
# include <unistd.h>
#endif
-#if defined(HAVE_FLOCK) && defined(HAVE_FILENO)
+#if USE_FLOCK && USE_FILENO
# include <sys/file.h>
#endif
@@ -299,7 +299,7 @@ lilv_path_canonical(const char* path)
bool
lilv_path_exists(const char* path)
{
-#ifdef HAVE_LSTAT
+#if USE_LSTAT
struct stat st;
return !lstat(path, &st);
#else
@@ -386,7 +386,7 @@ lilv_flock(FILE* file, bool lock, bool block)
} else {
return !UnlockFileEx(handle, 0, UINT32_MAX, UINT32_MAX, &overlapped);
}
-#elif defined(HAVE_FLOCK) && defined(HAVE_FILENO)
+#elif USE_FLOCK && USE_FILENO
return flock(fileno(file),
(lock ? LOCK_EX : LOCK_UN) | (block ? 0 : LOCK_NB));
#else