Index: pgsql/contrib/pgcrypto/md5.c =================================================================== *** pgsql.orig/contrib/pgcrypto/md5.c --- pgsql/contrib/pgcrypto/md5.c *************** *** 30,40 **** * SUCH DAMAGE. */ ! #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))) --- 30,47 ---- * SUCH DAMAGE. */ ! #include ! #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: pgsql/contrib/pgcrypto/rijndael.c =================================================================== *** pgsql.orig/contrib/pgcrypto/rijndael.c --- pgsql/contrib/pgcrypto/rijndael.c *************** Mean: 500 cycles = 51.2 mbits/sec *** 39,48 **** --- 39,56 ---- */ #include + #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: pgsql/contrib/pgcrypto/sha1.c =================================================================== *** pgsql.orig/contrib/pgcrypto/sha1.c --- pgsql/contrib/pgcrypto/sha1.c *************** *** 35,53 **** * implemented by Jun-ichiro itojun Itoh */ ! #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}; --- 35,50 ---- * implemented by Jun-ichiro itojun Itoh */ ! #include ! #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}; *************** sha1_result(struct sha1_ctxt * ctxt, uin *** 347,350 **** #endif } - #endif /* unsupported */ --- 344,346 ---- Index: pgsql/contrib/pgcrypto/sha2.c =================================================================== *** pgsql.orig/contrib/pgcrypto/sha2.c --- pgsql/contrib/pgcrypto/sha2.c *************** *** 36,41 **** --- 36,42 ---- */ #include + #include #include "sha2.h"