Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 050a78d

Browse files
committed
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.
1 parent 9f843d1 commit 050a78d

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

contrib/pgcrypto/pgp.h

+13-13
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2727
* SUCH DAMAGE.
2828
*
29-
* $PostgreSQL: pgsql/contrib/pgcrypto/pgp.h,v 1.4 2005/10/15 02:49:06 momjian Exp $
29+
* $PostgreSQL: pgsql/contrib/pgcrypto/pgp.h,v 1.5 2009/03/25 15:03:13 tgl Exp $
3030
*/
3131

32-
enum
32+
enum PGP_S2K_TYPE
3333
{
3434
PGP_S2K_SIMPLE = 0,
3535
PGP_S2K_SALTED = 1,
3636
PGP_S2K_ISALTED = 3
37-
} PGP_S2K_TYPE;
37+
};
3838

39-
enum
39+
enum PGP_PKT_TYPE
4040
{
4141
PGP_PKT_RESERVED = 0,
4242
PGP_PKT_PUBENCRYPTED_SESSKEY = 1,
@@ -56,18 +56,18 @@ enum
5656
PGP_PKT_SYMENCRYPTED_DATA_MDC = 18,
5757
PGP_PKT_MDC = 19,
5858
PGP_PKT_PRIV_61 = 61 /* occurs in gpg secring */
59-
} PGP_PKT_TYPE;
59+
};
6060

61-
enum
61+
enum PGP_PUB_ALGO_TYPE
6262
{
6363
PGP_PUB_RSA_ENCRYPT_SIGN = 1,
6464
PGP_PUB_RSA_ENCRYPT = 2,
6565
PGP_PUB_RSA_SIGN = 3,
6666
PGP_PUB_ELG_ENCRYPT = 16,
6767
PGP_PUB_DSA_SIGN = 17
68-
} PGP_PUB_ALGO_TYPE;
68+
};
6969

70-
enum
70+
enum PGP_SYMENC_TYPE
7171
{
7272
PGP_SYM_PLAIN = 0, /* ?? */
7373
PGP_SYM_IDEA = 1, /* obsolete, PGP 2.6 compat */
@@ -80,17 +80,17 @@ enum
8080
PGP_SYM_AES_192 = 8,
8181
PGP_SYM_AES_256 = 9,
8282
PGP_SYM_TWOFISH = 10
83-
} PGP_SYMENC_TYPE;
83+
};
8484

85-
enum
85+
enum PGP_COMPR_TYPE
8686
{
8787
PGP_COMPR_NONE = 0, /* must */
8888
PGP_COMPR_ZIP = 1, /* should */
8989
PGP_COMPR_ZLIB = 2,
9090
PGP_COMPR_BZIP2 = 3
91-
} PGP_COMPR_TYPE;
91+
};
9292

93-
enum
93+
enum PGP_DIGEST_TYPE
9494
{
9595
PGP_DIGEST_MD5 = 1, /* should, deprecated */
9696
PGP_DIGEST_SHA1 = 2, /* must */
@@ -102,7 +102,7 @@ enum
102102
PGP_DIGEST_SHA256 = 8,
103103
PGP_DIGEST_SHA384 = 9,
104104
PGP_DIGEST_SHA512 = 10
105-
} PGP_DIGEST_TYPE;
105+
};
106106

107107
#define PGP_MAX_KEY (256/8)
108108
#define PGP_MAX_BLOCK (256/8)

0 commit comments

Comments
 (0)