summaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-01-13 13:59:29 +0100
committerDavid Robillard <d@drobilla.net>2019-01-13 13:59:29 +0100
commit162d540a7a78bcd75aea002b4afa101133315e8b (patch)
treef59f5adbc21f4156a1a8b4e33abe9124a6f526cb /src/util.c
parent4b4c1797d93e6efb93b12df21c1cd9f04341b61e (diff)
downloadlilv-162d540a7a78bcd75aea002b4afa101133315e8b.tar.gz
lilv-162d540a7a78bcd75aea002b4afa101133315e8b.tar.bz2
lilv-162d540a7a78bcd75aea002b4afa101133315e8b.zip
Clean up includes
Sorts includes from local to global (which catches errors) and fixes missing includes found by the resulting breakage and include-what-you-use.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/util.c b/src/util.c
index e896d65..e105ec3 100644
--- a/src/util.c
+++ b/src/util.c
@@ -22,13 +22,11 @@
# define _DARWIN_C_SOURCE 1 /* for flock */
#endif
-#include <ctype.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stddef.h>
+#include "lilv_config.h"
+#include "lilv_internal.h"
+
+#include "lilv/lilv.h"
+#include "serd/serd.h"
#ifdef _WIN32
#ifndef _WIN32_WINNT
@@ -56,19 +54,26 @@ CreateSymbolicLink(LPCTSTR linkpath, LPCTSTR targetpath, DWORD flags)
# endif
#else
# include <dirent.h>
-# include <limits.h>
# include <unistd.h>
#endif
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include "lilv_internal.h"
-
#if defined(HAVE_FLOCK) && defined(HAVE_FILENO)
# include <sys/file.h>
#endif
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <ctype.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
#ifndef PAGE_SIZE
# define PAGE_SIZE 4096
#endif