Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/crypto/rijndael sprinkle some #ifdef __LINT__ until C9X ...



details:   https://anonhg.NetBSD.org/src/rev/77419e5105ce
branches:  trunk
changeset: 542846:77419e5105ce
user:      drochner <drochner%NetBSD.org@localhost>
date:      Sun Feb 09 16:25:27 2003 +0000

description:
sprinkle some #ifdef __LINT__ until C9X named union member
initialization is digested

diffstat:

 sys/crypto/rijndael/boxes-fst.dat |  98 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 97 insertions(+), 1 deletions(-)

diffs (261 lines):

diff -r 1ab5a28ab384 -r 77419e5105ce sys/crypto/rijndael/boxes-fst.dat
--- a/sys/crypto/rijndael/boxes-fst.dat Sun Feb 09 15:49:34 2003 +0000
+++ b/sys/crypto/rijndael/boxes-fst.dat Sun Feb 09 16:25:27 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boxes-fst.dat,v 1.4 2001/05/22 23:45:41 kleink Exp $   */
+/*     $NetBSD: boxes-fst.dat,v 1.5 2003/02/09 16:25:27 drochner Exp $ */
 /*     $KAME: boxes-fst.dat,v 1.5 2000/10/02 17:14:26 itojun Exp $     */
 
 const word8 S[256] = {
@@ -46,8 +46,12 @@
        word8   xt8[256][4];
 };
 
+#ifdef __LINT__
+word8  T1[256][4] = {
+#else
 static const union xtab xT1 = {
        .xt8 = {
+#endif
 {0xc6,0x63,0x63,0xa5}, {0xf8,0x7c,0x7c,0x84}, {0xee,0x77,0x77,0x99}, {0xf6,0x7b,0x7b,0x8d},
 {0xff,0xf2,0xf2,0x0d}, {0xd6,0x6b,0x6b,0xbd}, {0xde,0x6f,0x6f,0xb1}, {0x91,0xc5,0xc5,0x54},
 {0x60,0x30,0x30,0x50}, {0x02,0x01,0x01,0x03}, {0xce,0x67,0x67,0xa9}, {0x56,0x2b,0x2b,0x7d},
@@ -113,11 +117,19 @@
 {0x82,0x41,0x41,0xc3}, {0x29,0x99,0x99,0xb0}, {0x5a,0x2d,0x2d,0x77}, {0x1e,0x0f,0x0f,0x11},
 {0x7b,0xb0,0xb0,0xcb}, {0xa8,0x54,0x54,0xfc}, {0x6d,0xbb,0xbb,0xd6}, {0x2c,0x16,0x16,0x3a}
        }
+#ifdef __LINT__
+;
+#else
 };
 #define        T1      xT1.xt8
+#endif
 
+#ifdef __LINT__
+word8  T2[256][4] = {
+#else
 static const union xtab xT2 = {
        .xt8 = {
+#endif
 {0xa5,0xc6,0x63,0x63}, {0x84,0xf8,0x7c,0x7c}, {0x99,0xee,0x77,0x77}, {0x8d,0xf6,0x7b,0x7b},
 {0x0d,0xff,0xf2,0xf2}, {0xbd,0xd6,0x6b,0x6b}, {0xb1,0xde,0x6f,0x6f}, {0x54,0x91,0xc5,0xc5},
 {0x50,0x60,0x30,0x30}, {0x03,0x02,0x01,0x01}, {0xa9,0xce,0x67,0x67}, {0x7d,0x56,0x2b,0x2b},
@@ -183,11 +195,19 @@
 {0xc3,0x82,0x41,0x41}, {0xb0,0x29,0x99,0x99}, {0x77,0x5a,0x2d,0x2d}, {0x11,0x1e,0x0f,0x0f},
 {0xcb,0x7b,0xb0,0xb0}, {0xfc,0xa8,0x54,0x54}, {0xd6,0x6d,0xbb,0xbb}, {0x3a,0x2c,0x16,0x16}
        }
+#ifdef __LINT__
+;
+#else
 };
 #define        T2      xT2.xt8
+#endif
 
+#ifdef __LINT__
+word8  T3[256][4] = {
+#else
 static const union xtab xT3 = {
        .xt8 = {
+#endif
 {0x63,0xa5,0xc6,0x63}, {0x7c,0x84,0xf8,0x7c}, {0x77,0x99,0xee,0x77}, {0x7b,0x8d,0xf6,0x7b},
 {0xf2,0x0d,0xff,0xf2}, {0x6b,0xbd,0xd6,0x6b}, {0x6f,0xb1,0xde,0x6f}, {0xc5,0x54,0x91,0xc5},
 {0x30,0x50,0x60,0x30}, {0x01,0x03,0x02,0x01}, {0x67,0xa9,0xce,0x67}, {0x2b,0x7d,0x56,0x2b},
@@ -253,11 +273,19 @@
 {0x41,0xc3,0x82,0x41}, {0x99,0xb0,0x29,0x99}, {0x2d,0x77,0x5a,0x2d}, {0x0f,0x11,0x1e,0x0f},
 {0xb0,0xcb,0x7b,0xb0}, {0x54,0xfc,0xa8,0x54}, {0xbb,0xd6,0x6d,0xbb}, {0x16,0x3a,0x2c,0x16}
        }
+#ifdef __LINT__
+;
+#else
 };
 #define        T3      xT3.xt8
+#endif
 
+#ifdef __LINT__
+word8  T4[256][4] = {
+#else
 static const union xtab xT4 = {
        .xt8 = {
+#endif
 {0x63,0x63,0xa5,0xc6}, {0x7c,0x7c,0x84,0xf8}, {0x77,0x77,0x99,0xee}, {0x7b,0x7b,0x8d,0xf6},
 {0xf2,0xf2,0x0d,0xff}, {0x6b,0x6b,0xbd,0xd6}, {0x6f,0x6f,0xb1,0xde}, {0xc5,0xc5,0x54,0x91},
 {0x30,0x30,0x50,0x60}, {0x01,0x01,0x03,0x02}, {0x67,0x67,0xa9,0xce}, {0x2b,0x2b,0x7d,0x56},
@@ -323,11 +351,19 @@
 {0x41,0x41,0xc3,0x82}, {0x99,0x99,0xb0,0x29}, {0x2d,0x2d,0x77,0x5a}, {0x0f,0x0f,0x11,0x1e},
 {0xb0,0xb0,0xcb,0x7b}, {0x54,0x54,0xfc,0xa8}, {0xbb,0xbb,0xd6,0x6d}, {0x16,0x16,0x3a,0x2c}
        }
+#ifdef __LINT__
+;
+#else
 };
 #define        T4      xT4.xt8
+#endif
 
+#ifdef __LINT__
+word8  T5[256][4] = {
+#else
 static const union xtab xT5 = {
        .xt8 = {
+#endif
 {0x51,0xf4,0xa7,0x50}, {0x7e,0x41,0x65,0x53}, {0x1a,0x17,0xa4,0xc3}, {0x3a,0x27,0x5e,0x96},
 {0x3b,0xab,0x6b,0xcb}, {0x1f,0x9d,0x45,0xf1}, {0xac,0xfa,0x58,0xab}, {0x4b,0xe3,0x03,0x93},
 {0x20,0x30,0xfa,0x55}, {0xad,0x76,0x6d,0xf6}, {0x88,0xcc,0x76,0x91}, {0xf5,0x02,0x4c,0x25},
@@ -393,11 +429,19 @@
 {0x39,0xa8,0x01,0x71}, {0x08,0x0c,0xb3,0xde}, {0xd8,0xb4,0xe4,0x9c}, {0x64,0x56,0xc1,0x90},
 {0x7b,0xcb,0x84,0x61}, {0xd5,0x32,0xb6,0x70}, {0x48,0x6c,0x5c,0x74}, {0xd0,0xb8,0x57,0x42}
        }
+#ifdef __LINT__
+;
+#else
 };
 #define        T5      xT5.xt8
+#endif
 
+#ifdef __LINT__
+word8  T6[256][4] = {
+#else
 static const union xtab xT6 = {
        .xt8 = {
+#endif
 {0x50,0x51,0xf4,0xa7}, {0x53,0x7e,0x41,0x65}, {0xc3,0x1a,0x17,0xa4}, {0x96,0x3a,0x27,0x5e},
 {0xcb,0x3b,0xab,0x6b}, {0xf1,0x1f,0x9d,0x45}, {0xab,0xac,0xfa,0x58}, {0x93,0x4b,0xe3,0x03},
 {0x55,0x20,0x30,0xfa}, {0xf6,0xad,0x76,0x6d}, {0x91,0x88,0xcc,0x76}, {0x25,0xf5,0x02,0x4c},
@@ -463,11 +507,19 @@
 {0x71,0x39,0xa8,0x01}, {0xde,0x08,0x0c,0xb3}, {0x9c,0xd8,0xb4,0xe4}, {0x90,0x64,0x56,0xc1},
 {0x61,0x7b,0xcb,0x84}, {0x70,0xd5,0x32,0xb6}, {0x74,0x48,0x6c,0x5c}, {0x42,0xd0,0xb8,0x57}
        }
+#ifdef __LINT__
+;
+#else
 };
 #define        T6      xT6.xt8
+#endif
 
+#ifdef __LINT__
+word8  T7[256][4] = {
+#else
 static const union xtab xT7 = {
        .xt8 = {
+#endif
 {0xa7,0x50,0x51,0xf4}, {0x65,0x53,0x7e,0x41}, {0xa4,0xc3,0x1a,0x17}, {0x5e,0x96,0x3a,0x27},
 {0x6b,0xcb,0x3b,0xab}, {0x45,0xf1,0x1f,0x9d}, {0x58,0xab,0xac,0xfa}, {0x03,0x93,0x4b,0xe3},
 {0xfa,0x55,0x20,0x30}, {0x6d,0xf6,0xad,0x76}, {0x76,0x91,0x88,0xcc}, {0x4c,0x25,0xf5,0x02},
@@ -533,11 +585,19 @@
 {0x01,0x71,0x39,0xa8}, {0xb3,0xde,0x08,0x0c}, {0xe4,0x9c,0xd8,0xb4}, {0xc1,0x90,0x64,0x56},
 {0x84,0x61,0x7b,0xcb}, {0xb6,0x70,0xd5,0x32}, {0x5c,0x74,0x48,0x6c}, {0x57,0x42,0xd0,0xb8}
        }
+#ifdef __LINT__
+;
+#else
 };
 #define        T7      xT7.xt8
+#endif
 
+#ifdef __LINT__
+word8  T8[256][4] = {
+#else
 static const union xtab xT8 = {
        .xt8 = {
+#endif
 {0xf4,0xa7,0x50,0x51}, {0x41,0x65,0x53,0x7e}, {0x17,0xa4,0xc3,0x1a}, {0x27,0x5e,0x96,0x3a},
 {0xab,0x6b,0xcb,0x3b}, {0x9d,0x45,0xf1,0x1f}, {0xfa,0x58,0xab,0xac}, {0xe3,0x03,0x93,0x4b},
 {0x30,0xfa,0x55,0x20}, {0x76,0x6d,0xf6,0xad}, {0xcc,0x76,0x91,0x88}, {0x02,0x4c,0x25,0xf5},
@@ -603,8 +663,12 @@
 {0xa8,0x01,0x71,0x39}, {0x0c,0xb3,0xde,0x08}, {0xb4,0xe4,0x9c,0xd8}, {0x56,0xc1,0x90,0x64},
 {0xcb,0x84,0x61,0x7b}, {0x32,0xb6,0x70,0xd5}, {0x6c,0x5c,0x74,0x48}, {0xb8,0x57,0x42,0xd0}
        }
+#ifdef __LINT__
+;
+#else
 };
 #define        T8      xT8.xt8
+#endif
 
 static const word8 S5[256] = {
 0x52,0x09,0x6a,0xd5,
@@ -673,8 +737,12 @@
 0x55,0x21,0x0c,0x7d
 };
 
+#ifdef __LINT__
+word8  U1[256][4] = {
+#else
 static const union xtab xU1 = {
        .xt8 = {
+#endif
 {0x00,0x00,0x00,0x00}, {0x0e,0x09,0x0d,0x0b}, {0x1c,0x12,0x1a,0x16}, {0x12,0x1b,0x17,0x1d},
 {0x38,0x24,0x34,0x2c}, {0x36,0x2d,0x39,0x27}, {0x24,0x36,0x2e,0x3a}, {0x2a,0x3f,0x23,0x31},
 {0x70,0x48,0x68,0x58}, {0x7e,0x41,0x65,0x53}, {0x6c,0x5a,0x72,0x4e}, {0x62,0x53,0x7f,0x45},
@@ -740,11 +808,19 @@
 {0xa7,0x79,0xb4,0x92}, {0xa9,0x70,0xb9,0x99}, {0xbb,0x6b,0xae,0x84}, {0xb5,0x62,0xa3,0x8f},
 {0x9f,0x5d,0x80,0xbe}, {0x91,0x54,0x8d,0xb5}, {0x83,0x4f,0x9a,0xa8}, {0x8d,0x46,0x97,0xa3}
        }
+#ifdef __LINT__
+;
+#else
 };
 #define        U1      xU1.xt8
+#endif
 
+#ifdef __LINT__
+word8  U2[256][4] = {
+#else
 static const union xtab xU2 = {
        .xt8 = {
+#endif
 {0x00,0x00,0x00,0x00}, {0x0b,0x0e,0x09,0x0d}, {0x16,0x1c,0x12,0x1a}, {0x1d,0x12,0x1b,0x17},
 {0x2c,0x38,0x24,0x34}, {0x27,0x36,0x2d,0x39}, {0x3a,0x24,0x36,0x2e}, {0x31,0x2a,0x3f,0x23},
 {0x58,0x70,0x48,0x68}, {0x53,0x7e,0x41,0x65}, {0x4e,0x6c,0x5a,0x72}, {0x45,0x62,0x53,0x7f},
@@ -810,11 +886,19 @@
 {0x92,0xa7,0x79,0xb4}, {0x99,0xa9,0x70,0xb9}, {0x84,0xbb,0x6b,0xae}, {0x8f,0xb5,0x62,0xa3},
 {0xbe,0x9f,0x5d,0x80}, {0xb5,0x91,0x54,0x8d}, {0xa8,0x83,0x4f,0x9a}, {0xa3,0x8d,0x46,0x97}
        }
+#ifdef __LINT__
+;
+#else
 };
 #define        U2      xU2.xt8
+#endif
 
+#ifdef __LINT__
+word8  U3[256][4] = {
+#else
 static const union xtab xU3 = {
        .xt8 = {
+#endif
 {0x00,0x00,0x00,0x00}, {0x0d,0x0b,0x0e,0x09}, {0x1a,0x16,0x1c,0x12}, {0x17,0x1d,0x12,0x1b},
 {0x34,0x2c,0x38,0x24}, {0x39,0x27,0x36,0x2d}, {0x2e,0x3a,0x24,0x36}, {0x23,0x31,0x2a,0x3f},
 {0x68,0x58,0x70,0x48}, {0x65,0x53,0x7e,0x41}, {0x72,0x4e,0x6c,0x5a}, {0x7f,0x45,0x62,0x53},
@@ -880,11 +964,19 @@
 {0xb4,0x92,0xa7,0x79}, {0xb9,0x99,0xa9,0x70}, {0xae,0x84,0xbb,0x6b}, {0xa3,0x8f,0xb5,0x62},
 {0x80,0xbe,0x9f,0x5d}, {0x8d,0xb5,0x91,0x54}, {0x9a,0xa8,0x83,0x4f}, {0x97,0xa3,0x8d,0x46}
        }
+#ifdef __LINT__
+;
+#else
 };
 #define        U3      xU3.xt8
+#endif
 
+#ifdef __LINT__
+word8  U4[256][4] = {
+#else
 static const union xtab xU4 = {
        .xt8 = {
+#endif
 {0x00,0x00,0x00,0x00}, {0x09,0x0d,0x0b,0x0e}, {0x12,0x1a,0x16,0x1c}, {0x1b,0x17,0x1d,0x12},
 {0x24,0x34,0x2c,0x38}, {0x2d,0x39,0x27,0x36}, {0x36,0x2e,0x3a,0x24}, {0x3f,0x23,0x31,0x2a},
 {0x48,0x68,0x58,0x70}, {0x41,0x65,0x53,0x7e}, {0x5a,0x72,0x4e,0x6c}, {0x53,0x7f,0x45,0x62},
@@ -950,8 +1042,12 @@
 {0x79,0xb4,0x92,0xa7}, {0x70,0xb9,0x99,0xa9}, {0x6b,0xae,0x84,0xbb}, {0x62,0xa3,0x8f,0xb5},
 {0x5d,0x80,0xbe,0x9f}, {0x54,0x8d,0xb5,0x91}, {0x4f,0x9a,0xa8,0x83}, {0x46,0x97,0xa3,0x8d}
        }
+#ifdef __LINT__
+;
+#else
 };
 #define        U4      xU4.xt8
+#endif
 
 static const word32 rcon[30] = { 
   0x01,0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91



Home | Main Index | Thread Index | Old Index