From a8a7525dfd7580f9e4de759b51cdfeaaf4ff0a24 Mon Sep 17 00:00:00 2001 From: psychon Date: Thu, 19 Nov 2009 20:59:40 +0000 Subject: [PATCH] SHA256.h: Include inttypes.h instead of stdint.h Both of these headers were added in C99 and this standard says that inttypes.h should #include stdint.h. But Solaris 9 (and others?) doesn't have any stdint.h header and thus the compiler shoots at us. So we just get our uint32_t from inttypes.h instead and everyone should be happy... git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1665 726aef4b-f618-498e-8847-2d620e286838 --- SHA256.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SHA256.h b/SHA256.h index a130a7f5..cdf001f4 100644 --- a/SHA256.h +++ b/SHA256.h @@ -37,7 +37,11 @@ #define SHA256_DIGEST_SIZE ( 256 / 8) #define SHA256_BLOCK_SIZE ( 512 / 8) -#include +// C99 defines stdint.h which defines a uint32_t and uint8_t type. +// But the other kids didn't want to play with poor little Solaris 9 and so he +// just defines these in inttypes.h which is also part of C99 and is supposed to +// include stdint.h. Solaris 9 is a weirdo. :( +#include typedef struct { unsigned int tot_len;