- Timestamp:
- Jan 28, 2006, 9:07:52 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/samhain.c
r1 r18 1075 1075 * 1076 1076 *******************************************************/ 1077 #if !defined(SH_CUTEST) 1077 1078 int main(int argc, char * argv[]) 1079 #else 1080 int undef_main(int argc, char * argv[]) 1081 #endif 1078 1082 { 1079 1083 #if defined(INET_SYSLOG) -
trunk/src/sh_database.c
r13 r18 1064 1064 } 1065 1065 1066 /* Read in defaults from /etc/my.cnf and associated files, 1067 * suggested by arjones at simultan dyndns org 1068 * see: - http://dev.mysql.com/doc/refman/5.0/en/option-files.html 1069 * for the my.cnf format, 1070 * - http://dev.mysql.com/doc/refman/5.0/en/mysql-options.html 1071 * for possible options 1072 * We don't check the return value because it's useless (failure due 1073 * to lack of access permission is not reported). 1074 */ 1075 mysql_options(db_conn, MYSQL_READ_DEFAULT_GROUP, _("samhain")); 1076 1066 1077 status = 0; 1067 1078 -
trunk/src/sh_hash.c
r10 r18 396 396 static int hashfunc(char *s) 397 397 { 398 unsigned n = 0;398 unsigned int n = 0; 399 399 400 400 for ( ; *s; s++) 401 401 n = 31 * n + *s; 402 return n & 0xFFFF;/* % TABSIZE*/; 402 403 return n & (TABSIZE - 1); /* % TABSIZE */; 403 404 } 404 405 -
trunk/src/sh_tiger0.c
r11 r18 25 25 #include "sh_utils.h" 26 26 27 #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) 27 #define PRIV_MAX 32768 28 29 #if defined(TIGER_64_BIT) 28 30 #if defined(HAVE_LONG_64) 29 31 typedef unsigned long int word64; 32 #elif defined(HAVE_LONG_LONG_64) 33 typedef unsigned long long int word64; 30 34 #else 31 typedef unsigned long long int word64; 35 #error No 64 bit type found ! 32 36 #endif 33 37 #endif … … 46 50 #define GPGFORMAT (_("%08X %08X %08X %08X %08X %08X")) 47 51 #else 48 #error No 32 b ytetype found !52 #error No 32 bit type found ! 49 53 #endif 50 54 … … 54 58 #define FIL__ _("sh_tiger0.c") 55 59 56 #if defined( HAVE_LONG_64) || defined(HAVE_LONG_LONG_64)57 /* #ifdef HAVE_LONG_64 */ 60 #if defined(TIGER_64_BIT) 61 58 62 void tiger_t(word64 *str, word64 length, word64 * res); 59 63 void tiger(word64 *str, word64 length, word64 * res); … … 97 101 static sh_byte buffer[PRIV_MAX + 72]; 98 102 99 #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) 100 /* #ifdef HAVE_LONG_64 */ 103 #if defined(TIGER_64_BIT) 101 104 static 102 105 word64 * sh_tiger_hash_val (char * filename, TigerType what, … … 114 117 char * tmp; 115 118 sh_byte * bptr; 116 /* sh_byte buffer[PRIV_MAX + 72]; */117 119 sh_byte bbuf[64]; 118 120 … … 131 133 #endif 132 134 133 #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) 134 /* #ifdef HAVE_LONG_64 */ 135 #if defined(TIGER_64_BIT) 135 136 #define TIGER_CAST (word64*) 136 137 static word64 res[3]; … … 254 255 } 255 256 256 if (blk < 64) /* this must be (PRIV_MAX / 64) */257 if (blk < (PRIV_MAX / 64)) /* this must be (PRIV_MAX / 64) */ 257 258 break; 258 259 … … 359 360 bptr = buffer; 360 361 361 memcpy(bptr, bbuf, 64); bptr += 64; 362 memcpy(bptr, bbuf, 64); bptr += 64; 363 memcpy(bptr, buffer, 128); bptr += 128; 364 memcpy(bptr, buffer, 256); bptr += 256; 365 memcpy(bptr, buffer, 512); bptr += 512; 366 memcpy(bptr, buffer,1024); bptr += 1024; 367 memcpy(bptr, buffer,2048); 362 memcpy(bptr, bbuf, 64); bptr += 64; 363 memcpy(bptr, bbuf, 64); bptr += 64; 364 memcpy(bptr, buffer, 128); bptr += 128; 365 memcpy(bptr, buffer, 256); bptr += 256; 366 memcpy(bptr, buffer, 512); bptr += 512; 367 memcpy(bptr, buffer, 1024); bptr += 1024; 368 memcpy(bptr, buffer, 2048); bptr += 2048; 369 memcpy(bptr, buffer, 4096); bptr += 4096; 370 memcpy(bptr, buffer, 8192); bptr += 8192; 371 memcpy(bptr, buffer,16384); 368 372 369 373 if (what == TIGER_FILE) … … 814 818 MSG_E_SUBGEN, _("Not TIGER_FD"), 815 819 _("sh_tiger_md5_hash")); 820 out[0] = '\0'; 816 821 return out; 817 822 } … … 1328 1333 MSG_E_SUBGEN, _("Not TIGER_FD"), 1329 1334 _("sh_tiger_sha1_hash")); 1335 out[0] = '\0'; 1330 1336 return out; 1331 1337 } … … 1410 1416 unsigned long Length, int timeout) 1411 1417 { 1412 #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) 1413 /* #ifdef HAVE_LONG_64 */ 1418 #if defined(TIGER_64_BIT) 1414 1419 word64 * res; 1415 1420 #else … … 1425 1430 { 1426 1431 /*@-bufferoverflowhigh -formatconst@*/ 1427 #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) 1428 /* #ifdef HAVE_LONG_64 */ 1432 #if defined(TIGER_64_BIT) 1429 1433 sprintf(out, /* known to fit */ 1430 1434 MYFORMAT, … … 1461 1465 char * out; 1462 1466 char outhash[48+6+1]; 1463 #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) 1464 /* #ifdef HAVE_LONG_64 */ 1467 #if defined(TIGER_64_BIT) 1465 1468 word64 * res; 1466 1469 #else … … 1474 1477 { 1475 1478 /*@-bufferoverflowhigh -formatconst@*/ 1476 #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) 1477 /* #ifdef HAVE_LONG_64 */ 1479 #if defined(TIGER_64_BIT) 1478 1480 sprintf(outhash, /* known to fit */ 1479 1481 GPGFORMAT, … … 1530 1532 unsigned long Length) 1531 1533 { 1532 #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) 1533 /* #ifdef HAVE_LONG_64 */ 1534 #if defined(TIGER_64_BIT) 1534 1535 word64 * res; 1535 1536 #else … … 1548 1549 if (res != NULL) 1549 1550 { 1550 #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) 1551 /* #ifdef HAVE_LONG_64 */ 1551 #if defined(TIGER_64_BIT) 1552 1552 out[0] = (UINT32)(res[0]>>32); 1553 1553 out[1] = (UINT32)(res[0]); -
trunk/src/sh_tiger1.c
r1 r18 5 5 #include "config_xor.h" 6 6 7 8 #if !defined(HAVE_LONG_64) && !defined(HAVE_LONG_LONG_64) 7 /* we already inline in the function used for file checksums */ 8 /* #define UNROLL_COMPRESS */ 9 #undef UNROLL_COMPRESS 10 11 #if !defined(TIGER_64_BIT) 9 12 10 13 /* Tiger: A Fast New Hash Function … … 37 40 typedef unsigned short sh_word32; 38 41 #else 39 #error No 32 b ytetype found !42 #error No 32 bit type found ! 40 43 #endif 41 44 … … 46 49 #define BIG_ENDIAN 47 50 #endif 48 49 /* NOTE that this code is NOT FULLY OPTIMIZED for any */50 /* machine. Assembly code might be much faster on some */51 /* machines, especially if the code is compiled with */52 /* gcc. */53 51 54 52 /* The number of passes of the hash function. */ … … 65 63 #define t4 (tiger_table+256*3) 66 64 67 #define s h_sub64(s0, s1, p0, p1) \65 #define sub64(s0, s1, p0, p1) \ 68 66 temps0 = (p0); \ 69 67 tcarry = s0 < temps0; \ … … 71 69 s1 -= (p1) + tcarry; 72 70 73 #define sh_add64(s0, s1, p0, p1) \71 #define add64(s0, s1, p0, p1) \ 74 72 temps0 = (p0); \ 75 73 s0 += temps0; \ … … 77 75 s1 += (p1) + tcarry; 78 76 79 #define sh_xor64(s0, s1, p0, p1) \77 #define xor64(s0, s1, p0, p1) \ 80 78 s0 ^= (p0); \ 81 79 s1 ^= (p1); 82 80 83 #define sh_mul5(s0, s1) \81 #define mul5(s0, s1) \ 84 82 tempt0 = s0<<2; \ 85 83 tempt1 = (s1<<2)|(s0>>30); \ 86 sh_add64(s0, s1, tempt0, tempt1);87 88 #define sh_mul7(s0, s1) \84 add64(s0, s1, tempt0, tempt1); 85 86 #define mul7(s0, s1) \ 89 87 tempt0 = s0<<3; \ 90 88 tempt1 = (s1<<3)|(s0>>29); \ 91 s h_sub64(tempt0, tempt1, s0, s1); \89 sub64(tempt0, tempt1, s0, s1); \ 92 90 s0 = tempt0; \ 93 91 s1 = tempt1; 94 92 95 #define sh_mul9(s0, s1) \93 #define mul9(s0, s1) \ 96 94 tempt0 = s0<<3; \ 97 95 tempt1 = (s1<<3)|(s0>>29); \ 98 sh_add64(s0, s1, tempt0, tempt1);99 100 #define s h_save_abc \96 add64(s0, s1, tempt0, tempt1); 97 98 #define save_abc \ 101 99 aa0 = a0; \ 102 100 aa1 = a1; \ … … 106 104 cc1 = c1; 107 105 108 #define sh_round(a0,a1,b0,b1,c0,c1,x0,x1,mul) \109 sh_xor64(c0, c1, x0, x1); \106 #define roundX(a0,a1,b0,b1,c0,c1,x0,x1) \ 107 xor64(c0, c1, x0, x1); \ 110 108 temp0 = t1[((c0)>>(0*8))&0xFF][0] ; \ 111 109 temp1 = t1[((c0)>>(0*8))&0xFF][1] ; \ … … 116 114 temp0 ^= t4[((c1)>>(2*8))&0xFF][0] ; \ 117 115 temp1 ^= t4[((c1)>>(2*8))&0xFF][1] ; \ 118 s h_sub64(a0, a1, temp0, temp1); \116 sub64(a0, a1, temp0, temp1); \ 119 117 temp0 = t4[((c0)>>(1*8))&0xFF][0] ; \ 120 118 temp1 = t4[((c0)>>(1*8))&0xFF][1] ; \ … … 125 123 temp0 ^= t1[((c1)>>(3*8))&0xFF][0] ; \ 126 124 temp1 ^= t1[((c1)>>(3*8))&0xFF][1] ; \ 127 sh_add64(b0, b1, temp0, temp1); \ 128 if((mul)==5) \ 129 {sh_mul5(b0, b1);} \ 130 else \ 131 if((mul)==7) \ 132 {sh_mul7(b0, b1);} \ 133 else \ 134 {sh_mul9(b0, b1)}; 135 136 #define sh_pass(a0,a1,b0,b1,c0,c1,mul) \ 137 sh_round(a0,a1,b0,b1,c0,c1,x00,x01,mul); \ 138 sh_round(b0,b1,c0,c1,a0,a1,x10,x11,mul); \ 139 sh_round(c0,c1,a0,a1,b0,b1,x20,x21,mul); \ 140 sh_round(a0,a1,b0,b1,c0,c1,x30,x31,mul); \ 141 sh_round(b0,b1,c0,c1,a0,a1,x40,x41,mul); \ 142 sh_round(c0,c1,a0,a1,b0,b1,x50,x51,mul); \ 143 sh_round(a0,a1,b0,b1,c0,c1,x60,x61,mul); \ 144 sh_round(b0,b1,c0,c1,a0,a1,x70,x71,mul); 145 146 #define sh_key_schedule \ 147 sh_sub64(x00, x01, x70^0xA5A5A5A5, x71^0xA5A5A5A5); \ 148 sh_xor64(x10, x11, x00, x01); \ 149 sh_add64(x20, x21, x10, x11); \ 150 sh_sub64(x30, x31, x20^((~x10)<<19), ~x21^(((x11)<<19)|((x10)>>13))); \ 151 sh_xor64(x40, x41, x30, x31); \ 152 sh_add64(x50, x51, x40, x41); \ 153 sh_sub64(x60, x61, ~x50^(((x40)>>23)|((x41)<<9)), x51^((~x41)>>23)); \ 154 sh_xor64(x70, x71, x60, x61); \ 155 sh_add64(x00, x01, x70, x71); \ 156 sh_sub64(x10, x11, x00^((~x70)<<19), ~x01^(((x71)<<19)|((x70)>>13))); \ 157 sh_xor64(x20, x21, x10, x11); \ 158 sh_add64(x30, x31, x20, x21); \ 159 sh_sub64(x40, x41, ~x30^(((x20)>>23)|((x21)<<9)), x31^((~x21)>>23)); \ 160 sh_xor64(x50, x51, x40, x41); \ 161 sh_add64(x60, x61, x50, x51); \ 162 sh_sub64(x70, x71, x60^0x89ABCDEF, x61^0x01234567); 163 164 #define sh_feedforward \ 165 sh_xor64(a0, a1, aa0, aa1); \ 166 sh_sub64(b0, b1, bb0, bb1); \ 167 sh_add64(c0, c1, cc0, cc1); 168 169 #ifdef UNROLL_COMPRESS 170 #define sh_compress \ 171 sh_save_abc \ 172 sh_pass(a0,a1,b0,b1,c0,c1,5); \ 173 sh_key_schedule; \ 174 sh_pass(c0,c1,a0,a1,b0,b1,7); \ 175 sh_key_schedule; \ 176 sh_pass(b0,b1,c0,c1,a0,a1,9); \ 177 for(pass_no=3; pass_no<PASSES; pass_no++) { \ 178 sh_key_schedule \ 179 sh_pass(a0,a1,b0,b1,c0,c1,9); \ 180 tmpa=a0; a0=c0; c0=b0; b0=tmpa; \ 181 tmpa=a1; a1=c1; c1=b1; b1=tmpa;} \ 182 sh_feedforward 183 #else 184 #define sh_compress \ 185 sh_save_abc \ 186 for(pass_no=0; pass_no<PASSES; pass_no++) { \ 187 if(pass_no != 0) {sh_key_schedule} \ 188 sh_pass(a0,a1,b0,b1,c0,c1,(pass_no==0?5:pass_no==1?7:9)) \ 189 tmpa=a0; a0=c0; c0=b0; b0=tmpa; \ 190 tmpa=a1; a1=c1; c1=b1; b1=tmpa;} \ 191 sh_feedforward 192 #endif 125 add64(b0, b1, temp0, temp1); 126 127 128 #define round5(a0,a1,b0,b1,c0,c1,x0,x1) \ 129 roundX(a0,a1,b0,b1,c0,c1,x0,x1); \ 130 mul5(b0, b1); 131 132 #define round7(a0,a1,b0,b1,c0,c1,x0,x1) \ 133 roundX(a0,a1,b0,b1,c0,c1,x0,x1); \ 134 mul7(b0, b1); 135 136 #define round9(a0,a1,b0,b1,c0,c1,x0,x1) \ 137 roundX(a0,a1,b0,b1,c0,c1,x0,x1); \ 138 mul9(b0, b1); 139 140 141 /* mixed with key_schedule 142 */ 143 #define pass5(a0,a1,b0,b1,c0,c1) \ 144 round5(a0,a1,b0,b1,c0,c1,x00,x01); \ 145 sub64(x00, x01, x70^0xA5A5A5A5, x71^0xA5A5A5A5); \ 146 round5(b0,b1,c0,c1,a0,a1,x10,x11); \ 147 xor64(x10, x11, x00, x01); \ 148 round5(c0,c1,a0,a1,b0,b1,x20,x21); \ 149 add64(x20, x21, x10, x11); \ 150 round5(a0,a1,b0,b1,c0,c1,x30,x31); \ 151 sub64(x30, x31, x20^((~x10)<<19), ~x21^(((x11)<<19)|((x10)>>13))); \ 152 round5(b0,b1,c0,c1,a0,a1,x40,x41); \ 153 xor64(x40, x41, x30, x31); \ 154 round5(c0,c1,a0,a1,b0,b1,x50,x51); \ 155 add64(x50, x51, x40, x41); \ 156 round5(a0,a1,b0,b1,c0,c1,x60,x61); \ 157 sub64(x60, x61, ~x50^(((x40)>>23)|((x41)<<9)), x51^((~x41)>>23)); \ 158 round5(b0,b1,c0,c1,a0,a1,x70,x71); 159 160 /* mixed with key_schedule 161 */ 162 #define pass7(a0,a1,b0,b1,c0,c1) \ 163 round7(a0,a1,b0,b1,c0,c1,x00,x01); \ 164 sub64(x00, x01, x70^0xA5A5A5A5, x71^0xA5A5A5A5); \ 165 round7(b0,b1,c0,c1,a0,a1,x10,x11); \ 166 xor64(x10, x11, x00, x01); \ 167 round7(c0,c1,a0,a1,b0,b1,x20,x21); \ 168 add64(x20, x21, x10, x11); \ 169 round7(a0,a1,b0,b1,c0,c1,x30,x31); \ 170 sub64(x30, x31, x20^((~x10)<<19), ~x21^(((x11)<<19)|((x10)>>13))); \ 171 round7(b0,b1,c0,c1,a0,a1,x40,x41); \ 172 xor64(x40, x41, x30, x31); \ 173 round7(c0,c1,a0,a1,b0,b1,x50,x51); \ 174 add64(x50, x51, x40, x41); \ 175 round7(a0,a1,b0,b1,c0,c1,x60,x61); \ 176 sub64(x60, x61, ~x50^(((x40)>>23)|((x41)<<9)), x51^((~x41)>>23)); \ 177 round7(b0,b1,c0,c1,a0,a1,x70,x71); 178 179 /* mixed with key_schedule 180 */ 181 #define pass9(a0,a1,b0,b1,c0,c1) \ 182 round9(a0,a1,b0,b1,c0,c1,x00,x01); \ 183 sub64(x00, x01, x70^0xA5A5A5A5, x71^0xA5A5A5A5); \ 184 round9(b0,b1,c0,c1,a0,a1,x10,x11); \ 185 xor64(x10, x11, x00, x01); \ 186 round9(c0,c1,a0,a1,b0,b1,x20,x21); \ 187 add64(x20, x21, x10, x11); \ 188 round9(a0,a1,b0,b1,c0,c1,x30,x31); \ 189 sub64(x30, x31, x20^((~x10)<<19), ~x21^(((x11)<<19)|((x10)>>13))); \ 190 round9(b0,b1,c0,c1,a0,a1,x40,x41); \ 191 xor64(x40, x41, x30, x31); \ 192 round9(c0,c1,a0,a1,b0,b1,x50,x51); \ 193 add64(x50, x51, x40, x41); \ 194 round9(a0,a1,b0,b1,c0,c1,x60,x61); \ 195 sub64(x60, x61, ~x50^(((x40)>>23)|((x41)<<9)), x51^((~x41)>>23)); \ 196 round9(b0,b1,c0,c1,a0,a1,x70,x71); 197 198 #define key_schedule \ 199 xor64(x70, x71, x60, x61); \ 200 add64(x00, x01, x70, x71); \ 201 sub64(x10, x11, x00^((~x70)<<19), ~x01^(((x71)<<19)|((x70)>>13))); \ 202 xor64(x20, x21, x10, x11); \ 203 add64(x30, x31, x20, x21); \ 204 sub64(x40, x41, ~x30^(((x20)>>23)|((x21)<<9)), x31^((~x21)>>23)); \ 205 xor64(x50, x51, x40, x41); \ 206 add64(x60, x61, x50, x51); \ 207 sub64(x70, x71, x60^0x89ABCDEF, x61^0x01234567); 208 209 #define feedforward \ 210 xor64(a0, a1, aa0, aa1); \ 211 sub64(b0, b1, bb0, bb1); \ 212 add64(c0, c1, cc0, cc1); 213 214 #define compress \ 215 pass5(a0,a1,b0,b1,c0,c1); \ 216 key_schedule; \ 217 pass7(c0,c1,a0,a1,b0,b1); \ 218 key_schedule; \ 219 pass9(b0,b1,c0,c1,a0,a1); \ 220 feedforward 193 221 194 222 #define tiger_compress_macro(str, state) \ 195 223 { \ 196 register sh_word32 a0, a1, b0, b1, c0, c1 , tmpa; \224 register sh_word32 a0, a1, b0, b1, c0, c1; \ 197 225 sh_word32 aa0, aa1, bb0, bb1, cc0, cc1; \ 198 226 sh_word32 x00, x01, x10, x11, x20, x21, x30, x31, \ 199 x40, x41, x50, x51, x60, x61, x70, x71; \ 200 register sh_word32 temp0, temp1, tempt0, tempt1, temps0, tcarry; \ 201 int pass_no; \ 227 x40, x41, x50, x51, x60, x61, x70, x71; \ 228 sh_word32 temp0, temp1, tempt0, tempt1, temps0, tcarry; \ 202 229 \ 203 230 a0 = state[0]; \ … … 208 235 c1 = state[5]; \ 209 236 \ 237 save_abc \ 238 \ 210 239 x00=str[0*2]; x01=str[0*2+1]; x10=str[1*2]; x11=str[1*2+1]; \ 211 240 x20=str[2*2]; x21=str[2*2+1]; x30=str[3*2]; x31=str[3*2+1]; \ … … 213 242 x60=str[6*2]; x61=str[6*2+1]; x70=str[7*2]; x71=str[7*2+1]; \ 214 243 \ 215 sh_compress; \244 compress; \ 216 245 \ 217 246 state[0] = a0; \ … … 223 252 } 224 253 225 #if def UNROLL_COMPRESS254 #if defined(UNROLL_COMPRESS) 226 255 /* The compress function is inlined */ 227 256 #define tiger_compress(str, state) \ 228 257 tiger_compress_macro(((sh_word32*)str), ((sh_word32*)state)) 229 #else 230 /* The compress function is a function */ 258 259 #else 260 231 261 void 232 262 tiger_compress(sh_word32 *str, sh_word32 state[6]) … … 249 279 #ifdef BIG_ENDIAN 250 280 for(j=0; j<64; j++) 251 252 tiger_compress (((sh_word32*)temp), res);253 #else 254 tiger_compress (str, res);281 temp[j^3] = ((sh_byte*)str)[j]; 282 tiger_compress_macro(((sh_word32*)temp), res); 283 #else 284 tiger_compress_macro(str, res); 255 285 #endif 256 286 str += 16; … … 258 288 } 259 289 260 void 261 tiger(sh_word32 *str, sh_word32 length, sh_word32 res[6])290 291 void tiger(sh_word32 *str, sh_word32 length, sh_word32 res[6]) 262 292 { 263 293 register sh_word32 i, j; 264 294 sh_byte temp[64]; 295 296 /* 297 * res[0]=0x89ABCDEF; 298 * res[1]=0x01234567; 299 * res[2]=0x76543210; 300 * res[3]=0xFEDCBA98; 301 * res[4]=0xC3B2E187; 302 * res[5]=0xF096A5B4; 303 */ 265 304 266 305 for(i=length; i>=64; i-=64) … … 307 346 } 308 347 309 #else 310 void dummy_1 (int a) 311 { 312 (void) a; 313 return; 314 } 315 #endif 316 317 318 319 320 321 322 323 324 348 #endif 349 -
trunk/src/sh_tiger1_64.c
r1 r18 5 5 #include "config_xor.h" 6 6 7 #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) 8 9 /*@-incondefs -macroparens -macroassign -macroparams -macrostmt @*/ 10 /*@-fixedformalarray +charindex -type -paramuse -predboolint -exportlocal@*/ 7 #if defined(TIGER_64_BIT) 8 9 /* #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) */ 10 11 #undef USE_MEMSET 12 11 13 /* Big endian: */ 12 14 #ifdef WORDS_BIGENDIAN 13 15 #define BIG_ENDIAN 14 16 #endif 15 16 17 17 18 /* Tiger: A Fast New Hash Function … … 38 39 #if defined(HAVE_LONG_64) 39 40 typedef unsigned long int word64; 40 #el se41 #elif defined(HAVE_LONG_LONG_64) 41 42 typedef unsigned long long int word64; 43 #else 44 #error No 64 bit type found ! 42 45 #endif 43 46 … … 49 52 typedef unsigned short sh_word32; 50 53 #else 51 #error No 32 b ytetype found !54 #error No 32 bit type found ! 52 55 #endif 53 56 54 57 typedef unsigned char sh_byte; 55 58 56 /* Big endian: 57 #if !(defined(__alpha)||defined(__i386__)||defined(__vax__)) 58 #define BIG_ENDIAN 59 #endif 60 */ 61 62 /* The following macro denotes that an optimization */ 63 /* for Alpha is required. It is used only for */ 64 /* optimization of time. Otherwise it does nothing. */ 65 #ifdef __alpha 66 #define OPTIMIZE_FOR_ALPHA 67 #endif 68 69 /* NOTE that this code is NOT FULLY OPTIMIZED for any */ 70 /* machine. Assembly code might be much faster on some */ 71 /* machines, especially if the code is compiled with */ 72 /* gcc. */ 73 74 /* The number of passes of the hash function. */ 75 /* Three passes are recommended. */ 76 /* Use four passes when you need extra security. */ 77 /* Must be at least three. */ 59 #if defined(TIGER_OPT_ASM) 60 #define TIGER_ASM64_2 1 61 #else 62 #define TIGER_C 1 63 #endif 64 65 /* The number of passes of the hash function. */ 66 /* Three passes are recommended. */ 67 /* Use four passes when you need extra security. */ 68 /* Must be at least three. */ 78 69 #define PASSES 3 79 70 80 71 extern word64 tiger_table[4*256]; 72 73 /* Volatile can help if compiler is smart enough to use memory operand */ 74 static /*volatile*/ const word64 XOR_CONST1=0xA5A5A5A5A5A5A5A5LL; 75 static /*volatile*/ const word64 XOR_CONST2=0x0123456789ABCDEFLL; 81 76 82 77 #define t1 (tiger_table) … … 85 80 #define t4 (tiger_table+256*3) 86 81 82 #define pass_start 83 #define pass_end 84 85 86 87 87 #define save_abc \ 88 aa = a; \ 89 bb = b; \ 90 cc = c; 91 92 #ifdef OPTIMIZE_FOR_ALPHA 93 /* This is the official definition of round */ 94 #define round(a,b,c,x,mul) \ 95 c ^= x; \ 96 a -= t1[((c)>>(0*8))&0xFF] ^ t2[((c)>>(2*8))&0xFF] ^ \ 97 t3[((c)>>(4*8))&0xFF] ^ t4[((c)>>(6*8))&0xFF] ; \ 98 b += t4[((c)>>(1*8))&0xFF] ^ t3[((c)>>(3*8))&0xFF] ^ \ 99 t2[((c)>>(5*8))&0xFF] ^ t1[((c)>>(7*8))&0xFF] ; \ 100 b *= mul; 101 #else 102 /* This code works faster when compiled on 32-bit machines */ 103 /* (but works slower on Alpha) */ 104 #define round(a,b,c,x,mul) \ 105 c ^= x; \ 106 a -= t1[(sh_byte)(c)] ^ \ 107 t2[(sh_byte)(((sh_word32)(c))>>(2*8))] ^ \ 108 t3[(sh_byte)((c)>>(4*8))] ^ \ 109 t4[(sh_byte)(((sh_word32)((c)>>(4*8)))>>(2*8))] ; \ 110 b += t4[(sh_byte)(((sh_word32)(c))>>(1*8))] ^ \ 111 t3[(sh_byte)(((sh_word32)(c))>>(3*8))] ^ \ 112 t2[(sh_byte)(((sh_word32)((c)>>(4*8)))>>(1*8))] ^ \ 113 t1[(sh_byte)(((sh_word32)((c)>>(4*8)))>>(3*8))]; \ 114 b *= mul; 115 #endif 116 117 #define pass(a,b,c,mul) \ 118 round(a,b,c,x0,mul) \ 119 round(b,c,a,x1,mul) \ 120 round(c,a,b,x2,mul) \ 121 round(a,b,c,x3,mul) \ 122 round(b,c,a,x4,mul) \ 123 round(c,a,b,x5,mul) \ 124 round(a,b,c,x6,mul) \ 125 round(b,c,a,x7,mul) 88 aa = a; \ 89 bb = b; \ 90 cc = c; 91 92 #ifdef TIGER_C 93 94 #define BN(x,n) (((x)>>((n)*8))&0xFF) 95 96 97 /* Depending on outer code one of these two can be better*/ 98 #define roundX(a,b,c,x) \ 99 c ^= x; \ 100 a -= t1[BN(c,0)] ^ t2[BN(c,2)] ^ \ 101 t3[BN(c,4)] ^ t4[BN(c,6)] ; \ 102 b += t4[BN(c,1)] ^ t3[BN(c,3)] ^ \ 103 t2[BN(c,5)] ^ t1[BN(c,7)] ; 104 105 #define round5(a,b,c,x) roundX(a,b,c,x) b = b+b*4; 106 #define round7(a,b,c,x) roundX(a,b,c,x) b = b*8-b; 107 #define round9(a,b,c,x) roundX(a,b,c,x) b = b+b*8; 108 109 #endif 110 111 112 #ifdef TIGER_OPT_ASM 113 114 #define MASK0 0xFFL 115 #define MASK8 0xFF00L 116 #define MASK16 0xFF0000L 117 #define MASK32 0xFF00000000LL 118 #define MASK40 0xFF0000000000LL 119 #define MASK48 0xFF000000000000LL 120 121 #define roundstart __asm__ ( 122 123 /* a will be moved into different reg each round 124 * using register substitution feature of GCC asm 125 * b will be moved in 2-nd pass rounds only 126 */ 127 128 129 #define roundend(a,b,c,x) \ 130 : "+r" (a), "+r" (b), "+r" (c) \ 131 : "0" (a), "1" (b), "2" (c), "m" (x), "r" (&tiger_table),\ 132 "i" (MASK0), "i" (MASK8), "i" (MASK16), "r" (MASK32), "r" (MASK40), "r" (MASK48) \ 133 : "3", "%rax","%rbx","%rcx","%rdx","%rsi", "%edi", "%r8" ); 134 135 136 /* c ^= x; 137 a -= t1[BN(c,0)] ^ t2[BN(c,2)] ^ 138 t3[BN(c,4)] ^ t4[BN(c,6)] ; 139 b += t4[BN(c,1)] ^ t3[BN(c,3)] ^ 140 t2[BN(c,5)] ^ t1[BN(c,7)] ; */ 141 142 #define roundX(a,b,c,x) \ 143 " movl %10, %%ebx \n"\ 144 " movq %11, %%rcx \n"\ 145 " movq %13, %%rdx \n"\ 146 " movq %6, %%r8 \n"\ 147 " xorq %%r8, %2 \n" \ 148 " andq %2, %%rbx \n"\ 149 " andq %2, %%rcx \n"\ 150 " andq %2, %%rdx \n"\ 151 " shrl $(16-3), %%ebx \n"\ 152 " shrq $(32-3), %%rcx \n"\ 153 " shrq $(48-3), %%rdx \n"\ 154 " movzbl %2b, %%eax \n"\ 155 " movzwl %2w, %%edi \n"\ 156 " movq (%7,%%rax,8), %%rsi \n"\ 157 " shrl $(8), %%edi \n" \ 158 " movq %2, %%rax \n" \ 159 " xorq (2048*1)(%7,%%rbx), %%rsi \n"\ 160 " movq %2, %%rbx \n"\ 161 " shrl $24, %%eax \n"\ 162 " andq %12, %%rbx \n"\ 163 " xorq (2048*2)(%7,%%rcx), %%rsi \n"\ 164 " shrq $(40-3), %%rbx \n"\ 165 " movq %2, %%rcx \n"\ 166 " xorq (2048*3)(%7,%%rdx), %%rsi \n"\ 167 " movq (2048*3)(%7,%%rdi,8), %%rdx \n"\ 168 " shrq $56, %%rcx \n"\ 169 " xorq (2048*2)(%7,%%rax,8), %%rdx \n"\ 170 " xorq (2048*1)(%7,%%rbx), %%rdx \n" \ 171 " subq %%rsi, %0 \n"\ 172 " xorq (%7,%%rcx,8), %%rdx \n"\ 173 " addq %%rdx, %1 \n" 174 175 #define round5(a,b,c,x) \ 176 roundstart \ 177 roundX(a,b,c,x) \ 178 /* b*=5; */ \ 179 "leaq (%1,%1,4), %1\n" \ 180 roundend(a,b,c,x) 181 182 183 #define round7(a,b,c,x) \ 184 roundstart \ 185 roundX(a,b,c,x) \ 186 roundend(a,b,c,x) \ 187 /* b*=7; */ \ 188 __asm__ ( \ 189 "leaq (%1,%1,8), %0\n" \ 190 "addq %1, %1 \n" \ 191 "subq %1, %0 " \ 192 :"=&r" (b): "r"(b): "1" ); 193 194 #define round9(a,b,c,x) \ 195 roundstart \ 196 roundX(a,b,c,x) \ 197 "leaq (%1,%1,8), %1\n" \ 198 roundend(a,b,c,x) 199 200 #endif 201 202 203 204 205 /* ============== Common macros ================== */ 126 206 127 207 #define key_schedule \ 128 x0 -= x7 ^ 0xA5A5A5A5A5A5A5A5LL; \ 129 x1 ^= x0; \ 130 x2 += x1; \ 131 x3 -= x2 ^ ((~x1)<<19); \ 132 x4 ^= x3; \ 133 x5 += x4; \ 134 x6 -= x5 ^ ((~x4)>>23); \ 135 x7 ^= x6; \ 136 x0 += x7; \ 137 x1 -= x0 ^ ((~x7)<<19); \ 138 x2 ^= x1; \ 139 x3 += x2; \ 140 x4 -= x3 ^ ((~x2)>>23); \ 141 x5 ^= x4; \ 142 x6 += x5; \ 143 x7 -= x6 ^ 0x0123456789ABCDEFLL; 208 x0 -= x7 ^ XOR_CONST1; \ 209 x1 ^= x0; \ 210 x2 += x1;\ 211 x3 -= x2 ^ ((~x1)<<19);\ 212 x4 ^= x3;\ 213 x5 += x4;\ 214 x6 -= x5 ^ ((~x4)>>23); \ 215 x7 ^= x6; \ 216 x0 += x7; \ 217 x1 -= x0 ^ ((~x7)<<19); \ 218 x2 ^= x1; \ 219 x3 += x2; \ 220 x4 -= x3 ^ ((~x2)>>23); \ 221 x5 ^= x4; \ 222 x6 += x5; \ 223 x7 -= x6 ^ XOR_CONST2; 224 225 #define pass5n(a,b,c) \ 226 round5(a,b,c,x0) \ 227 x0 -= x7 ^ XOR_CONST1; \ 228 round5(b,c,a,x1) \ 229 x1 ^= x0; \ 230 round5(c,a,b,x2) \ 231 x2 += x1; \ 232 round5(a,b,c,x3) \ 233 x3 -= x2 ^ ((~x1)<<19); \ 234 round5(b,c,a,x4) \ 235 x4 ^= x3; \ 236 round5(c,a,b,x5) \ 237 x5 += x4; \ 238 round5(a,b,c,x6) \ 239 x6 -= x5 ^ ((~x4)>>23); \ 240 round5(b,c,a,x7) \ 241 x7 ^= x6; \ 242 x0 += x7; \ 243 x1 -= x0 ^ ((~x7)<<19); \ 244 x2 ^= x1; \ 245 x3 += x2; \ 246 x4 -= x3 ^ ((~x2)>>23); \ 247 x5 ^= x4; \ 248 x6 += x5; \ 249 x7 -= x6 ^ XOR_CONST2; 250 251 #define pass7n(a,b,c) \ 252 round7(a,b,c,x0) \ 253 x0 -= x7 ^ XOR_CONST1; \ 254 round7(b,c,a,x1) \ 255 x1 ^= x0; \ 256 round7(c,a,b,x2) \ 257 x2 += x1; \ 258 round7(a,b,c,x3) \ 259 x3 -= x2 ^ ((~x1)<<19); \ 260 round7(b,c,a,x4) \ 261 x4 ^= x3; \ 262 round7(c,a,b,x5) \ 263 x5 += x4; \ 264 round7(a,b,c,x6) \ 265 x6 -= x5 ^ ((~x4)>>23); \ 266 round7(b,c,a,x7) \ 267 x7 ^= x6; \ 268 x0 += x7; \ 269 x1 -= x0 ^ ((~x7)<<19); \ 270 x2 ^= x1; \ 271 x3 += x2; \ 272 x4 -= x3 ^ ((~x2)>>23); \ 273 x5 ^= x4; \ 274 x6 += x5; \ 275 x7 -= x6 ^ XOR_CONST2; 276 277 #define pass5(a,b,c) \ 278 pass_start \ 279 round5(a,b,c,x0) \ 280 round5(b,c,a,x1) \ 281 round5(c,a,b,x2) \ 282 round5(a,b,c,x3) \ 283 round5(b,c,a,x4) \ 284 round5(c,a,b,x5) \ 285 round5(a,b,c,x6) \ 286 round5(b,c,a,x7) \ 287 pass_end 288 289 #define pass7(a,b,c) \ 290 pass_start \ 291 round7(a,b,c,x0) \ 292 round7(b,c,a,x1) \ 293 round7(c,a,b,x2) \ 294 round7(a,b,c,x3) \ 295 round7(b,c,a,x4) \ 296 round7(c,a,b,x5) \ 297 round7(a,b,c,x6) \ 298 round7(b,c,a,x7) \ 299 pass_end 300 301 302 #define pass9(a,b,c) \ 303 pass_start \ 304 round9(a,b,c,x0) \ 305 round9(b,c,a,x1) \ 306 round9(c,a,b,x2) \ 307 round9(a,b,c,x3) \ 308 round9(b,c,a,x4) \ 309 round9(c,a,b,x5) \ 310 round9(a,b,c,x6) \ 311 round9(b,c,a,x7) \ 312 pass_end 144 313 145 314 #define feedforward \ 146 a ^= aa; \ 147 b -= bb; \ 148 c += cc; 149 150 #ifdef OPTIMIZE_FOR_ALPHA 151 /* The loop is unrolled: works better on Alpha */ 315 a ^= aa; \ 316 b -= bb; \ 317 c += cc; 318 319 320 /* This version works ok with C variant and also with new asm version 321 * that just wastes a register r8 322 * reason? who knows, write forwarding is faster than keeping value 323 * in register? :) 324 */ 152 325 #define compress \ 153 save_abc \ 154 pass(a,b,c,5) \ 155 key_schedule \ 156 pass(c,a,b,7) \ 157 key_schedule \ 158 pass(b,c,a,9) \ 159 for(pass_no=3; pass_no<PASSES; pass_no++) { \ 160 key_schedule \ 161 pass(a,b,c,9) \ 162 tmpa=a; a=c; c=b; b=tmpa;} \ 163 feedforward 164 #else 165 /* loop: works better on PC and Sun (smaller cache?) */ 166 #define compress \ 167 save_abc \ 168 for(pass_no=0; pass_no<PASSES; pass_no++) { \ 169 if(pass_no != 0) {key_schedule} \ 170 pass(a,b,c,(pass_no==0?5:pass_no==1?7:9)); \ 171 tmpa=a; a=c; c=b; b=tmpa;} \ 172 feedforward 173 #endif 326 save_abc \ 327 pass5n(a,b,c) \ 328 pass7n(c,a,b) \ 329 pass9(b,c,a) \ 330 for(pass_no=3; pass_no<PASSES; pass_no++) { \ 331 key_schedule \ 332 pass9(a,b,c) \ 333 tmpa=a; a=c; c=b; b=tmpa; \ 334 } \ 335 feedforward 336 337 #define compress_old \ 338 save_abc \ 339 pass5(a,b,c) \ 340 key_schedule \ 341 pass7(c,a,b) \ 342 key_schedule \ 343 pass9(b,c,a) \ 344 for(pass_no=3; pass_no<PASSES; pass_no++) { \ 345 key_schedule \ 346 pass9(a,b,c) \ 347 tmpa=a; a=c; c=b; b=tmpa; \ 348 } \ 349 feedforward 174 350 175 351 #define tiger_compress_macro(str, state) \ 176 352 { \ 177 register word64 a, b, c, tmpa; \ 353 register word64 a, b, c; \ 354 register word64 tmpa; \ 178 355 word64 aa, bb, cc; \ 179 registerword64 x0, x1, x2, x3, x4, x5, x6, x7; \356 word64 x0, x1, x2, x3, x4, x5, x6, x7; \ 180 357 int pass_no; \ 181 358 \ … … 194 371 } 195 372 196 /* The compress function is a function. Requires smaller cache? */197 373 void tiger_compress(word64 *str, word64 state[3]) 198 374 { 199 #ifndef S_SPLINT_S200 375 tiger_compress_macro(((word64*)str), ((word64*)state)); 201 #endif202 376 } 203 204 #ifdef OPTIMIZE_FOR_ALPHA205 /* The compress function is inlined: works better on Alpha. */206 /* Still leaves the function above in the code, in case some other */207 /* module calls it directly. */208 #define tiger_compress(str, state) \209 tiger_compress_macro(((word64*)str), ((word64*)state))210 #endif211 377 212 378 void tiger_t(word64 *str, word64 length, word64 res[3]) … … 220 386 221 387 /* 222 res[0]=0x0123456789ABCDEFLL;223 res[1]=0xFEDCBA9876543210LL;224 res[2]=0xF096A5B4C3B2E187LL;225 */388 * res[0]=0x0123456789ABCDEFLL; 389 * res[1]=0xFEDCBA9876543210LL; 390 * res[2]=0xF096A5B4C3B2E187LL; 391 */ 226 392 227 393 for(i=length; i>=64; i-=64) … … 229 395 #ifdef BIG_ENDIAN 230 396 for(j=0; j<64; j++) 231 397 temp[j^7] = ((sh_byte*)str)[j]; 232 398 tiger_compress(((word64*)temp), res); 233 399 #else … … 236 402 str += 8; 237 403 } 238 239 404 } 240 405 … … 246 411 247 412 /* 248 res[0]=0x0123456789ABCDEFLL;249 res[1]=0xFEDCBA9876543210LL;250 res[2]=0xF096A5B4C3B2E187LL;251 */413 * res[0]=0x0123456789ABCDEFLL; 414 * res[1]=0xFEDCBA9876543210LL; 415 * res[2]=0xF096A5B4C3B2E187LL; 416 */ 252 417 253 418 for(i=length; i>=64; i-=64) … … 255 420 #ifdef BIG_ENDIAN 256 421 for(j=0; j<64; j++) 257 422 temp[j^7] = ((sh_byte*)str)[j]; 258 423 tiger_compress(((word64*)temp), res); 259 424 #else … … 272 437 temp[j^7] = 0; 273 438 #else 439 440 #ifndef USE_MEMSET 274 441 for(j=0; j<i; j++) 275 442 temp[j] = ((sh_byte*)str)[j]; 276 443 #else 444 memcpy( temp, str, j=i ); 445 #endif 277 446 temp[j++] = 0x01; 278 447 for(; j&7; j++) 279 temp[j] = 0; 280 #endif 448 temp[j] = 0; 449 450 #endif 451 281 452 if(j>56) 282 453 { 454 #ifndef USE_MEMSET 283 455 for(; j<64; j++) 284 456 temp[j] = 0; 457 #else 458 memset( temp+j, 0, 64-j); 459 #endif 285 460 tiger_compress(((word64*)temp), res); 286 461 j=0; 287 462 } 288 463 464 #ifndef USE_MEMSET 289 465 for(; j<56; j++) 290 466 temp[j] = 0; 467 #else 468 memset( temp+j, 0, 56-j); 469 #endif 470 291 471 ((word64*)(&(temp[56])))[0] = ((word64)length)<<3; 292 472 tiger_compress(((word64*)temp), res); 293 473 } 294 474 295 #else 296 297 void dummy_1_64 (int a) 298 { 299 (void) a; 300 return; 301 } 302 303 #endif 304 305 306 307 308 309 310 311 312 475 #endif -
trunk/src/sh_tiger2.c
r1 r18 23 23 24 24 25 #if !defined(HAVE_LONG_64) && !defined(HAVE_LONG_LONG_64) 26 25 #if !defined(TIGER_64_BIT) 26 27 /* #if !defined(HAVE_LONG_64) && !defined(HAVE_LONG_LONG_64) */ 27 28 28 29 /* sboxes32.c: Tiger S boxes for 32-bit-only compilers */ 29 typedef unsigned long word32; 30 word32 tiger_table[4*256][2] = { 30 #if defined(HAVE_INT_32) 31 typedef unsigned int sh_word32; 32 #elif defined(HAVE_LONG_32) 33 typedef unsigned long sh_word32; 34 #elif defined(HAVE_SHORT_32) 35 typedef unsigned short sh_word32; 36 #else 37 #error No 32 bit type found ! 38 #endif 39 40 sh_word32 tiger_table[4*256][2] = { 31 41 { 0xF7E90C5E, 0x02AAB17C /* 0 */}, { 0xE243A8EC, 0xAC424B03 /* 1 */}, 32 42 { 0x0DD5FCD3, 0x72CD5BE3 /* 2 */}, { 0xF6F97F3A, 0x6D019B93 /* 3 */}, -
trunk/src/sh_tiger2_64.c
r1 r18 22 22 #include "config_xor.h" 23 23 24 25 #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) 24 #if defined(TIGER_64_BIT) 25 26 /* #if defined(HAVE_LONG_64) || defined(HAVE_LONG_LONG_64) */ 26 27 27 28 /*@-type@*/ … … 30 31 #if defined(HAVE_LONG_64) 31 32 typedef unsigned long int word64; 33 #elif defined(HAVE_LONG_LONG_64) 34 typedef unsigned long long int word64; 32 35 #else 33 typedef unsigned long long int word64; 36 #error No 64 bit type found ! 34 37 #endif 35 38 -
trunk/src/sh_tools.c
r12 r18 125 125 char * sh_tools_safe_name (const char * instr, int flag) 126 126 { 127 unsigned char c ;127 unsigned char c, d; 128 128 const char * p; 129 129 char *q; … … 133 133 int i = 0; 134 134 unsigned char val_octal = '\0'; 135 static char ctable[16] = { '0', '1', '2', '3', '4', '5', '6', '7', 136 '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; 135 137 136 138 SL_ENTER(_("sh_tools_safe_name")); … … 202 204 { 203 205 --i; 204 sprintf(&outstr[i], "=%02x", c); /* known to fit */ 206 d = c % 16; c = c / 16; 207 outstr[i] = '='; ++i; 208 outstr[i] = ctable[c]; ++i; 209 outstr[i] = ctable[d]; ++i; 205 210 } 206 211 … … 274 279 break; 275 280 default: 276 if (strlen(p) < 3) 281 if (strlen(p) < 3) /* certainly not an octal number, skip */ 277 282 { 278 283 p += strlen(p); … … 284 289 if (val_octal != '\0') { 285 290 c = val_octal; 286 sprintf(&outstr[i], "=%02x", c); /* known to fit */ 287 i+=3; 291 d = c % 16; c = c / 16; 292 outstr[i] = '='; ++i; 293 outstr[i] = ctable[c]; ++i; 294 outstr[i] = ctable[d]; ++i; 288 295 } 289 296 p += 3; … … 294 301 { 295 302 ++p; 296 if (!p || !(*p)) 297 break; 303 if (!p || !(*p)) 304 { 305 outstr[i] = '&'; ++i; 306 break; 307 } 298 308 299 309 if (p[0] == 'a' && p[1] == 'm' && p[2] == 'p' && p[3] == ';') -
trunk/src/sh_unix.c
r10 r18 1283 1283 */ 1284 1284 if (0 == sl_strncmp((*env), _("MYSQL_UNIX_PORT="), 16)) 1285 { 1286 ++(env); 1287 continue; 1288 } 1289 if (0 == sl_strncmp((*env), _("MYSQL_TCP_PORT="), 15)) 1290 { 1291 ++(env); 1292 continue; 1293 } 1294 if (0 == sl_strncmp((*env), _("MYSQL_HOME="), 11)) 1285 1295 { 1286 1296 ++(env);
Note:
See TracChangeset
for help on using the changeset viewer.