Remove __bounded__ GCC attribute This is a BSD specific extension to GCC, and as such not widely available elsewhere.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
diff --git a/include/md4.h b/include/md4.h
index 36ab1d9..c0eaac5 100644
--- a/include/md4.h
+++ b/include/md4.h
@@ -30,23 +30,14 @@ typedef struct MD4Context {
__BEGIN_DECLS
void MD4Init(MD4_CTX *);
-void MD4Update(MD4_CTX *, const u_int8_t *, size_t)
- __attribute__((__bounded__(__string__,2,3)));
+void MD4Update(MD4_CTX *, const u_int8_t *, size_t);
void MD4Pad(MD4_CTX *);
-void MD4Final(u_int8_t [MD4_DIGEST_LENGTH], MD4_CTX *)
- __attribute__((__bounded__(__minbytes__,1,MD4_DIGEST_LENGTH)));
-void MD4Transform(u_int32_t [4], const u_int8_t [MD4_BLOCK_LENGTH])
- __attribute__((__bounded__(__minbytes__,1,4)))
- __attribute__((__bounded__(__minbytes__,2,MD4_BLOCK_LENGTH)));
-char *MD4End(MD4_CTX *, char *)
- __attribute__((__bounded__(__minbytes__,2,MD4_DIGEST_STRING_LENGTH)));
-char *MD4File(const char *, char *)
- __attribute__((__bounded__(__minbytes__,2,MD4_DIGEST_STRING_LENGTH)));
-char *MD4FileChunk(const char *, char *, off_t, off_t)
- __attribute__((__bounded__(__minbytes__,2,MD4_DIGEST_STRING_LENGTH)));
-char *MD4Data(const u_int8_t *, size_t, char *)
- __attribute__((__bounded__(__string__,1,2)))
- __attribute__((__bounded__(__minbytes__,3,MD4_DIGEST_STRING_LENGTH)));
+void MD4Final(u_int8_t [MD4_DIGEST_LENGTH], MD4_CTX *);
+void MD4Transform(u_int32_t [4], const u_int8_t [MD4_BLOCK_LENGTH]);
+char *MD4End(MD4_CTX *, char *);
+char *MD4File(const char *, char *);
+char *MD4FileChunk(const char *, char *, off_t, off_t);
+char *MD4Data(const u_int8_t *, size_t, char *);
__END_DECLS
#endif /* _MD4_H_ */
diff --git a/include/md5.h b/include/md5.h
index f412e38..6e04815 100644
--- a/include/md5.h
+++ b/include/md5.h
@@ -29,23 +29,14 @@ typedef struct MD5Context {
__BEGIN_DECLS
void MD5Init(MD5_CTX *);
-void MD5Update(MD5_CTX *, const u_int8_t *, size_t)
- __attribute__((__bounded__(__string__,2,3)));
+void MD5Update(MD5_CTX *, const u_int8_t *, size_t);
void MD5Pad(MD5_CTX *);
-void MD5Final(u_int8_t [MD5_DIGEST_LENGTH], MD5_CTX *)
- __attribute__((__bounded__(__minbytes__,1,MD5_DIGEST_LENGTH)));
-void MD5Transform(u_int32_t [4], const u_int8_t [MD5_BLOCK_LENGTH])
- __attribute__((__bounded__(__minbytes__,1,4)))
- __attribute__((__bounded__(__minbytes__,2,MD5_BLOCK_LENGTH)));
-char *MD5End(MD5_CTX *, char *)
- __attribute__((__bounded__(__minbytes__,2,MD5_DIGEST_STRING_LENGTH)));
-char *MD5File(const char *, char *)
- __attribute__((__bounded__(__minbytes__,2,MD5_DIGEST_STRING_LENGTH)));
-char *MD5FileChunk(const char *, char *, off_t, off_t)
- __attribute__((__bounded__(__minbytes__,2,MD5_DIGEST_STRING_LENGTH)));
-char *MD5Data(const u_int8_t *, size_t, char *)
- __attribute__((__bounded__(__string__,1,2)))
- __attribute__((__bounded__(__minbytes__,3,MD5_DIGEST_STRING_LENGTH)));
+void MD5Final(u_int8_t [MD5_DIGEST_LENGTH], MD5_CTX *);
+void MD5Transform(u_int32_t [4], const u_int8_t [MD5_BLOCK_LENGTH]);
+char *MD5End(MD5_CTX *, char *);
+char *MD5File(const char *, char *);
+char *MD5FileChunk(const char *, char *, off_t, off_t);
+char *MD5Data(const u_int8_t *, size_t, char *);
__END_DECLS
#endif /* _MD5_H_ */
diff --git a/include/rmd160.h b/include/rmd160.h
index 7e31d64..d7829ed 100644
--- a/include/rmd160.h
+++ b/include/rmd160.h
@@ -40,23 +40,14 @@ typedef struct RMD160Context {
__BEGIN_DECLS
void RMD160Init(RMD160_CTX *);
-void RMD160Transform(u_int32_t [5], const u_int8_t [RMD160_BLOCK_LENGTH])
- __attribute__((__bounded__(__minbytes__,1,5)))
- __attribute__((__bounded__(__minbytes__,2,RMD160_BLOCK_LENGTH)));
-void RMD160Update(RMD160_CTX *, const u_int8_t *, size_t)
- __attribute__((__bounded__(__string__,2,3)));
+void RMD160Transform(u_int32_t [5], const u_int8_t [RMD160_BLOCK_LENGTH]);
+void RMD160Update(RMD160_CTX *, const u_int8_t *, size_t);
void RMD160Pad(RMD160_CTX *);
-void RMD160Final(u_int8_t [RMD160_DIGEST_LENGTH], RMD160_CTX *)
- __attribute__((__bounded__(__minbytes__,1,RMD160_DIGEST_LENGTH)));
-char *RMD160End(RMD160_CTX *, char *)
- __attribute__((__bounded__(__minbytes__,2,RMD160_DIGEST_STRING_LENGTH)));
-char *RMD160File(const char *, char *)
- __attribute__((__bounded__(__minbytes__,2,RMD160_DIGEST_STRING_LENGTH)));
-char *RMD160FileChunk(const char *, char *, off_t, off_t)
- __attribute__((__bounded__(__minbytes__,2,RMD160_DIGEST_STRING_LENGTH)));
-char *RMD160Data(const u_int8_t *, size_t, char *)
- __attribute__((__bounded__(__string__,1,2)))
- __attribute__((__bounded__(__minbytes__,3,RMD160_DIGEST_STRING_LENGTH)));
+void RMD160Final(u_int8_t [RMD160_DIGEST_LENGTH], RMD160_CTX *);
+char *RMD160End(RMD160_CTX *, char *);
+char *RMD160File(const char *, char *);
+char *RMD160FileChunk(const char *, char *, off_t, off_t);
+char *RMD160Data(const u_int8_t *, size_t, char *);
__END_DECLS
#endif /* _RMD160_H */
diff --git a/include/sha1.h b/include/sha1.h
index a63535e..dafaf65 100644
--- a/include/sha1.h
+++ b/include/sha1.h
@@ -24,22 +24,13 @@ typedef struct {
__BEGIN_DECLS
void SHA1Init(SHA1_CTX *);
void SHA1Pad(SHA1_CTX *);
-void SHA1Transform(u_int32_t [5], const u_int8_t [SHA1_BLOCK_LENGTH])
- __attribute__((__bounded__(__minbytes__,1,5)))
- __attribute__((__bounded__(__minbytes__,2,SHA1_BLOCK_LENGTH)));
-void SHA1Update(SHA1_CTX *, const u_int8_t *, size_t)
- __attribute__((__bounded__(__string__,2,3)));
-void SHA1Final(u_int8_t [SHA1_DIGEST_LENGTH], SHA1_CTX *)
- __attribute__((__bounded__(__minbytes__,1,SHA1_DIGEST_LENGTH)));
-char *SHA1End(SHA1_CTX *, char *)
- __attribute__((__bounded__(__minbytes__,2,SHA1_DIGEST_STRING_LENGTH)));
-char *SHA1File(const char *, char *)
- __attribute__((__bounded__(__minbytes__,2,SHA1_DIGEST_STRING_LENGTH)));
-char *SHA1FileChunk(const char *, char *, off_t, off_t)
- __attribute__((__bounded__(__minbytes__,2,SHA1_DIGEST_STRING_LENGTH)));
-char *SHA1Data(const u_int8_t *, size_t, char *)
- __attribute__((__bounded__(__string__,1,2)))
- __attribute__((__bounded__(__minbytes__,3,SHA1_DIGEST_STRING_LENGTH)));
+void SHA1Transform(u_int32_t [5], const u_int8_t [SHA1_BLOCK_LENGTH]);
+void SHA1Update(SHA1_CTX *, const u_int8_t *, size_t);
+void SHA1Final(u_int8_t [SHA1_DIGEST_LENGTH], SHA1_CTX *);
+char *SHA1End(SHA1_CTX *, char *);
+char *SHA1File(const char *, char *);
+char *SHA1FileChunk(const char *, char *, off_t, off_t);
+char *SHA1Data(const u_int8_t *, size_t, char *);
__END_DECLS
#define HTONDIGEST(x) do { \
diff --git a/include/sha2.h b/include/sha2.h
index 3f8337e..f08ef79 100644
--- a/include/sha2.h
+++ b/include/sha2.h
@@ -65,54 +65,33 @@ typedef struct _SHA2_CTX {
__BEGIN_DECLS
void SHA256Init(SHA2_CTX *);
void SHA256Transform(u_int32_t state[8], const u_int8_t [SHA256_BLOCK_LENGTH]);
-void SHA256Update(SHA2_CTX *, const u_int8_t *, size_t)
- __attribute__((__bounded__(__string__,2,3)));
+void SHA256Update(SHA2_CTX *, const u_int8_t *, size_t);
void SHA256Pad(SHA2_CTX *);
-void SHA256Final(u_int8_t [SHA256_DIGEST_LENGTH], SHA2_CTX *)
- __attribute__((__bounded__(__minbytes__,1,SHA256_DIGEST_LENGTH)));
-char *SHA256End(SHA2_CTX *, char *)
- __attribute__((__bounded__(__minbytes__,2,SHA256_DIGEST_STRING_LENGTH)));
-char *SHA256File(const char *, char *)
- __attribute__((__bounded__(__minbytes__,2,SHA256_DIGEST_STRING_LENGTH)));
-char *SHA256FileChunk(const char *, char *, off_t, off_t)
- __attribute__((__bounded__(__minbytes__,2,SHA256_DIGEST_STRING_LENGTH)));
-char *SHA256Data(const u_int8_t *, size_t, char *)
- __attribute__((__bounded__(__string__,1,2)))
- __attribute__((__bounded__(__minbytes__,3,SHA256_DIGEST_STRING_LENGTH)));
+void SHA256Final(u_int8_t [SHA256_DIGEST_LENGTH], SHA2_CTX *);
+char *SHA256End(SHA2_CTX *, char *);
+char *SHA256File(const char *, char *);
+char *SHA256FileChunk(const char *, char *, off_t, off_t);
+char *SHA256Data(const u_int8_t *, size_t, char *);
void SHA384Init(SHA2_CTX *);
void SHA384Transform(u_int64_t state[8], const u_int8_t [SHA384_BLOCK_LENGTH]);
-void SHA384Update(SHA2_CTX *, const u_int8_t *, size_t)
- __attribute__((__bounded__(__string__,2,3)));
+void SHA384Update(SHA2_CTX *, const u_int8_t *, size_t);
void SHA384Pad(SHA2_CTX *);
-void SHA384Final(u_int8_t [SHA384_DIGEST_LENGTH], SHA2_CTX *)
- __attribute__((__bounded__(__minbytes__,1,SHA384_DIGEST_LENGTH)));
-char *SHA384End(SHA2_CTX *, char *)
- __attribute__((__bounded__(__minbytes__,2,SHA384_DIGEST_STRING_LENGTH)));
-char *SHA384File(const char *, char *)
- __attribute__((__bounded__(__minbytes__,2,SHA384_DIGEST_STRING_LENGTH)));
-char *SHA384FileChunk(const char *, char *, off_t, off_t)
- __attribute__((__bounded__(__minbytes__,2,SHA384_DIGEST_STRING_LENGTH)));
-char *SHA384Data(const u_int8_t *, size_t, char *)
- __attribute__((__bounded__(__string__,1,2)))
- __attribute__((__bounded__(__minbytes__,3,SHA384_DIGEST_STRING_LENGTH)));
+void SHA384Final(u_int8_t [SHA384_DIGEST_LENGTH], SHA2_CTX *);
+char *SHA384End(SHA2_CTX *, char *);
+char *SHA384File(const char *, char *);
+char *SHA384FileChunk(const char *, char *, off_t, off_t);
+char *SHA384Data(const u_int8_t *, size_t, char *);
void SHA512Init(SHA2_CTX *);
void SHA512Transform(u_int64_t state[8], const u_int8_t [SHA512_BLOCK_LENGTH]);
-void SHA512Update(SHA2_CTX *, const u_int8_t *, size_t)
- __attribute__((__bounded__(__string__,2,3)));
+void SHA512Update(SHA2_CTX *, const u_int8_t *, size_t);
void SHA512Pad(SHA2_CTX *);
-void SHA512Final(u_int8_t [SHA512_DIGEST_LENGTH], SHA2_CTX *)
- __attribute__((__bounded__(__minbytes__,1,SHA512_DIGEST_LENGTH)));
-char *SHA512End(SHA2_CTX *, char *)
- __attribute__((__bounded__(__minbytes__,2,SHA512_DIGEST_STRING_LENGTH)));
-char *SHA512File(const char *, char *)
- __attribute__((__bounded__(__minbytes__,2,SHA512_DIGEST_STRING_LENGTH)));
-char *SHA512FileChunk(const char *, char *, off_t, off_t)
- __attribute__((__bounded__(__minbytes__,2,SHA512_DIGEST_STRING_LENGTH)));
-char *SHA512Data(const u_int8_t *, size_t, char *)
- __attribute__((__bounded__(__string__,1,2)))
- __attribute__((__bounded__(__minbytes__,3,SHA512_DIGEST_STRING_LENGTH)));
+void SHA512Final(u_int8_t [SHA512_DIGEST_LENGTH], SHA2_CTX *);
+char *SHA512End(SHA2_CTX *, char *);
+char *SHA512File(const char *, char *);
+char *SHA512FileChunk(const char *, char *, off_t, off_t);
+char *SHA512Data(const u_int8_t *, size_t, char *);
__END_DECLS
#endif /* _SHA2_H */