Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit540155b

Browse files
committed
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 standalonepackage, but it needs fixing in contrib/pgcrypto too.Marko Kreen
1 parent01e0dae commit540155b

File tree

9 files changed

+97
-97
lines changed

9 files changed

+97
-97
lines changed

‎contrib/pgcrypto/internal.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2727
* SUCH DAMAGE.
2828
*
29-
* $Id: internal.c,v 1.8 2001/11/05 17:46:23 momjian Exp $
29+
* $Id: internal.c,v 1.9 2001/11/20 15:50:53 momjian Exp $
3030
*/
3131

3232

@@ -90,7 +90,7 @@ int_md5_block_len(PX_MD * h)
9090
}
9191

9292
staticvoid
93-
int_md5_update(PX_MD*h,constuint8*data,uintdlen)
93+
int_md5_update(PX_MD*h,constuint8*data,unsigneddlen)
9494
{
9595
MD5_CTX*ctx= (MD5_CTX*)h->p.ptr;
9696

@@ -137,7 +137,7 @@ int_sha1_block_len(PX_MD * h)
137137
}
138138

139139
staticvoid
140-
int_sha1_update(PX_MD*h,constuint8*data,uintdlen)
140+
int_sha1_update(PX_MD*h,constuint8*data,unsigneddlen)
141141
{
142142
SHA1_CTX*ctx= (SHA1_CTX*)h->p.ptr;
143143

@@ -225,7 +225,7 @@ struct int_ctx
225225
blf_ctxbf;
226226
rijndael_ctxrj;
227227
}ctx;
228-
uintkeylen;
228+
unsignedkeylen;
229229
intis_init;
230230
intmode;
231231
};
@@ -269,7 +269,7 @@ rj_iv_size(PX_Cipher * c)
269269
}
270270

271271
staticint
272-
rj_init(PX_Cipher*c,constuint8*key,uintklen,constuint8*iv)
272+
rj_init(PX_Cipher*c,constuint8*key,unsignedklen,constuint8*iv)
273273
{
274274
structint_ctx*cx= (structint_ctx*)c->ptr;
275275

@@ -298,7 +298,7 @@ rj_real_init(struct int_ctx * cx, int dir)
298298
}
299299

300300
staticint
301-
rj_encrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
301+
rj_encrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
302302
{
303303
structint_ctx*cx= (structint_ctx*)c->ptr;
304304

@@ -328,7 +328,7 @@ rj_encrypt(PX_Cipher * c, const uint8 *data, uint dlen, uint8 *res)
328328
}
329329

330330
staticint
331-
rj_decrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
331+
rj_decrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
332332
{
333333
structint_ctx*cx= (structint_ctx*)c->ptr;
334334

@@ -407,7 +407,7 @@ bf_iv_size(PX_Cipher * c)
407407
}
408408

409409
staticint
410-
bf_init(PX_Cipher*c,constuint8*key,uintklen,constuint8*iv)
410+
bf_init(PX_Cipher*c,constuint8*key,unsignedklen,constuint8*iv)
411411
{
412412
structint_ctx*cx= (structint_ctx*)c->ptr;
413413

@@ -419,7 +419,7 @@ bf_init(PX_Cipher * c, const uint8 *key, uint klen, const uint8 *iv)
419419
}
420420

421421
staticint
422-
bf_encrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
422+
bf_encrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
423423
{
424424
structint_ctx*cx= (structint_ctx*)c->ptr;
425425

@@ -443,7 +443,7 @@ bf_encrypt(PX_Cipher * c, const uint8 *data, uint dlen, uint8 *res)
443443
}
444444

445445
staticint
446-
bf_decrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
446+
bf_decrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
447447
{
448448
structint_ctx*cx= (structint_ctx*)c->ptr;
449449

‎contrib/pgcrypto/mhash.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2727
* SUCH DAMAGE.
2828
*
29-
* $Id: mhash.c,v 1.5 2001/10/25 05:49:19 momjian Exp $
29+
* $Id: mhash.c,v 1.6 2001/11/20 15:50:53 momjian Exp $
3030
*/
3131

3232
#include<postgres.h>
@@ -75,7 +75,7 @@ digest_reset(PX_MD * h)
7575
}
7676

7777
staticvoid
78-
digest_update(PX_MD*h,constuint8*data,uintdlen)
78+
digest_update(PX_MD*h,constuint8*data,unsigneddlen)
7979
{
8080
MHASHmh= (MHASH)h->p.ptr;
8181

@@ -86,7 +86,7 @@ static void
8686
digest_finish(PX_MD*h,uint8*dst)
8787
{
8888
MHASHmh= (MHASH)h->p.ptr;
89-
uinthlen=digest_result_size(h);
89+
unsignedhlen=digest_result_size(h);
9090
hashidid=mhash_get_mhash_algo(mh);
9191
uint8*buf=mhash_end(mh);
9292

@@ -136,7 +136,7 @@ cipher_iv_size(PX_Cipher * c)
136136
}
137137

138138
staticint
139-
cipher_init(PX_Cipher*c,constuint8*key,uintklen,constuint8*iv)
139+
cipher_init(PX_Cipher*c,constuint8*key,unsignedklen,constuint8*iv)
140140
{
141141
interr;
142142
MCRYPTctx= (MCRYPT)c->ptr;
@@ -150,7 +150,7 @@ cipher_init(PX_Cipher * c, const uint8 *key, uint klen, const uint8 *iv)
150150
}
151151

152152
staticint
153-
cipher_encrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
153+
cipher_encrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
154154
{
155155
interr;
156156
MCRYPTctx= (MCRYPT)c->ptr;
@@ -164,7 +164,7 @@ cipher_encrypt(PX_Cipher * c, const uint8 *data, uint dlen, uint8 *res)
164164
}
165165

166166
staticint
167-
cipher_decrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
167+
cipher_decrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
168168
{
169169
interr;
170170
MCRYPTctx= (MCRYPT)c->ptr;

‎contrib/pgcrypto/openssl.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2727
* SUCH DAMAGE.
2828
*
29-
* $Id: openssl.c,v 1.8 2001/11/05 17:46:23 momjian Exp $
29+
* $Id: openssl.c,v 1.9 2001/11/20 15:50:53 momjian Exp $
3030
*/
3131

3232
#include<postgres.h>
@@ -60,7 +60,7 @@ digest_reset(PX_MD * h)
6060
}
6161

6262
staticvoid
63-
digest_update(PX_MD*h,constuint8*data,uintdlen)
63+
digest_update(PX_MD*h,constuint8*data,unsigneddlen)
6464
{
6565
EVP_MD_CTX*ctx= (EVP_MD_CTX*)h->p.ptr;
6666

@@ -108,8 +108,8 @@ typedef struct
108108
constEVP_CIPHER*evp_ciph;
109109
uint8key[EVP_MAX_KEY_LENGTH];
110110
uint8iv[EVP_MAX_IV_LENGTH];
111-
uintklen;
112-
uintinit;
111+
unsignedklen;
112+
unsignedinit;
113113
}ossldata;
114114

115115
/* generic EVP */
@@ -133,7 +133,7 @@ gen_evp_key_size(PX_Cipher * c)
133133
staticuint
134134
gen_evp_iv_size(PX_Cipher*c)
135135
{
136-
uintivlen;
136+
unsignedivlen;
137137
ossldata*od= (ossldata*)c->ptr;
138138

139139
ivlen=EVP_CIPHER_iv_length(od->evp_ciph);
@@ -153,10 +153,10 @@ gen_evp_free(PX_Cipher * c)
153153
/* fun */
154154

155155
staticint
156-
gen_evp_init(PX_Cipher*c,constuint8*key,uintklen,constuint8*iv)
156+
gen_evp_init(PX_Cipher*c,constuint8*key,unsignedklen,constuint8*iv)
157157
{
158158
ossldata*od= (ossldata*)c->ptr;
159-
uintbs=gen_evp_block_size(c);
159+
unsignedbs=gen_evp_block_size(c);
160160

161161
if (iv)
162162
memcpy(od->iv,iv,bs);
@@ -179,7 +179,7 @@ _gen_init(PX_Cipher * c, int enc)
179179
}
180180

181181
staticint
182-
gen_evp_encrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
182+
gen_evp_encrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
183183
{
184184
ossldata*od=c->ptr;
185185

@@ -190,7 +190,7 @@ gen_evp_encrypt(PX_Cipher * c, const uint8 *data, uint dlen, uint8 *res)
190190
}
191191

192192
staticint
193-
gen_evp_decrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
193+
gen_evp_decrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
194194
{
195195
ossldata*od=c->ptr;
196196

@@ -203,7 +203,7 @@ gen_evp_decrypt(PX_Cipher * c, const uint8 *data, uint dlen, uint8 *res)
203203
/* Blowfish */
204204

205205
staticint
206-
bf_init(PX_Cipher*c,constuint8*key,uintklen,constuint8*iv)
206+
bf_init(PX_Cipher*c,constuint8*key,unsignedklen,constuint8*iv)
207207
{
208208
ossldata*od=c->ptr;
209209

@@ -217,9 +217,9 @@ bf_init(PX_Cipher * c, const uint8 *key, uint klen, const uint8 *iv)
217217
}
218218

219219
staticint
220-
bf_ecb_encrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
220+
bf_ecb_encrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
221221
{
222-
uintbs=gen_evp_block_size(c),
222+
unsignedbs=gen_evp_block_size(c),
223223
i;
224224
ossldata*od=c->ptr;
225225

@@ -229,9 +229,9 @@ bf_ecb_encrypt(PX_Cipher * c, const uint8 *data, uint dlen, uint8 *res)
229229
}
230230

231231
staticint
232-
bf_ecb_decrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
232+
bf_ecb_decrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
233233
{
234-
uintbs=gen_evp_block_size(c),
234+
unsignedbs=gen_evp_block_size(c),
235235
i;
236236
ossldata*od=c->ptr;
237237

@@ -241,7 +241,7 @@ bf_ecb_decrypt(PX_Cipher * c, const uint8 *data, uint dlen, uint8 *res)
241241
}
242242

243243
staticint
244-
bf_cbc_encrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
244+
bf_cbc_encrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
245245
{
246246
ossldata*od=c->ptr;
247247

@@ -250,7 +250,7 @@ bf_cbc_encrypt(PX_Cipher * c, const uint8 *data, uint dlen, uint8 *res)
250250
}
251251

252252
staticint
253-
bf_cbc_decrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
253+
bf_cbc_decrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
254254
{
255255
ossldata*od=c->ptr;
256256

@@ -259,7 +259,7 @@ bf_cbc_decrypt(PX_Cipher * c, const uint8 *data, uint dlen, uint8 *res)
259259
}
260260

261261
staticint
262-
bf_cfb64_encrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
262+
bf_cfb64_encrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
263263
{
264264
ossldata*od=c->ptr;
265265

@@ -269,7 +269,7 @@ bf_cfb64_encrypt(PX_Cipher * c, const uint8 *data, uint dlen, uint8 *res)
269269
}
270270

271271
staticint
272-
bf_cfb64_decrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
272+
bf_cfb64_decrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
273273
{
274274
ossldata*od=c->ptr;
275275

@@ -279,7 +279,7 @@ bf_cfb64_decrypt(PX_Cipher * c, const uint8 *data, uint dlen, uint8 *res)
279279
}
280280

281281
staticint
282-
bf_ofb64_encrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
282+
bf_ofb64_encrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
283283
{
284284
ossldata*od=c->ptr;
285285

@@ -288,7 +288,7 @@ bf_ofb64_encrypt(PX_Cipher * c, const uint8 *data, uint dlen, uint8 *res)
288288
}
289289

290290
staticint
291-
bf_ofb64_decrypt(PX_Cipher*c,constuint8*data,uintdlen,uint8*res)
291+
bf_ofb64_decrypt(PX_Cipher*c,constuint8*data,unsigneddlen,uint8*res)
292292
{
293293
ossldata*od=c->ptr;
294294

@@ -371,7 +371,7 @@ static PX_Cipher gen_evp_handler = {
371371
staticintpx_openssl_initialized=0;
372372

373373
/* ATM not needed
374-
static void *o_alloc(uint s) { return px_alloc(s); }
374+
static void *o_alloc(unsigned s) { return px_alloc(s); }
375375
static void *o_realloc(void *p) { return px_realloc(p); }
376376
static void o_free(void *p) { px_free(p); }
377377
*/
@@ -416,7 +416,7 @@ px_find_digest(const char *name, PX_MD ** res)
416416
int
417417
px_find_cipher(constchar*name,PX_Cipher**res)
418418
{
419-
uinti;
419+
unsignedi;
420420
PX_Cipher*c=NULL,
421421
*csrc;
422422
ossldata*od;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp