summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2002-08-19 18:26:20 +0000
committerseb <seb@pkgsrc.org>2002-08-19 18:26:20 +0000
commit0ec3f10c4ca4c301c6bba5b74bcd8a60ff713509 (patch)
tree6bcc000340d83266f6beaeedd6c0d9295e769beb /net
parent8a409d6c6b4a9ba6ce90679b55759155be99f891 (diff)
downloadpkgsrc-0ec3f10c4ca4c301c6bba5b74bcd8a60ff713509.tar.gz
Fix sparc64 build by patching lib/cylink/sha.c like the revision 1.6 of
basesrc/lib/libc/hash/sha1.c.
Diffstat (limited to 'net')
-rw-r--r--net/bind8/distinfo3
-rw-r--r--net/bind8/patches/patch-ag174
2 files changed, 176 insertions, 1 deletions
diff --git a/net/bind8/distinfo b/net/bind8/distinfo
index e4faac200df..8588e8378a1 100644
--- a/net/bind8/distinfo
+++ b/net/bind8/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2002/06/28 06:03:04 itojun Exp $
+$NetBSD: distinfo,v 1.10 2002/08/19 18:26:22 seb Exp $
SHA1 (bind/8.3.3/bind-src.tar.gz) = d78e1e0818c16e6a81b2fbd545b564e73c1229fe
Size (bind/8.3.3/bind-src.tar.gz) = 1411990 bytes
@@ -10,3 +10,4 @@ SHA1 (patch-ac) = fdf75b6b53fe4b9ab6ca74b90400edda54a825b1
SHA1 (patch-ad) = 6ac74cfd60df2a9eb9b3dc7c74dab1dc68feadad
SHA1 (patch-ae) = 06268d28805c287721954de0676abf9327f64e13
SHA1 (patch-af) = 9dacac60b3ad0101330144d29a3f0ee4108fe781
+SHA1 (patch-ag) = 9bf580c08118b44b4f82810ea65cb82b55bb506c
diff --git a/net/bind8/patches/patch-ag b/net/bind8/patches/patch-ag
new file mode 100644
index 00000000000..25b6dbbd533
--- /dev/null
+++ b/net/bind8/patches/patch-ag
@@ -0,0 +1,174 @@
+$NetBSD: patch-ag,v 1.1 2002/08/19 18:26:20 seb Exp $
+
+--- lib/cylink/sha.c.orig Tue May 29 05:47:21 2001
++++ lib/cylink/sha.c
+@@ -150,6 +150,129 @@ int SHA( uchar *message,
+ * PRIVATE FUNCTIONS DEFINITIONS
+ ****************************************************************************/
+
++#ifdef __sparc_v9__
++#define nR1(v,w,x,y,z,i) subRound(*v, *w, *x, *y, *z, f1, k1SHA, i)
++#define nR2(v,w,x,y,z,i) subRound(*v, *w, *x, *y, *z, f2, k2SHA, i)
++#define nR3(v,w,x,y,z,i) subRound(*v, *w, *x, *y, *z, f3, k3SHA, i)
++#define nR4(v,w,x,y,z,i) subRound(*v, *w, *x, *y, *z, f4, k4SHA, i)
++
++void doexpand1(u_int32_t *W)
++{
++ expand(16); expand(17); expand(18); expand(19); expand(20); expand(21);
++ expand(22); expand(23); expand(24); expand(25); expand(26); expand(27);
++ expand(28); expand(29); expand(30); expand(31); expand(32); expand(33);
++ expand(34); expand(35); expand(36); expand(37); expand(38); expand(39);
++ expand(40); expand(41); expand(42); expand(43); expand(44); expand(45);
++ expand(46); expand(47); expand(48);
++}
++
++void doexpand2(u_int32_t *W)
++{
++ expand(49); expand(50); expand(51); expand(52); expand(53); expand(54);
++ expand(55); expand(56); expand(57); expand(58); expand(59); expand(60);
++ expand(61); expand(62); expand(63); expand(64); expand(65); expand(66);
++ expand(67); expand(68); expand(69); expand(70); expand(71); expand(72);
++ expand(73); expand(74); expand(75); expand(76); expand(77); expand(78);
++ expand(79);
++}
++
++void do_R1(u_int32_t *A, u_int32_t *B, u_int32_t *C, u_int32_t *D, u_int32_t *E, u_int32_t *W)
++{
++ nR1( A, B, C, D, E, W[ 0] );
++ nR1( E, A, B, C, D, W[ 1] );
++ nR1( D, E, A, B, C, W[ 2] );
++ nR1( C, D, E, A, B, W[ 3] );
++ nR1( B, C, D, E, A, W[ 4] );
++ nR1( A, B, C, D, E, W[ 5] );
++ nR1( E, A, B, C, D, W[ 6] );
++ nR1( D, E, A, B, C, W[ 7] );
++ nR1( C, D, E, A, B, W[ 8] );
++ nR1( B, C, D, E, A, W[ 9] );
++ nR1( A, B, C, D, E, W[10] );
++ nR1( E, A, B, C, D, W[11] );
++ nR1( D, E, A, B, C, W[12] );
++ nR1( C, D, E, A, B, W[13] );
++ nR1( B, C, D, E, A, W[14] );
++ nR1( A, B, C, D, E, W[15] );
++ nR1( E, A, B, C, D, W[16] );
++ nR1( D, E, A, B, C, W[17] );
++ nR1( C, D, E, A, B, W[18] );
++ nR1( B, C, D, E, A, W[19] );
++}
++
++void do_R2(u_int32_t *A, u_int32_t *B, u_int32_t *C, u_int32_t *D, u_int32_t *E, u_int32_t *W)
++{
++ nR2( A, B, C, D, E, W[20]);
++ nR2( E, A, B, C, D, W[21]);
++ nR2( D, E, A, B, C, W[22]);
++ nR2( C, D, E, A, B, W[23]);
++ nR2( B, C, D, E, A, W[24]);
++ nR2( A, B, C, D, E, W[25]);
++ nR2( E, A, B, C, D, W[26]);
++ nR2( D, E, A, B, C, W[27]);
++ nR2( C, D, E, A, B, W[28]);
++ nR2( B, C, D, E, A, W[29]);
++ nR2( A, B, C, D, E, W[30]);
++ nR2( E, A, B, C, D, W[31]);
++ nR2( D, E, A, B, C, W[32]);
++ nR2( C, D, E, A, B, W[33]);
++ nR2( B, C, D, E, A, W[34]);
++ nR2( A, B, C, D, E, W[35]);
++ nR2( E, A, B, C, D, W[36]);
++ nR2( D, E, A, B, C, W[37]);
++ nR2( C, D, E, A, B, W[38]);
++ nR2( B, C, D, E, A, W[39]);
++}
++
++void do_R3(u_int32_t *A, u_int32_t *B, u_int32_t *C, u_int32_t *D, u_int32_t *E, u_int32_t *W)
++{
++ nR3( A, B, C, D, E, W[40]);
++ nR3( E, A, B, C, D, W[41]);
++ nR3( D, E, A, B, C, W[42]);
++ nR3( C, D, E, A, B, W[43]);
++ nR3( B, C, D, E, A, W[44]);
++ nR3( A, B, C, D, E, W[45]);
++ nR3( E, A, B, C, D, W[46]);
++ nR3( D, E, A, B, C, W[47]);
++ nR3( C, D, E, A, B, W[48]);
++ nR3( B, C, D, E, A, W[49]);
++ nR3( A, B, C, D, E, W[50]);
++ nR3( E, A, B, C, D, W[51]);
++ nR3( D, E, A, B, C, W[52]);
++ nR3( C, D, E, A, B, W[53]);
++ nR3( B, C, D, E, A, W[54]);
++ nR3( A, B, C, D, E, W[55]);
++ nR3( E, A, B, C, D, W[56]);
++ nR3( D, E, A, B, C, W[57]);
++ nR3( C, D, E, A, B, W[58]);
++ nR3( B, C, D, E, A, W[59]);
++}
++
++void do_R4(u_int32_t *A, u_int32_t *B, u_int32_t *C, u_int32_t *D, u_int32_t *E, u_int32_t *W)
++{
++ nR4( A, B, C, D, E, W[60]);
++ nR4( E, A, B, C, D, W[61]);
++ nR4( D, E, A, B, C, W[62]);
++ nR4( C, D, E, A, B, W[63]);
++ nR4( B, C, D, E, A, W[64]);
++ nR4( A, B, C, D, E, W[65]);
++ nR4( E, A, B, C, D, W[66]);
++ nR4( D, E, A, B, C, W[67]);
++ nR4( C, D, E, A, B, W[68]);
++ nR4( B, C, D, E, A, W[69]);
++ nR4( A, B, C, D, E, W[70]);
++ nR4( E, A, B, C, D, W[71]);
++ nR4( D, E, A, B, C, W[72]);
++ nR4( C, D, E, A, B, W[73]);
++ nR4( B, C, D, E, A, W[74]);
++ nR4( A, B, C, D, E, W[75]);
++ nR4( E, A, B, C, D, W[76]);
++ nR4( D, E, A, B, C, W[77]);
++ nR4( C, D, E, A, B, W[78]);
++ nR4( B, C, D, E, A, W[79]);
++}
++#endif
++
+
+ /****************************************************************************
+ * NAME: void shaTransform( u_int32_t *state,
+@@ -182,6 +305,10 @@ int SHA( uchar *message,
+ ByteSwap32( (uchar *)W, 64); /*TKL00201*/
+ #endif /*TKL00201*/
+ /* Expand the 16 words into 80 words */
++#ifdef __sparc_v9__
++ doexpand1(W);
++ doexpand2(W);
++#else
+ expand(16);expand(17);expand(18);expand(19);expand(20);expand(21);
+ expand(22);expand(23);expand(24);expand(25);expand(26);expand(27);
+ expand(28);expand(29);expand(30);expand(31);expand(32);expand(33);
+@@ -193,6 +320,7 @@ int SHA( uchar *message,
+ expand(64);expand(65);expand(66);expand(67);expand(68);expand(69);
+ expand(70);expand(71);expand(72);expand(73);expand(74);expand(75);
+ expand(76);expand(77);expand(78);expand(79);
++#endif
+ /*Set up first buffer*/
+ A = state[0];
+ B = state[1];
+@@ -201,6 +329,12 @@ int SHA( uchar *message,
+ E = state[4];
+
+ /* Heavy mangling, in 4 sub-rounds of 20 iterations each. */
++#ifdef __sparc_v9__
++ do_R1(&A, &B, &C, &D, &E, W);
++ do_R2(&A, &B, &C, &D, &E, W);
++ do_R3(&A, &B, &C, &D, &E, W);
++ do_R4(&A, &B, &C, &D, &E, W);
++#else
+ subRound( A, B, C, D, E, f1, k1SHA, W[ 0] );
+ subRound( E, A, B, C, D, f1, k1SHA, W[ 1] );
+ subRound( D, E, A, B, C, f1, k1SHA, W[ 2] );
+@@ -284,6 +418,7 @@ int SHA( uchar *message,
+ subRound( D, E, A, B, C, f4, k4SHA, W[77]);
+ subRound( C, D, E, A, B, f4, k4SHA, W[78]);
+ subRound( B, C, D, E, A, f4, k4SHA, W[79]);
++#endif
+
+ state[0] += A;
+ state[1] += B;