summaryrefslogtreecommitdiff
path: root/crc
diff options
context:
space:
mode:
Diffstat (limited to 'crc')
-rw-r--r--crc/crc32.c1
-rw-r--r--crc/crc32.h2
-rw-r--r--crc/crc32c-intel.c7
-rw-r--r--crc/crc32c.c2
-rw-r--r--crc/crc32c.h2
-rw-r--r--crc/md5.c1
-rw-r--r--crc/sha1.h2
-rw-r--r--crc/sha256.c1
-rw-r--r--crc/sha256.h2
-rw-r--r--crc/sha3.c1
-rw-r--r--crc/sha512.c1
-rw-r--r--crc/sha512.h2
-rw-r--r--crc/test.c5
13 files changed, 13 insertions, 16 deletions
diff --git a/crc/crc32.c b/crc/crc32.c
index 4140a8d4..e35f5d93 100644
--- a/crc/crc32.c
+++ b/crc/crc32.c
@@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#include <inttypes.h>
#include "crc32.h"
static const uint32_t crctab[256] = {
diff --git a/crc/crc32.h b/crc/crc32.h
index a37d7ada..6378e815 100644
--- a/crc/crc32.h
+++ b/crc/crc32.h
@@ -18,6 +18,8 @@
#ifndef CRC32_H
#define CRC32_H
+#include <inttypes.h>
+
extern uint32_t fio_crc32(const void * const, unsigned long);
#endif
diff --git a/crc/crc32c-intel.c b/crc/crc32c-intel.c
index 05a087dc..9a2cefde 100644
--- a/crc/crc32c-intel.c
+++ b/crc/crc32c-intel.c
@@ -1,10 +1,3 @@
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
#include "crc32c.h"
/*
diff --git a/crc/crc32c.c b/crc/crc32c.c
index f6fc6887..34944aea 100644
--- a/crc/crc32c.c
+++ b/crc/crc32c.c
@@ -30,8 +30,6 @@
* any later version.
*
*/
-#include <inttypes.h>
-
#include "crc32c.h"
/*
diff --git a/crc/crc32c.h b/crc/crc32c.h
index be03c1a2..60f60141 100644
--- a/crc/crc32c.h
+++ b/crc/crc32c.h
@@ -18,6 +18,8 @@
#ifndef CRC32C_H
#define CRC32C_H
+#include <inttypes.h>
+
#include "../arch/arch.h"
#include "../lib/types.h"
diff --git a/crc/md5.c b/crc/md5.c
index 64fe48a9..ade4f697 100644
--- a/crc/md5.c
+++ b/crc/md5.c
@@ -2,7 +2,6 @@
* Shamelessly lifted from the 2.6 kernel (crypto/md5.c)
*/
#include <string.h>
-#include <stdint.h>
#include "md5.h"
static void md5_transform(uint32_t *hash, uint32_t const *in)
diff --git a/crc/sha1.h b/crc/sha1.h
index 75317f76..416199ba 100644
--- a/crc/sha1.h
+++ b/crc/sha1.h
@@ -1,6 +1,8 @@
#ifndef FIO_SHA1
#define FIO_SHA1
+#include <inttypes.h>
+
/*
* Based on the Mozilla SHA1 (see mozilla-sha1/sha1.h),
* optimized to do word accesses rather than byte accesses,
diff --git a/crc/sha256.c b/crc/sha256.c
index 2fd17a32..2b39c42e 100644
--- a/crc/sha256.c
+++ b/crc/sha256.c
@@ -17,7 +17,6 @@
*
*/
#include <string.h>
-#include <inttypes.h>
#include "../lib/bswap.h"
#include "sha256.h"
diff --git a/crc/sha256.h b/crc/sha256.h
index b6360336..b904c7d1 100644
--- a/crc/sha256.h
+++ b/crc/sha256.h
@@ -1,6 +1,8 @@
#ifndef FIO_SHA256_H
#define FIO_SHA256_H
+#include <inttypes.h>
+
#define SHA256_DIGEST_SIZE 32
#define SHA256_BLOCK_SIZE 64
diff --git a/crc/sha3.c b/crc/sha3.c
index 2685dce6..c136550a 100644
--- a/crc/sha3.c
+++ b/crc/sha3.c
@@ -13,7 +13,6 @@
*
*/
#include <string.h>
-#include <inttypes.h>
#include "../os/os.h"
diff --git a/crc/sha512.c b/crc/sha512.c
index e069a448..f599cdcc 100644
--- a/crc/sha512.c
+++ b/crc/sha512.c
@@ -12,7 +12,6 @@
*/
#include <string.h>
-#include <inttypes.h>
#include "../lib/bswap.h"
#include "sha512.h"
diff --git a/crc/sha512.h b/crc/sha512.h
index f8b2112a..5adf6271 100644
--- a/crc/sha512.h
+++ b/crc/sha512.h
@@ -1,6 +1,8 @@
#ifndef FIO_SHA512_H
#define FIO_SHA512_H
+#include <inttypes.h>
+
struct fio_sha512_ctx {
uint64_t state[8];
uint32_t count[4];
diff --git a/crc/test.c b/crc/test.c
index b1198726..b57f07a4 100644
--- a/crc/test.c
+++ b/crc/test.c
@@ -1,11 +1,12 @@
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "../fio.h"
#include "../gettime.h"
#include "../fio_time.h"
-#include "../verify.h"
+#include "../lib/rand.h"
+#include "../os/os.h"
#include "../crc/md5.h"
#include "../crc/crc64.h"