diff options
author | agc <agc> | 1999-04-09 10:46:55 +0000 |
---|---|---|
committer | agc <agc> | 1999-04-09 10:46:55 +0000 |
commit | bd5b0f3163bd5888ec3f745d40643eeeeccc39c4 (patch) | |
tree | 3f6943acbbea32db305036a3641fcf486ca8a956 /security/tripwire/patches/patch-ac | |
parent | fa6487931be6b92a7ef8414c5fcf0f68e6df62ad (diff) | |
download | pkgsrc-bd5b0f3163bd5888ec3f745d40643eeeeccc39c4.tar.gz |
Make this package work on Solaris.
Diffstat (limited to 'security/tripwire/patches/patch-ac')
-rw-r--r-- | security/tripwire/patches/patch-ac | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/security/tripwire/patches/patch-ac b/security/tripwire/patches/patch-ac index a44ea8eb979..681fb05b43b 100644 --- a/security/tripwire/patches/patch-ac +++ b/security/tripwire/patches/patch-ac @@ -1,4 +1,4 @@ -$NetBSD: patch-ac,v 1.1.1.1 1998/11/17 16:27:25 agc Exp $ +$NetBSD: patch-ac,v 1.2 1999/04/09 10:46:57 agc Exp $ NetBSD defines both LITTLE_ENDIAN and BIG_ENDIAN, and sets the definition of BYTE_ORDER accordingly. So check the value of @@ -6,19 +6,28 @@ BYTE_ORDER in this file. --- sigs/sha/sha.c 1994/07/25 15:46:45 1.5 +++ sigs/sha/sha.c 1998/11/17 15:59:20 -@@ -46,10 +46,7 @@ +@@ -46,10 +46,17 @@ #include "sha.h" -#if BYTEORDER == 0x1234 -#define LITTLE_ENDIAN --#endif -- ++#ifdef __NetBSD__ +#include <machine/endian.h> ++#elif (defined(__sun__) && defined(__svr4__)) ++#define BIG_ENDIAN 4321 ++#define LITTLE_ENDIAN 1234 ++#if defined(__sparc__) ++#define BYTE_ORDER BIG_ENDIAN ++#elif defined(__i386__) ++#define BYTE_ORDER LITTLE_ENDIAN ++#endif + #endif +- /* The SHS f()-functions */ -@@ -214,7 +211,7 @@ +@@ -214,7 +221,7 @@ shsInfo->digest[ 4 ] += E; } @@ -27,7 +36,7 @@ BYTE_ORDER in this file. /* When run on a little-endian CPU we need to perform byte reversal on an array of longwords. It is possible to make the code endianness- -@@ -258,7 +255,7 @@ +@@ -258,7 +265,7 @@ while( count >= SHS_BLOCKSIZE ) { memcpy( (char *) shsInfo->data, (char *) buffer, SHS_BLOCKSIZE ); @@ -36,7 +45,7 @@ BYTE_ORDER in this file. byteReverse( shsInfo->data, SHS_BLOCKSIZE ); #endif /* LITTLE_ENDIAN */ shsTransform( shsInfo ); -@@ -289,7 +286,7 @@ +@@ -289,7 +296,7 @@ { /* Two lots of padding: Pad the first block to 64 bytes */ memset( ( char * ) shsInfo->data + count, 0, 64 - count ); @@ -45,7 +54,7 @@ BYTE_ORDER in this file. byteReverse( shsInfo->data, SHS_BLOCKSIZE ); #endif /* LITTLE_ENDIAN */ shsTransform( shsInfo ); -@@ -300,7 +297,7 @@ +@@ -300,7 +307,7 @@ else /* Pad block to 56 bytes */ memset( ( char * ) shsInfo->data + count, 0, 56 - count ); @@ -54,7 +63,7 @@ BYTE_ORDER in this file. byteReverse( shsInfo->data, SHS_BLOCKSIZE ); #endif /* LITTLE_ENDIAN */ -@@ -309,7 +306,7 @@ +@@ -309,7 +316,7 @@ shsInfo->data[ 15 ] = lowBitcount; shsTransform( shsInfo ); |