$OpenBSD: patch-base_src_common_encode_c,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/encode.c.orig	Mon Jul  8 16:31:06 2002
+++ base/src/common/encode.c	Tue Sep  3 23:34:47 2002
@@ -64,7 +64,7 @@ b64_lookup(unsigned char c)
 }
 
 void *
-b64_decode(const char *s, unsigned int *inlen)
+b64_decode(const char *s, u_int32_t *inlen)
 {
   unsigned len = *inlen;
   unsigned outlen = (len * 6) / 8;
@@ -119,7 +119,7 @@ b64_decode(const char *s, unsigned int *
 }
 
 char *
-b64_encode(const void *vp, unsigned int len)
+b64_encode(const void *vp, u_int32_t len)
 {
   unsigned const char *cp = vp;
   unsigned outlen = (len*8 + 5) / 6;
@@ -127,12 +127,12 @@ b64_encode(const void *vp, unsigned int 
   char *pBuf = outbuf;
 
   while (len) {
-    unsigned long take = min(len, 3);
-    unsigned long value = 0;
-    unsigned long outlen = (take * 8 + 5) / 6;
+    u_int32_t take = min(len, 3);
+    u_int32_t value = 0;
+    u_int32_t outlen = (take * 8 + 5) / 6;
     unsigned i;
 
-    assert(sizeof(unsigned long) == 4);
+    assert(sizeof(u_int32_t) == 4);
 
     if (take == 3) {
       value = cp[2];
@@ -174,7 +174,7 @@ fromhex(char c)
 /* Return decoded sequence of bytes along
  * with length of that sequence in 'len'*/
 void *
-hex_decode(const char *s, unsigned int *len)
+hex_decode(const char *s, u_int32_t *len)
 {
   unsigned char *b;
   unsigned u, w;
@@ -205,7 +205,7 @@ hex_decode(const char *s, unsigned int *
 /* Return encoded string that represents
  * 'len' bytes beginning at buf: */
 char *
-hex_encode(const void *vp, unsigned int len)
+hex_encode(const void *vp, u_int32_t len)
 {
   static char *hex_digits = "0123456789abcdef";
   unsigned u, w;
