Skip to content

Commit 7c15bef

Browse files
kalozjow-
authored andcommitted
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 <[email protected]>
1 parent 2f713da commit 7c15bef

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

sha1.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#define SHA1HANDSOFF /* Copies data before messing with it. */
1919

20-
#include <sys/cdefs.h>
2120
#include <sys/types.h>
2221
#include <assert.h>
2322
#include <string.h>

sha1.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#define _SYS_SHA1_H_
1111

1212
#include <sys/types.h>
13-
#include <sys/cdefs.h>
1413
#include <stdint.h>
1514

1615
#define SHA1_DIGEST_LENGTH 20
@@ -22,11 +21,15 @@ typedef struct {
2221
u_char buffer[64];
2322
} SHA1_CTX;
2423

25-
__BEGIN_DECLS
24+
#ifdef __cplusplus
25+
extern "C" {
26+
#endif
2627
void SHA1Transform(uint32_t[5], const u_char[64]);
2728
void SHA1Init(SHA1_CTX *);
2829
void SHA1Update(SHA1_CTX *, const u_char *, u_int);
2930
void SHA1Final(u_char[SHA1_DIGEST_LENGTH], SHA1_CTX *);
30-
__END_DECLS
31+
#ifdef __cplusplus
32+
}
33+
#endif
3134

3235
#endif /* _SYS_SHA1_H_ */

0 commit comments

Comments
 (0)