aboutsummaryrefslogtreecommitdiffstats
path: root/src/system.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-13 10:52:56 +0100
committerDavid Robillard <d@drobilla.net>2022-01-13 23:03:48 -0500
commitbf4f881c2241fa8ae6459bd9c8ee6cc83ee563a9 (patch)
treefc04015e0566e8c2a1fc94e78274bb2896941034 /src/system.c
parent68769abbf1c7b4ef4f03f93f0c50e016c709a167 (diff)
downloadserd-bf4f881c2241fa8ae6459bd9c8ee6cc83ee563a9.tar.gz
serd-bf4f881c2241fa8ae6459bd9c8ee6cc83ee563a9.tar.bz2
serd-bf4f881c2241fa8ae6459bd9c8ee6cc83ee563a9.zip
Move fopen wrapper to world
Diffstat (limited to 'src/system.c')
-rw-r--r--src/system.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/system.c b/src/system.c
index e3d8d836..76a39ad2 100644
--- a/src/system.c
+++ b/src/system.c
@@ -19,35 +19,14 @@
#include "serd_config.h"
#include "serd_internal.h"
-#if USE_POSIX_FADVISE && USE_FILENO
-# include <fcntl.h>
-#endif
-
#ifdef _WIN32
# include <malloc.h>
#endif
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-FILE*
-serd_fopen(const char* const path, const char* const mode)
-{
- FILE* fd = fopen(path, mode);
- if (!fd) {
- fprintf(
- stderr, "error: failed to open file %s (%s)\n", path, strerror(errno));
- return NULL;
- }
-
-#if USE_POSIX_FADVISE && USE_FILENO
- posix_fadvise(fileno(fd), 0, 0, POSIX_FADV_SEQUENTIAL);
-#endif
- return fd;
-}
-
void*
serd_malloc_aligned(const size_t alignment, const size_t size)
{