diff options
Diffstat (limited to 'contrib/pgcrypto/sha1.c')
| -rw-r--r-- | contrib/pgcrypto/sha1.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/contrib/pgcrypto/sha1.c b/contrib/pgcrypto/sha1.c index b1c189ab4d..0944dfdabe 100644 --- a/contrib/pgcrypto/sha1.c +++ b/contrib/pgcrypto/sha1.c @@ -1,4 +1,3 @@ -/* $PostgreSQL: pgsql/contrib/pgcrypto/sha1.c,v 1.15 2005/05/25 21:40:39 momjian Exp $ */ /* $KAME: sha1.c,v 1.3 2000/02/22 14:01:18 itojun Exp $ */ /* @@ -28,6 +27,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $PostgreSQL: pgsql/contrib/pgcrypto/sha1.c,v 1.16 2005/07/11 15:07:59 tgl Exp $ */ /* * FIPS pub 180-1: Secure Hash Algorithm (SHA-1) @@ -36,18 +37,16 @@ */ #include "postgres.h" -#include "px.h" +#include <sys/param.h> + +#include "px.h" #include "sha1.h" /* sanity check */ -#if BYTE_ORDER != BIG_ENDIAN -#if BYTE_ORDER != LITTLE_ENDIAN -#define unsupported 1 +#if !defined(BYTE_ORDER) || (BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN) +#error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN #endif -#endif - -#ifndef unsupported /* constant table */ static uint32 _K[] = {0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6}; @@ -346,5 +345,3 @@ sha1_result(struct sha1_ctxt * ctxt, uint8 *digest0) digest[19] = ctxt->h.b8[16]; #endif } - -#endif /* unsupported */ |
