summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-03-25 15:03:25 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-03-25 15:03:25 +0000
commita4702ada6226bf74acd6e26c88d7db7d10d1b007 (patch)
tree73c071c77ac6642d075230e6201d4fec4de632e1
parent37e9992214442ac485eee31d05506d430a89019f (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.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/contrib/pgcrypto/pgp.h b/contrib/pgcrypto/pgp.h
index d23086f5335..186c3716675 100644
--- a/contrib/pgcrypto/pgp.h
+++ b/contrib/pgcrypto/pgp.h
@@ -26,17 +26,17 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $PostgreSQL: pgsql/contrib/pgcrypto/pgp.h,v 1.4 2005/10/15 02:49:06 momjian Exp $
+ * $PostgreSQL: pgsql/contrib/pgcrypto/pgp.h,v 1.4.4.1 2009/03/25 15:03:25 tgl Exp $
*/
-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)