Index: contrib/pgcrypto/md5.c =================================================================== RCS file: /opt/arc/cvs2/pgsql/contrib/pgcrypto/md5.c,v retrieving revision 1.9 diff -u -c -r1.9 md5.c *** contrib/pgcrypto/md5.c 29 Nov 2001 19:40:37 -0000 1.9 --- contrib/pgcrypto/md5.c 13 Jul 2005 14:14:07 -0000 *************** *** 31,40 **** */ #include "postgres.h" - #include "px.h" #include "md5.h" #define SHIFT(X, s) (((X) << (s)) | ((X) >> (32 - (s)))) #define F(X, Y, Z) (((X) & (Y)) | ((~X) & (Z))) --- 31,47 ---- */ #include "postgres.h" + #include + + #include "px.h" #include "md5.h" + /* sanity check */ + #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 + #define SHIFT(X, s) (((X) << (s)) | ((X) >> (32 - (s)))) #define F(X, Y, Z) (((X) & (Y)) | ((~X) & (Z))) Index: contrib/pgcrypto/rijndael.c =================================================================== RCS file: /opt/arc/cvs2/pgsql/contrib/pgcrypto/rijndael.c,v retrieving revision 1.9 diff -u -c -r1.9 rijndael.c *** contrib/pgcrypto/rijndael.c 5 Sep 2002 21:08:26 -0000 1.9 --- contrib/pgcrypto/rijndael.c 13 Jul 2005 14:15:43 -0000 *************** *** 38,48 **** */ ! #include #include "px.h" #include "rijndael.h" #define PRE_CALC_TABLES #define LARGE_TABLES --- 38,56 ---- */ ! #include "postgres.h" ! ! #include ! #include "px.h" #include "rijndael.h" + /* sanity check */ + #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 + #define PRE_CALC_TABLES #define LARGE_TABLES Index: contrib/pgcrypto/sha1.c =================================================================== RCS file: /opt/arc/cvs2/pgsql/contrib/pgcrypto/sha1.c,v retrieving revision 1.11 diff -u -c -r1.11 sha1.c *** contrib/pgcrypto/sha1.c 29 Nov 2001 19:40:37 -0000 1.11 --- contrib/pgcrypto/sha1.c 13 Jul 2005 14:15:05 -0000 *************** *** 36,53 **** */ #include "postgres.h" #include "px.h" #include "sha1.h" /* sanity check */ ! #if BYTE_ORDER != BIG_ENDIAN ! #if BYTE_ORDER != LITTLE_ENDIAN ! #define unsupported 1 #endif - #endif - - #ifndef unsupported /* constant table */ static uint32 _K[] = {0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6}; --- 36,52 ---- */ #include "postgres.h" + + #include + #include "px.h" #include "sha1.h" /* sanity check */ ! #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 /* constant table */ static uint32 _K[] = {0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6}; *************** *** 347,350 **** #endif } - #endif /* unsupported */ --- 346,348 ----