Sophie

Sophie

distrib > Fedora > 16 > i386 > media > os-src > by-pkgid > e560d94e80fd9f4b04f57925dcdf2eff > files > 3

tcl-trf-2.1.4-2.fc15.src.rpm

diff -up trf2.1.3/generic/haval/havalapp.h.haval trf2.1.3/generic/haval/havalapp.h
--- trf2.1.3/generic/haval/havalapp.h.haval	2003-01-20 00:44:48.000000000 -0500
+++ trf2.1.3/generic/haval/havalapp.h	2009-03-06 12:58:51.000000000 -0500
@@ -60,11 +60,15 @@
  *   FPTLEN   define the length of a fingerprint (128, 160, 192, 224 or 256)
  */
 
-#include "config.h"
+/*#undef LITTLE_ENDIAN -- aku */
 
-#ifdef THIS_IS_JUST_A_DUMMY_DIRECTIVE
-
-#undef LITTLE_ENDIAN
+/* aku -- use configure of Tcl-TRF */
+#ifdef  WORDS_BIGENDIAN
+#undef  LITTLE_ENDIAN
+#else
+#undef  LITTLE_ENDIAN
+#define LITTLE_ENDIAN
+#endif
 
 #ifndef PASS
 #define PASS       3        /* 3, 4, or 5 */
@@ -75,6 +79,4 @@
 #define FPTLEN     256      /* 128, 160, 192, 224 or 256 */
 #endif
 
-#endif /* THIS_IS_JUST_A_DUMMY_DIRECTIVE */
-
 
diff -up trf2.1.3/generic/haval/haval.c.haval trf2.1.3/generic/haval/haval.c
--- trf2.1.3/generic/haval/haval.c.haval	2003-01-20 00:44:48.000000000 -0500
+++ trf2.1.3/generic/haval/haval.c	2009-03-06 12:58:51.000000000 -0500
@@ -76,9 +76,8 @@ static char rcsid[] = "$Id: haval.c,v 1.
 
 #include <stdio.h>
 #include <string.h>
-/* #include "havalapp.h" */
-#include "config.h"
-#include "haval.h"
+#include "havalapp.h"
+/* #include "haval.h" */
 
 #define HAVAL_VERSION    1                   /* current version number */
 
@@ -103,26 +102,30 @@ static unsigned char padding[128] = {   
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
+/* aku, Jul 8, 1997, added () to eliminate gcc warnings:
+ * "suggest parentheses around arithmetic in operand of ^"
+ * semantics not changed!
+ */
 #define f_1(x6, x5, x4, x3, x2, x1, x0)          \
-           ((x1) & ((x0) ^ (x4)) ^ (x2) & (x5) ^ \
-            (x3) & (x6) ^ (x0))
+           (((x1) & ((x0) ^ (x4))) ^ ((x2) & (x5)) ^ \
+            ((x3) & (x6)) ^ (x0))
 
 #define f_2(x6, x5, x4, x3, x2, x1, x0)                         \
-           ((x2) & ((x1) & ~(x3) ^ (x4) & (x5) ^ (x6) ^ (x0)) ^ \
-            (x4) & ((x1) ^ (x5)) ^ (x3) & (x5) ^ (x0)) 
+           (((x2) & (((x1) & ~(x3)) ^ ((x4) & (x5)) ^ (x6) ^ (x0))) ^ \
+            ((x4) & ((x1) ^ (x5))) ^ ((x3) & (x5)) ^ (x0)) 
 
 #define f_3(x6, x5, x4, x3, x2, x1, x0)          \
-           ((x3) & ((x1) & (x2) ^ (x6) ^ (x0)) ^ \
-            (x1) & (x4) ^ (x2) & (x5) ^ (x0))
+           (((x3) & (((x1) & (x2)) ^ (x6) ^ (x0))) ^ \
+            ((x1) & (x4)) ^ ((x2) & (x5)) ^ (x0))
 
 #define f_4(x6, x5, x4, x3, x2, x1, x0)                                 \
-           ((x4) & ((x5) & ~(x2) ^ (x3) & ~(x6) ^ (x1) ^ (x6) ^ (x0)) ^ \
-            (x3) & ((x1) & (x2) ^ (x5) ^ (x6)) ^                        \
-            (x2) & (x6) ^ (x0))
+           (((x4) & (((x5) & ~(x2)) ^ ((x3) & ~(x6)) ^ (x1) ^ (x6) ^ (x0))) ^ \
+            ((x3) & (((x1) & (x2)) ^ (x5) ^ (x6))) ^                        \
+            ((x2) & (x6)) ^ (x0))
 
 #define f_5(x6, x5, x4, x3, x2, x1, x0)             \
-           ((x0) & ((x1) & (x2) & (x3) ^ ~(x5)) ^   \
-            (x1) & (x4) ^ (x2) & (x5) ^ (x3) & (x6))
+           (((x0) & (((x1) & (x2) & (x3)) ^ ~(x5))) ^   \
+            ((x1) & (x4)) ^ ((x2) & (x5)) ^ ((x3) & (x6)))
 
 /*
  * Permutations phi_{i,j}, i=3,4,5, j=1,...,i.
diff -up trf2.1.3/generic/haval/havaltest.c.haval trf2.1.3/generic/haval/havaltest.c
--- trf2.1.3/generic/haval/havaltest.c.haval	2003-01-20 00:44:48.000000000 -0500
+++ trf2.1.3/generic/haval/havaltest.c	2009-03-06 12:58:51.000000000 -0500
@@ -65,9 +65,8 @@ static char rcsid[] = "$Id: havaltest.c,
 #include <time.h>
 #include <string.h>
 #include <unistd.h>
-/* #include "havalapp.h" */
+#include "havalapp.h"
 #include "haval.h"
-#include "config.h"
 
 /* #define NUMBER_OF_BLOCKS 5000 */               /* number of test blocks */
 /* #define BLOCK_SIZE       5000 */               /* number of bytes in a block */