summaryrefslogtreecommitdiffstats
path: root/sha1
diff options
context:
space:
mode:
authorSam Varshavchik2021-05-21 21:11:51 -0400
committerSam Varshavchik2021-05-21 21:11:51 -0400
commit142f42378608e593eb36ceb33895db99948427aa (patch)
treefc089285268a8fe3c8768cd7482fb50393f49354 /sha1
parent34b6dbb743654fdb6edccf101c4da7e671b7a92d (diff)
downloadcourier-libs-142f42378608e593eb36ceb33895db99948427aa.tar.bz2
-Wall and -Werror fixes
Diffstat (limited to 'sha1')
-rw-r--r--sha1/configure.ac22
-rw-r--r--sha1/sha1.h3
2 files changed, 20 insertions, 5 deletions
diff --git a/sha1/configure.ac b/sha1/configure.ac
index d424b26..6bc8351 100644
--- a/sha1/configure.ac
+++ b/sha1/configure.ac
@@ -32,7 +32,7 @@ dnl Checks for libraries.
dnl Checks for header files.
-AC_CHECK_HEADERS(sys/types.h)
+AC_CHECK_HEADERS(sys/types.h stdint.h)
AC_ARG_WITH(int32,
[ --with-int32='type' use 'type' for an unsigned 32 bit integer type
@@ -45,8 +45,11 @@ AC_ARG_WITH(int32,
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+uint32_t i;
],[
- uint32_t i=0;
], [ AC_MSG_RESULT(yes) ; int32="uint32_t"], [
AC_MSG_RESULT(no)
@@ -56,8 +59,11 @@ AC_ARG_WITH(int32,
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+u_int32_t i;
],[
- u_int32_t i=0;
], [AC_MSG_RESULT(yes); int32="u_int32_t"],[
AC_MSG_RESULT(no)
@@ -99,8 +105,11 @@ AC_ARG_WITH(int64,
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+uint64_t i;
],[
- uint64_t i=0;
], [ AC_MSG_RESULT(yes) ; int64="uint64_t"], [
AC_MSG_RESULT(no)
@@ -110,8 +119,11 @@ AC_ARG_WITH(int64,
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+u_int64_t i;
],[
- u_int64_t i=0;
], [AC_MSG_RESULT(yes); int64="u_int64_t"],[
AC_MSG_RESULT(no)
diff --git a/sha1/sha1.h b/sha1/sha1.h
index 3bd397c..d63e88e 100644
--- a/sha1/sha1.h
+++ b/sha1/sha1.h
@@ -14,6 +14,9 @@
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
#define SHA1_DIGEST_SIZE 20
#define SHA1_BLOCK_SIZE 64