--- base64.c	2007-10-30 20:18:45.000000000 +0200
+++ base64.c.new	2007-10-30 20:12:41.000000000 +0200
@@ -41,7 +41,6 @@
  *
  */
 
-#include <config.h>
 
 /* Get prototype. */
 #include "base64.h"
@@ -64,10 +63,10 @@
    possible.  If OUTLEN is larger than BASE64_LENGTH(INLEN), also zero
    terminate the output buffer. */
 void
-base64_encode (const char *restrict in, size_t inlen,
-	       char *restrict out, size_t outlen)
+base64_encode (const char *in, size_t inlen,
+	       char *out, size_t outlen)
 {
-  static const char b64str[64] =
+  static const char b64str[65] =
     "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
   while (inlen && outlen)
@@ -133,7 +132,7 @@
       return 0;
     }
 
-  *out = malloc (outlen);
+  *out = (char *)malloc (outlen);
   if (!*out)
     return outlen;
 
@@ -310,8 +309,8 @@
    that, when applicable, you must remove any line terminators that is
    part of the data stream before calling this function.  */
 bool
-base64_decode (const char *restrict in, size_t inlen,
-	       char *restrict out, size_t *outlen)
+base64_decode (const char *in, size_t inlen,
+	       char *out, size_t *outlen)
 {
   size_t outleft = *outlen;
 
@@ -407,7 +406,7 @@
      Dividing before multiplying avoids the possibility of overflow.  */
   size_t needlen = 3 * (inlen / 4) + 2;
 
-  *out = malloc (needlen);
+  *out = (char *)malloc (needlen);
   if (!*out)
     return true;
 
