| @@ -1,29 +1,29 @@ | | | @@ -1,29 +1,29 @@ |
1 | $NetBSD: patch-include_schily_sha2.h,v 1.1 2012/03/29 13:22:07 wiz Exp $ | | 1 | $NetBSD: patch-include_schily_sha2.h,v 1.2 2012/03/29 14:51:59 wiz Exp $ |
2 | | | 2 | |
3 | Fix clang-3.1 build: | | 3 | Fix clang-3.1 build: |
4 | sha2.c:1001:2: error: call to 'SHA384Pad' is ambiguous | | 4 | sha2.c:1001:2: error: call to 'SHA384Pad' is ambiguous |
5 | SHA384Pad(context); | | 5 | SHA384Pad(context); |
6 | ^~~~~~~~~ | | 6 | ^~~~~~~~~ |
7 | ../include/schily/sha2.h:110:13: note: candidate function | | 7 | ../include/schily/sha2.h:110:13: note: candidate function |
8 | extern void SHA384Pad __PR((SHA2_CTX *)); | | 8 | extern void SHA384Pad __PR((SHA2_CTX *)); |
9 | ^ | | 9 | ^ |
10 | sha2.c:969:14: note: candidate function | | 10 | sha2.c:969:14: note: candidate function |
11 | #pragma weak SHA384Pad = SHA512Pad | | 11 | #pragma weak SHA384Pad = SHA512Pad |
12 | ^ | | 12 | ^ |
13 | 1 error generated. | | 13 | 1 error generated. |
14 | | | 14 | |
15 | --- include/schily/sha2.h.orig 2010-08-27 10:41:30.000000000 +0000 | | 15 | --- include/schily/sha2.h.orig 2010-08-27 10:41:30.000000000 +0000 |
16 | +++ include/schily/sha2.h | | 16 | +++ include/schily/sha2.h |
17 | @@ -106,10 +106,12 @@ extern char *SHA256Data __PR((const UIn | | 17 | @@ -104,10 +104,12 @@ extern char *SHA256Data __PR((const UIn |
| | | 18 | |
| | | 19 | #ifdef HAVE_LONGLONG |
18 | extern void SHA384Init __PR((SHA2_CTX *)); | | 20 | extern void SHA384Init __PR((SHA2_CTX *)); |
| | | 21 | +#ifndef HAVE_PRAGMA_WEAK |
19 | extern void SHA384Transform __PR((UInt64_t state[8], | | 22 | extern void SHA384Transform __PR((UInt64_t state[8], |
20 | const UInt8_t [SHA384_BLOCK_LENGTH])); | | 23 | const UInt8_t [SHA384_BLOCK_LENGTH])); |
21 | +#ifndef HAVE_PRAGMA_WEAK | | | |
22 | extern void SHA384Update __PR((SHA2_CTX *, const UInt8_t *, size_t)); | | 24 | extern void SHA384Update __PR((SHA2_CTX *, const UInt8_t *, size_t)); |
23 | extern void SHA384Pad __PR((SHA2_CTX *)); | | 25 | extern void SHA384Pad __PR((SHA2_CTX *)); |
| | | 26 | +#endif |
24 | extern void SHA384Final __PR((UInt8_t [SHA384_DIGEST_LENGTH], | | 27 | extern void SHA384Final __PR((UInt8_t [SHA384_DIGEST_LENGTH], |
25 | SHA2_CTX *)); | | 28 | SHA2_CTX *)); |
26 | +#endif | | | |
27 | extern char *SHA384End __PR((SHA2_CTX *, char *)); | | 29 | extern char *SHA384End __PR((SHA2_CTX *, char *)); |
28 | extern char *SHA384File __PR((const char *, char *)); | | | |
29 | extern char *SHA384FileChunk __PR((const char *, char *, off_t, off_t)); | | | |