X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsha1.c;h=4b9fcaee7ebae8fd6a3978fc68c4788ace7c5482;hb=dd5c6076e60de0237ab75d5a3a77070231d6c0fd;hp=7ec950e94eb2fcc788d6e6e4294d21600f45b593;hpb=d60f3b0c6b0f93a601acd1cfd3923f94ca05abb0;p=gnulib.git diff --git a/lib/sha1.c b/lib/sha1.c index 7ec950e94..4b9fcaee7 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -1,7 +1,7 @@ /* sha1.c - Functions to compute SHA1 message digest of files or memory blocks according to the NIST specification FIPS-180-1. - Copyright (C) 2000-2001, 2003-2006, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2003-2006, 2008-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -26,7 +26,8 @@ #include "sha1.h" -#include +#include +#include #include #include @@ -241,8 +242,7 @@ sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx) if (len >= 64) { #if !_STRING_ARCH_unaligned -# define alignof(type) offsetof (struct { char c; type x; }, x) -# define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) +# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0) if (UNALIGNED_P (buffer)) while (len > 64) {