summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2009-03-25 15:03:13 +0000
committerTom Lane2009-03-25 15:03:13 +0000
commit1acbfeb97ac2d9ebb1ec38f35c1e45903dcecf3c (patch)
treedb54eed62ef4ad4539260fbd5cc9372d73400080
parentc4674c2e03f3d8f8fc6300d881691d4809e83b9c (diff)
Fix old thinko in pgp.h: the idea is to declare some named enum types,
not global variables of anonymous enum types. This didn't actually hurt much because most linkers will just merge the duplicated definitions ... but some will complain. Per bug #4731 from Ceriel Jacobs. Backpatch to 8.1 --- the declarations don't exist before that.
-rw-r--r--contrib/pgcrypto/pgp.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/contrib/pgcrypto/pgp.h b/contrib/pgcrypto/pgp.h
index 3b5a9c1feb..d334f53915 100644
--- a/contrib/pgcrypto/pgp.h
+++ b/contrib/pgcrypto/pgp.h
@@ -29,14 +29,14 @@
* $PostgreSQL$
*/
-enum
+enum PGP_S2K_TYPE
{
PGP_S2K_SIMPLE = 0,
PGP_S2K_SALTED = 1,
PGP_S2K_ISALTED = 3
-} PGP_S2K_TYPE;
+};
-enum
+enum PGP_PKT_TYPE
{
PGP_PKT_RESERVED = 0,
PGP_PKT_PUBENCRYPTED_SESSKEY = 1,
@@ -56,18 +56,18 @@ enum
PGP_PKT_SYMENCRYPTED_DATA_MDC = 18,
PGP_PKT_MDC = 19,
PGP_PKT_PRIV_61 = 61 /* occurs in gpg secring */
-} PGP_PKT_TYPE;
+};
-enum
+enum PGP_PUB_ALGO_TYPE
{
PGP_PUB_RSA_ENCRYPT_SIGN = 1,
PGP_PUB_RSA_ENCRYPT = 2,
PGP_PUB_RSA_SIGN = 3,
PGP_PUB_ELG_ENCRYPT = 16,
PGP_PUB_DSA_SIGN = 17
-} PGP_PUB_ALGO_TYPE;
+};
-enum
+enum PGP_SYMENC_TYPE
{
PGP_SYM_PLAIN = 0, /* ?? */
PGP_SYM_IDEA = 1, /* obsolete, PGP 2.6 compat */
@@ -80,17 +80,17 @@ enum
PGP_SYM_AES_192 = 8,
PGP_SYM_AES_256 = 9,
PGP_SYM_TWOFISH = 10
-} PGP_SYMENC_TYPE;
+};
-enum
+enum PGP_COMPR_TYPE
{
PGP_COMPR_NONE = 0, /* must */
PGP_COMPR_ZIP = 1, /* should */
PGP_COMPR_ZLIB = 2,
PGP_COMPR_BZIP2 = 3
-} PGP_COMPR_TYPE;
+};
-enum
+enum PGP_DIGEST_TYPE
{
PGP_DIGEST_MD5 = 1, /* should, deprecated */
PGP_DIGEST_SHA1 = 2, /* must */
@@ -102,7 +102,7 @@ enum
PGP_DIGEST_SHA256 = 8,
PGP_DIGEST_SHA384 = 9,
PGP_DIGEST_SHA512 = 10
-} PGP_DIGEST_TYPE;
+};
#define PGP_MAX_KEY (256/8)
#define PGP_MAX_BLOCK (256/8)