On Mon, Jul 14, 2014 at 11:44:30AM -0400, Jean-Philippe Ouellet wrote:
> The C standard mandates that static be first.
Of course I forgot something... This is the hunk that made me
notice in the first place. Found while porting signify to osx.
Index: lib/libc/hash/sha2.c
===================================================================
RCS file: /cvs/src/lib/libc/hash/sha2.c,v
retrieving revision 1.17
diff -u -p -r1.17 sha2.c
--- lib/libc/hash/sha2.c 8 Jan 2014 06:14:57 -0000 1.17
+++ lib/libc/hash/sha2.c 15 Jul 2014 04:18:06 -0000
@@ -171,7 +171,7 @@
/*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/
/* Hash constant words K for SHA-224 and SHA-256: */
-const static u_int32_t K256[64] = {
+static const u_int32_t K256[64] = {
0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL,
0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL,
0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL,
@@ -191,7 +191,7 @@ const static u_int32_t K256[64] = {
};
/* Initial hash value H for SHA-224: */
-const static u_int32_t sha224_initial_hash_value[8] = {
+static const u_int32_t sha224_initial_hash_value[8] = {
0xc1059ed8UL,
0x367cd507UL,
0x3070dd17UL,
@@ -203,7 +203,7 @@ const static u_int32_t sha224_initial_ha
};
/* Initial hash value H for SHA-256: */
-const static u_int32_t sha256_initial_hash_value[8] = {
+static const u_int32_t sha256_initial_hash_value[8] = {
0x6a09e667UL,
0xbb67ae85UL,
0x3c6ef372UL,
@@ -215,7 +215,7 @@ const static u_int32_t sha256_initial_ha
};
/* Hash constant words K for SHA-384 and SHA-512: */
-const static u_int64_t K512[80] = {
+static const u_int64_t K512[80] = {
0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL,
0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL,
0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
@@ -259,7 +259,7 @@ const static u_int64_t K512[80] = {
};
/* Initial hash value H for SHA-512 */
-const static u_int64_t sha512_initial_hash_value[8] = {
+static const u_int64_t sha512_initial_hash_value[8] = {
0x6a09e667f3bcc908ULL,
0xbb67ae8584caa73bULL,
0x3c6ef372fe94f82bULL,
@@ -272,7 +272,7 @@ const static u_int64_t sha512_initial_ha
#if !defined(SHA2_SMALL)
/* Initial hash value H for SHA-384 */
-const static u_int64_t sha384_initial_hash_value[8] = {
+static const u_int64_t sha384_initial_hash_value[8] = {
0xcbbb9d5dc1059ed8ULL,
0x629a292a367cd507ULL,
0x9159015a3070dd17ULL,