aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-03-25 15:03:30 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-03-25 15:03:30 +0000
commit8f332cf79eff2ce13c566cc858f88a872699a42c (patch)
tree3cba856528526919f511c9d153d730429d9537b4
parent023c537f47f61a9e24dc5ff8ab445c23f00aaae7 (diff)
downloadpostgresql-8f332cf79eff2ce13c566cc858f88a872699a42c.tar.gz
postgresql-8f332cf79eff2ce13c566cc858f88a872699a42c.zip
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..f6c4e1c7a00 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.2.1 2009/03/25 15:03:30 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)