aboutsummaryrefslogtreecommitdiffstats
path: root/src/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/system.c')
-rw-r--r--src/system.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/system.c b/src/system.c
index 6bc93ca6..4f6c37c6 100644
--- a/src/system.c
+++ b/src/system.c
@@ -14,41 +14,19 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#define _POSIX_C_SOURCE 200809L /* for posix_memalign and posix_fadvise */
+#define _POSIX_C_SOURCE 200809L /* for posix_memalign */
#include "system.h"
#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* path, const char* 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)