summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/bloom.c2
-rw-r--r--lib/gauss.c1
-rw-r--r--lib/ieee754.c1
-rw-r--r--lib/lfsr.c1
-rw-r--r--lib/memalign.c3
-rw-r--r--lib/memalign.h2
-rw-r--r--lib/memcpy.c3
-rw-r--r--lib/num2str.c1
-rw-r--r--lib/output_buffer.c1
-rw-r--r--lib/output_buffer.h2
-rw-r--r--lib/pattern.c2
-rw-r--r--lib/pattern.h2
-rw-r--r--lib/prio_tree.c1
-rw-r--r--lib/prio_tree.h1
-rw-r--r--lib/rand.c1
-rw-r--r--lib/rand.h1
-rw-r--r--lib/strntol.h2
-rw-r--r--lib/zipf.c6
-rw-r--r--lib/zipf.h1
19 files changed, 11 insertions, 23 deletions
diff --git a/lib/bloom.c b/lib/bloom.c
index bb81dbbd..f4f9b6b9 100644
--- a/lib/bloom.c
+++ b/lib/bloom.c
@@ -1,9 +1,7 @@
#include <stdlib.h>
-#include <inttypes.h>
#include "bloom.h"
#include "../hash.h"
-#include "../minmax.h"
#include "../crc/xxhash.h"
#include "../crc/murmur3.h"
#include "../crc/crc32c.h"
diff --git a/lib/gauss.c b/lib/gauss.c
index f974490f..1d24e187 100644
--- a/lib/gauss.c
+++ b/lib/gauss.c
@@ -1,6 +1,5 @@
#include <math.h>
#include <string.h>
-#include <stdio.h>
#include "../hash.h"
#include "gauss.h"
diff --git a/lib/ieee754.c b/lib/ieee754.c
index c7742a2d..2154065c 100644
--- a/lib/ieee754.c
+++ b/lib/ieee754.c
@@ -5,7 +5,6 @@
*
* Below code was granted to the public domain.
*/
-#include <inttypes.h>
#include "ieee754.h"
uint64_t pack754(long double f, unsigned bits, unsigned expbits)
diff --git a/lib/lfsr.c b/lib/lfsr.c
index 0c0072cc..a4f1fb13 100644
--- a/lib/lfsr.c
+++ b/lib/lfsr.c
@@ -1,5 +1,4 @@
#include <stdio.h>
-#include <math.h>
#include "lfsr.h"
#include "../compiler/compiler.h"
diff --git a/lib/memalign.c b/lib/memalign.c
index bfbd1e80..e774c19c 100644
--- a/lib/memalign.c
+++ b/lib/memalign.c
@@ -1,6 +1,5 @@
-#include <stdlib.h>
#include <assert.h>
-#include <inttypes.h>
+#include <stdlib.h>
#include "memalign.h"
diff --git a/lib/memalign.h b/lib/memalign.h
index df412e28..c2eb1702 100644
--- a/lib/memalign.h
+++ b/lib/memalign.h
@@ -1,6 +1,8 @@
#ifndef FIO_MEMALIGN_H
#define FIO_MEMALIGN_H
+#include <inttypes.h>
+
extern void *fio_memalign(size_t alignment, size_t size);
extern void fio_memfree(void *ptr, size_t size);
diff --git a/lib/memcpy.c b/lib/memcpy.c
index 00e65aa7..cf8572e2 100644
--- a/lib/memcpy.c
+++ b/lib/memcpy.c
@@ -1,3 +1,4 @@
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -6,7 +7,7 @@
#include "rand.h"
#include "../fio_time.h"
#include "../gettime.h"
-#include "../fio.h"
+#include "../os/os.h"
#define BUF_SIZE 32 * 1024 * 1024ULL
diff --git a/lib/num2str.c b/lib/num2str.c
index 8d088413..387c5d7b 100644
--- a/lib/num2str.c
+++ b/lib/num2str.c
@@ -1,3 +1,4 @@
+#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/lib/output_buffer.c b/lib/output_buffer.c
index f6c304bd..beb8a142 100644
--- a/lib/output_buffer.c
+++ b/lib/output_buffer.c
@@ -1,4 +1,3 @@
-#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/lib/output_buffer.h b/lib/output_buffer.h
index a235af20..389ed5b7 100644
--- a/lib/output_buffer.h
+++ b/lib/output_buffer.h
@@ -1,7 +1,7 @@
#ifndef FIO_OUTPUT_BUFFER_H
#define FIO_OUTPUT_BUFFER_H
-#include <unistd.h>
+#include <stddef.h>
struct buf_output {
char *buf;
diff --git a/lib/pattern.c b/lib/pattern.c
index 31ee4eaf..2024f2e9 100644
--- a/lib/pattern.c
+++ b/lib/pattern.c
@@ -4,8 +4,6 @@
#include <limits.h>
#include <errno.h>
#include <assert.h>
-#include <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
diff --git a/lib/pattern.h b/lib/pattern.h
index 9f937f02..2d655ad0 100644
--- a/lib/pattern.h
+++ b/lib/pattern.h
@@ -1,8 +1,6 @@
#ifndef FIO_PARSE_PATTERN_H
#define FIO_PARSE_PATTERN_H
-struct pattern_fmt;
-
/**
* Pattern format description. The input for 'parse_pattern'.
* Describes format with its name and callback, which should
diff --git a/lib/prio_tree.c b/lib/prio_tree.c
index de3fe1c0..d8e1b89a 100644
--- a/lib/prio_tree.c
+++ b/lib/prio_tree.c
@@ -11,6 +11,7 @@
* 02Feb2004 Initial version
*/
+#include <assert.h>
#include <stdlib.h>
#include <limits.h>
diff --git a/lib/prio_tree.h b/lib/prio_tree.h
index e1491dbd..9bd458f1 100644
--- a/lib/prio_tree.h
+++ b/lib/prio_tree.h
@@ -2,7 +2,6 @@
#define _LINUX_PRIO_TREE_H
#include <inttypes.h>
-#include "../hash.h"
struct prio_tree_node {
struct prio_tree_node *left;
diff --git a/lib/rand.c b/lib/rand.c
index 3f60a67a..46ffe4fb 100644
--- a/lib/rand.c
+++ b/lib/rand.c
@@ -34,7 +34,6 @@
*/
#include <string.h>
-#include <assert.h>
#include "rand.h"
#include "pattern.h"
#include "../hash.h"
diff --git a/lib/rand.h b/lib/rand.h
index bff4a351..8832c73a 100644
--- a/lib/rand.h
+++ b/lib/rand.h
@@ -4,7 +4,6 @@
#include <inttypes.h>
#include <assert.h>
#include "types.h"
-#include "../arch/arch.h"
#define FRAND32_MAX (-1U)
#define FRAND64_MAX (-1ULL)
diff --git a/lib/strntol.h b/lib/strntol.h
index 68f5d1b7..59c090d3 100644
--- a/lib/strntol.h
+++ b/lib/strntol.h
@@ -1,6 +1,8 @@
#ifndef FIO_STRNTOL_H
#define FIO_STRNTOL_H
+#include <stdint.h>
+
long strntol(const char *str, size_t sz, char **end, int base);
#endif
diff --git a/lib/zipf.c b/lib/zipf.c
index 3d535c79..1ff85680 100644
--- a/lib/zipf.c
+++ b/lib/zipf.c
@@ -1,11 +1,5 @@
#include <math.h>
#include <string.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include "ieee754.h"
#include "zipf.h"
#include "../minmax.h"
#include "../hash.h"
diff --git a/lib/zipf.h b/lib/zipf.h
index af2d0e64..a4aa163c 100644
--- a/lib/zipf.h
+++ b/lib/zipf.h
@@ -3,6 +3,7 @@
#include <inttypes.h>
#include "rand.h"
+#include "types.h"
struct zipf_state {
uint64_t nranges;