aboutsummaryrefslogtreecommitdiffstats
path: root/src/system.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-01 14:15:49 +0100
committerDavid Robillard <d@drobilla.net>2021-01-01 17:48:20 +0100
commit4a54d784af0bec03fdc1f9889157a8c653969db9 (patch)
tree2c94dec6c4369a9a341cf9da4f4dbcce28cd77cf /src/system.c
parentd101d926946a5e8067a90d157b6553aae7bddc19 (diff)
downloadserd-4a54d784af0bec03fdc1f9889157a8c653969db9.tar.gz
serd-4a54d784af0bec03fdc1f9889157a8c653969db9.tar.bz2
serd-4a54d784af0bec03fdc1f9889157a8c653969db9.zip
Remove the need for a generated configuration header
Diffstat (limited to 'src/system.c')
-rw-r--r--src/system.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/system.c b/src/system.c
index 3f10b86b..5b40583b 100644
--- a/src/system.c
+++ b/src/system.c
@@ -21,7 +21,7 @@
#include "serd_config.h"
#include "serd_internal.h"
-#if defined(HAVE_POSIX_FADVISE) && defined(HAVE_FILENO)
+#if USE_POSIX_FADVISE && USE_FILENO
# include <fcntl.h>
#endif
@@ -44,7 +44,7 @@ serd_fopen(const char* path, const char* mode)
return NULL;
}
-#if defined(HAVE_POSIX_FADVISE) && defined(HAVE_FILENO)
+#if USE_POSIX_FADVISE && USE_FILENO
posix_fadvise(fileno(fd), 0, 0, POSIX_FADV_SEQUENTIAL);
#endif
return fd;
@@ -55,9 +55,9 @@ serd_malloc_aligned(const size_t alignment, const size_t size)
{
#if defined(_WIN32)
return _aligned_malloc(size, alignment);
-#elif __STDC_VERSION__ >= 201112L && defined(HAVE_ALIGNED_ALLOC)
+#elif USE_ALIGNED_ALLOC
return aligned_alloc(alignment, size);
-#elif defined(HAVE_POSIX_MEMALIGN)
+#elif USE_POSIX_MEMALIGN
void* ptr = NULL;
const int ret = posix_memalign(&ptr, alignment, size);
return ret ? NULL : ptr;