* When postgres.h does not define BYTE_ENDIAN pgcrypto
authorBruce Momjian <[email protected]>
Thu, 29 Nov 2001 19:40:37 +0000 (19:40 +0000)
committerBruce Momjian <[email protected]>
Thu, 29 Nov 2001 19:40:37 +0000 (19:40 +0000)
commit8aa538cfd5a2bcdfc54aced86c7c17b502742fc6
tree8846d6eaad62039e8f9c933305e8ce4ed5b493d1
parent0556f7ca87035e8974495dc6ec530794ace7782c
* When postgres.h does not define BYTE_ENDIAN pgcrypto
  produces garbage.

I learned the hard way that

        #if UNDEFINED_1 == UNDEFINED_2
        #error "gcc is idiot"
        #endif

prints "gcc is idiot" ...

Affected are MD5/SHA1 in internal library, and also HMAC-MD5/HMAC-SHA1/
crypt-md5 which use them.  Blowfish is ok, also Rijndael on at
least x86.

Big thanks to Daniel Holtzman who send me a build log which
contained warning:

        md5.c:246: warning: `X' defined but not used

Yes, gcc is that helpful...

Please apply this.

--
marko
contrib/pgcrypto/blf.c
contrib/pgcrypto/crypt-blowfish.c
contrib/pgcrypto/crypt-des.c
contrib/pgcrypto/crypt-gensalt.c
contrib/pgcrypto/md5.c
contrib/pgcrypto/px.h
contrib/pgcrypto/rijndael.c
contrib/pgcrypto/sha1.c