1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

pgcrypto uses non-standard type uint, which causes compile

failures on FreeBSD.  This patch replaces uint -> unsigned.

This was reported by Daniel Holtzman against 0.4pre3 standalone
package, but it needs fixing in contrib/pgcrypto too.

Marko Kreen
This commit is contained in:
Bruce Momjian
2001-11-20 15:50:53 +00:00
parent 01e0dae689
commit 540155b777
9 changed files with 97 additions and 97 deletions

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: px.c,v 1.4 2001/11/08 15:56:58 momjian Exp $
* $Id: px.c,v 1.5 2001/11/20 15:50:53 momjian Exp $
*/
#include <postgres.h>
@ -51,23 +51,23 @@ px_resolve_alias(const PX_Alias * list, const char *name)
*/
static uint
combo_encrypt_len(PX_Combo * cx, uint dlen)
combo_encrypt_len(PX_Combo * cx, unsigned dlen)
{
return dlen + 512;
}
static uint
combo_decrypt_len(PX_Combo * cx, uint dlen)
combo_decrypt_len(PX_Combo * cx, unsigned dlen)
{
return dlen;
}
static int
combo_init(PX_Combo * cx, const uint8 *key, uint klen,
const uint8 *iv, uint ivlen)
combo_init(PX_Combo * cx, const uint8 *key, unsigned klen,
const uint8 *iv, unsigned ivlen)
{
int err;
uint bs,
unsigned bs,
ks,
ivs;
PX_Cipher *c = cx->cipher;
@ -104,12 +104,12 @@ combo_init(PX_Combo * cx, const uint8 *key, uint klen,
}
static int
combo_encrypt(PX_Combo * cx, const uint8 *data, uint dlen,
uint8 *res, uint *rlen)
combo_encrypt(PX_Combo * cx, const uint8 *data, unsigned dlen,
uint8 *res, unsigned *rlen)
{
int err = 0;
uint8 *bbuf;
uint bs,
unsigned bs,
maxlen,
bpos,
i,
@ -175,13 +175,13 @@ out:
}
static int
combo_decrypt(PX_Combo * cx, const uint8 *data, uint dlen,
uint8 *res, uint *rlen)
combo_decrypt(PX_Combo * cx, const uint8 *data, unsigned dlen,
uint8 *res, unsigned *rlen)
{
uint bs,
unsigned bs,
i,
pad;
uint pad_ok;
unsigned pad_ok;
PX_Cipher *c = cx->cipher;