From 142f42378608e593eb36ceb33895db99948427aa Mon Sep 17 00:00:00 2001 From: Sam Varshavchik Date: Fri, 21 May 2021 21:11:51 -0400 Subject: -Wall and -Werror fixes --- sha1/configure.ac | 22 +++++++++++++++++----- sha1/sha1.h | 3 +++ 2 files changed, 20 insertions(+), 5 deletions(-) (limited to 'sha1') 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 #endif +#if HAVE_STDINT_H +#include +#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 #endif +#if HAVE_STDINT_H +#include +#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 #endif +#if HAVE_STDINT_H +#include +#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 #endif +#if HAVE_STDINT_H +#include +#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 #endif +#if HAVE_STDINT_H +#include +#endif #define SHA1_DIGEST_SIZE 20 #define SHA1_BLOCK_SIZE 64 -- cgit v1.2.3