avoid using libc's internal sys/cdefs.h

sha1.h simply shouldn't use it while sha1.c simply doesn't

Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
This commit is contained in:
Imre Kaloz 2015-04-29 14:49:58 +02:00 committed by Jo-Philipp Wich
parent 2f713da924
commit 7c15bef6c7
2 changed files with 6 additions and 4 deletions

1
sha1.c
View File

@ -17,7 +17,6 @@
#define SHA1HANDSOFF /* Copies data before messing with it. */ #define SHA1HANDSOFF /* Copies data before messing with it. */
#include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>

9
sha1.h
View File

@ -10,7 +10,6 @@
#define _SYS_SHA1_H_ #define _SYS_SHA1_H_
#include <sys/types.h> #include <sys/types.h>
#include <sys/cdefs.h>
#include <stdint.h> #include <stdint.h>
#define SHA1_DIGEST_LENGTH 20 #define SHA1_DIGEST_LENGTH 20
@ -22,11 +21,15 @@ typedef struct {
u_char buffer[64]; u_char buffer[64];
} SHA1_CTX; } SHA1_CTX;
__BEGIN_DECLS #ifdef __cplusplus
extern "C" {
#endif
void SHA1Transform(uint32_t[5], const u_char[64]); void SHA1Transform(uint32_t[5], const u_char[64]);
void SHA1Init(SHA1_CTX *); void SHA1Init(SHA1_CTX *);
void SHA1Update(SHA1_CTX *, const u_char *, u_int); void SHA1Update(SHA1_CTX *, const u_char *, u_int);
void SHA1Final(u_char[SHA1_DIGEST_LENGTH], SHA1_CTX *); void SHA1Final(u_char[SHA1_DIGEST_LENGTH], SHA1_CTX *);
__END_DECLS #ifdef __cplusplus
}
#endif
#endif /* _SYS_SHA1_H_ */ #endif /* _SYS_SHA1_H_ */