1
From: Michael Tokarev <mjt@tls.msk.ru>
2
Subject: do not #include ansidecl.h from sha1.h, use system headers
4
In 3.2.5 version of mdadm, new sha1 implementation has been included
5
which tries to include ansidecl.h header which is internal to some
6
other project. But this #include isn't really necessary, since this
7
implementation does not actually use any defines from ansidecl.h. So
8
just remove the #include, instead of adding a new external dependency.
10
References: http://www.spinics.net/lists/raid/msg38859.html
12
While at it, unconditionally include system headers like limits.h and
13
stdint.h, since on a Linux system these headers are available, and
14
these contains definitive information about real system types than
23
-#if defined HAVE_LIMITS_H || _LIBC
24
+#if 1 /* defined HAVE_LIMITS_H || _LIBC */
28
-#include "ansidecl.h"
30
/* The following contortions are an attempt to use the C preprocessor
31
to determine an unsigned integral type that is 32 bits wide. An
32
alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
34
the resulting executable. Locally running cross-compiled executables
35
is usually not possible. */
38
-# include <sys/types.h>
39
-typedef u_int32_t sha1_uint32;
40
+#if 1 /* def _LIBC */
42
+typedef uint32_t sha1_uint32;
43
typedef uintptr_t sha1_uintptr;
45
# define INT_MAX_32_BITS 2147483647