From: | Marko Kreen <marko(at)l-t(dot)ee> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: fix pgcrypto usage of uint |
Date: | 2001-11-20 18:50:35 |
Message-ID: | 20011120205035.A1221@l-t.ee |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Duh, my regexp's missed bunch of them. Here's next batch, this
should be all.
> > pgcrypto uses non-standard type uint, which causes compile
> > failures on FreeBSD. This patch replaces uint -> unsigned.
--
marko
Index: contrib/pgcrypto/internal.c
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/contrib/pgcrypto/internal.c,v
retrieving revision 1.9
diff -u -r1.9 internal.c
--- contrib/pgcrypto/internal.c 20 Nov 2001 15:50:53 -0000 1.9
+++ contrib/pgcrypto/internal.c 20 Nov 2001 18:28:07 -0000
@@ -77,13 +77,13 @@
/* MD5 */
-static uint
+static unsigned
int_md5_len(PX_MD * h)
{
return MD5_DIGEST_LENGTH;
}
-static uint
+static unsigned
int_md5_block_len(PX_MD * h)
{
return MD5_BLOCK_SIZE;
@@ -124,13 +124,13 @@
/* SHA1 */
-static uint
+static unsigned
int_sha1_len(PX_MD * h)
{
return SHA1_DIGEST_LENGTH;
}
-static uint
+static unsigned
int_sha1_block_len(PX_MD * h)
{
return SHA1_BLOCK_SIZE;
@@ -250,19 +250,19 @@
#define MODE_ECB 0
#define MODE_CBC 1
-static uint
+static unsigned
rj_block_size(PX_Cipher * c)
{
return 128 / 8;
}
-static uint
+static unsigned
rj_key_size(PX_Cipher * c)
{
return 256 / 8;
}
-static uint
+static unsigned
rj_iv_size(PX_Cipher * c)
{
return 128 / 8;
@@ -388,19 +388,19 @@
* blowfish
*/
-static uint
+static unsigned
bf_block_size(PX_Cipher * c)
{
return 8;
}
-static uint
+static unsigned
bf_key_size(PX_Cipher * c)
{
return BLF_MAXKEYLEN;
}
-static uint
+static unsigned
bf_iv_size(PX_Cipher * c)
{
return 8;
Index: contrib/pgcrypto/mhash.c
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/contrib/pgcrypto/mhash.c,v
retrieving revision 1.6
diff -u -r1.6 mhash.c
--- contrib/pgcrypto/mhash.c 20 Nov 2001 15:50:53 -0000 1.6
+++ contrib/pgcrypto/mhash.c 20 Nov 2001 18:29:44 -0000
@@ -44,7 +44,7 @@
/* DIGEST */
-static uint
+static unsigned
digest_result_size(PX_MD * h)
{
MHASH mh = (MHASH) h->p.ptr;
@@ -53,7 +53,7 @@
return mhash_get_block_size(id);
}
-static uint
+static unsigned
digest_block_size(PX_MD * h)
{
MHASH mh = (MHASH) h->p.ptr;
@@ -110,7 +110,7 @@
/* ENCRYPT / DECRYPT */
-static uint
+static unsigned
cipher_block_size(PX_Cipher * c)
{
MCRYPT ctx = (MCRYPT) c->ptr;
@@ -118,7 +118,7 @@
return mcrypt_enc_get_block_size(ctx);
}
-static uint
+static unsigned
cipher_key_size(PX_Cipher * c)
{
MCRYPT ctx = (MCRYPT) c->ptr;
@@ -126,7 +126,7 @@
return mcrypt_enc_get_key_size(ctx);
}
-static uint
+static unsigned
cipher_iv_size(PX_Cipher * c)
{
MCRYPT ctx = (MCRYPT) c->ptr;
Index: contrib/pgcrypto/openssl.c
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/contrib/pgcrypto/openssl.c,v
retrieving revision 1.9
diff -u -r1.9 openssl.c
--- contrib/pgcrypto/openssl.c 20 Nov 2001 15:50:53 -0000 1.9
+++ contrib/pgcrypto/openssl.c 20 Nov 2001 18:29:55 -0000
@@ -36,13 +36,13 @@
#include <openssl/evp.h>
#include <openssl/blowfish.h>
-static uint
+static unsigned
digest_result_size(PX_MD * h)
{
return EVP_MD_CTX_size((EVP_MD_CTX *) h->p.ptr);
}
-static uint
+static unsigned
digest_block_size(PX_MD * h)
{
return EVP_MD_CTX_block_size((EVP_MD_CTX *) h->p.ptr);
@@ -114,7 +114,7 @@
/* generic EVP */
-static uint
+static unsigned
gen_evp_block_size(PX_Cipher * c)
{
ossldata *od = (ossldata *) c->ptr;
@@ -122,7 +122,7 @@
return EVP_CIPHER_block_size(od->evp_ciph);
}
-static uint
+static unsigned
gen_evp_key_size(PX_Cipher * c)
{
ossldata *od = (ossldata *) c->ptr;
@@ -130,7 +130,7 @@
return EVP_CIPHER_key_length(od->evp_ciph);
}
-static uint
+static unsigned
gen_evp_iv_size(PX_Cipher * c)
{
unsigned ivlen;
Index: contrib/pgcrypto/px-crypt.c
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/contrib/pgcrypto/px-crypt.c,v
retrieving revision 1.5
diff -u -r1.5 px-crypt.c
--- contrib/pgcrypto/px-crypt.c 5 Nov 2001 17:46:23 -0000 1.5
+++ contrib/pgcrypto/px-crypt.c 20 Nov 2001 18:30:21 -0000
@@ -158,7 +158,7 @@
{NULL, NULL, 0, 0, 0}
};
-uint
+unsigned
px_gen_salt(const char *salt_type, char *buf, int rounds)
{
int i,
Index: contrib/pgcrypto/px-hmac.c
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/contrib/pgcrypto/px-hmac.c,v
retrieving revision 1.3
diff -u -r1.3 px-hmac.c
--- contrib/pgcrypto/px-hmac.c 20 Nov 2001 15:50:53 -0000 1.3
+++ contrib/pgcrypto/px-hmac.c 20 Nov 2001 18:30:28 -0000
@@ -37,13 +37,13 @@
#define HMAC_IPAD 0x36
#define HMAC_OPAD 0x5C
-static uint
+static unsigned
hmac_result_size(PX_HMAC * h)
{
return px_md_result_size(h->md);
}
-static uint
+static unsigned
hmac_block_size(PX_HMAC * h)
{
return px_md_block_size(h->md);
Index: contrib/pgcrypto/px.c
===================================================================
RCS file: /opt/cvs/pgsql/pgsql/contrib/pgcrypto/px.c,v
retrieving revision 1.5
diff -u -r1.5 px.c
--- contrib/pgcrypto/px.c 20 Nov 2001 15:50:53 -0000 1.5
+++ contrib/pgcrypto/px.c 20 Nov 2001 18:30:02 -0000
@@ -50,13 +50,13 @@
* combo - cipher + padding (+ checksum)
*/
-static uint
+static unsigned
combo_encrypt_len(PX_Combo * cx, unsigned dlen)
{
return dlen + 512;
}
-static uint
+static unsigned
combo_decrypt_len(PX_Combo * cx, unsigned dlen)
{
return dlen;
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-11-20 18:54:10 | Re: fix pgcrypto usage of uint |
Previous Message | Bruce Momjian | 2001-11-20 15:50:47 | Re: fix pgcrypto usage of uint |