summaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/rijndael.c
diff options
context:
space:
mode:
authorTom Lane2007-04-06 05:36:51 +0000
committerTom Lane2007-04-06 05:36:51 +0000
commit37a609b27fcb67c28ff34d02ae3e82cd9903dd13 (patch)
tree037c29effb24f829edcf52ad172a4c0af0fcc14a /contrib/pgcrypto/rijndael.c
parent3e23b68dac006e8deb0afa327e855258df8de064 (diff)
Now that core functionality is depending on autoconf's AC_C_BIGENDIAN to be
right, there seems precious little reason to have a pile of hand-maintained endianness definitions in src/include/port/*.h. Get rid of those, and make the couple of places that used them depend on WORDS_BIGENDIAN instead.
Diffstat (limited to 'contrib/pgcrypto/rijndael.c')
-rw-r--r--contrib/pgcrypto/rijndael.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/contrib/pgcrypto/rijndael.c b/contrib/pgcrypto/rijndael.c
index c75f1d1d719..97f97bd543c 100644
--- a/contrib/pgcrypto/rijndael.c
+++ b/contrib/pgcrypto/rijndael.c
@@ -1,6 +1,6 @@
/* $OpenBSD: rijndael.c,v 1.6 2000/12/09 18:51:34 markus Exp $ */
-/* $PostgreSQL: pgsql/contrib/pgcrypto/rijndael.c,v 1.12 2005/10/15 02:49:06 momjian Exp $ */
+/* $PostgreSQL: pgsql/contrib/pgcrypto/rijndael.c,v 1.13 2007/04/06 05:36:50 tgl Exp $ */
/* This is an independent implementation of the encryption algorithm: */
/* */
@@ -47,12 +47,6 @@ Mean: 500 cycles = 51.2 mbits/sec
#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
@@ -73,11 +67,7 @@ static void gen_tabs(void);
#define byte(x,n) ((u1byte)((x) >> (8 * (n))))
-#if BYTE_ORDER != LITTLE_ENDIAN
-#define BYTE_SWAP
-#endif
-
-#ifdef BYTE_SWAP
+#ifdef WORDS_BIGENDIAN
#define io_swap(x) bswap(x)
#else
#define io_swap(x) (x)