sha1: code cleanup and use modern C syntax
Apply the following changes:
- Remove out-of-date workaround (SPARC64_GCC_WORKAROUND)
- Use C99 prototype and stdint type
Change-Id: I630cf97f6824f72f4165e0fa9e5bfdad8edabe48
diff --git a/libc/include/sha1.h b/libc/include/sha1.h
index f7ada46..adfa1fc 100644
--- a/libc/include/sha1.h
+++ b/libc/include/sha1.h
@@ -18,14 +18,14 @@
typedef struct {
uint32_t state[5];
uint32_t count[2];
- u_char buffer[64];
+ uint8_t buffer[64];
} SHA1_CTX;
__BEGIN_DECLS
-void SHA1Transform(uint32_t[5], const u_char[64]);
+void SHA1Transform(uint32_t[5], const uint8_t[64]);
void SHA1Init(SHA1_CTX *);
-void SHA1Update(SHA1_CTX *, const u_char *, u_int);
-void SHA1Final(u_char[SHA1_DIGEST_LENGTH], SHA1_CTX *);
+void SHA1Update(SHA1_CTX *, const uint8_t *, unsigned int);
+void SHA1Final(uint8_t[SHA1_DIGEST_LENGTH], SHA1_CTX *);
__END_DECLS
#endif /* _SYS_SHA1_H_ */