File qmail-modernizer.patch of Package qmail-toaster

diff -ur simscan-1.4.0.1.orig/cdb/alloc.c simscan-1.4.0.1/cdb/alloc.c
--- simscan-1.4.0.1.orig/cdb/alloc.c	2007-10-29 17:59:34.000000000 +0100
+++ simscan-1.4.0.1/cdb/alloc.c	2013-05-28 22:45:55.348052550 +0200
@@ -11,8 +11,7 @@
 #define space ((char *) realspace)
 static unsigned int avail = SPACE; /* multiple of ALIGNMENT; 0<=avail<=SPACE */
 
-/*@null@*//*@out@*/char *alloc(n)
-unsigned int n;
+/*@null@*//*@out@*/char *alloc(unsigned int n)
 {
   char *x;
   n = ALIGNMENT + n - (n & (ALIGNMENT - 1)); /* XXX: could overflow */
@@ -22,8 +21,7 @@
   return x;
 }
 
-void alloc_free(x)
-char *x;
+void alloc_free(char *x)
 {
   if (x >= space)
     if (x < space + SPACE)
diff -ur simscan-1.4.0.1.orig/cdb/alloc.h simscan-1.4.0.1/cdb/alloc.h
--- simscan-1.4.0.1.orig/cdb/alloc.h	2007-10-29 17:59:34.000000000 +0100
+++ simscan-1.4.0.1/cdb/alloc.h	2013-05-28 22:45:39.727764044 +0200
@@ -1,8 +1,8 @@
 #ifndef ALLOC_H
 #define ALLOC_H
 
-extern /*@null@*//*@out@*/char *alloc();
-extern void alloc_free();
+extern /*@null@*//*@out@*/char *alloc(unsigned int n);
+extern void alloc_free(char *x);
 extern int alloc_re();
 
 #endif
diff -ur simscan-1.4.0.1.orig/cdb/byte_copy.c simscan-1.4.0.1/cdb/byte_copy.c
--- simscan-1.4.0.1.orig/cdb/byte_copy.c	2007-10-29 17:59:34.000000000 +0100
+++ simscan-1.4.0.1/cdb/byte_copy.c	2013-05-28 22:30:42.983203367 +0200
@@ -1,9 +1,6 @@
 #include "byte.h"
 
-void byte_copy(to,n,from)
-register char *to;
-register unsigned int n;
-register char *from;
+void byte_copy(char *to,unsigned int n,const char *from)
 {
   for (;;) {
     if (!n) return; *to++ = *from++; --n;
diff -ur simscan-1.4.0.1.orig/cdb/byte_cr.c simscan-1.4.0.1/cdb/byte_cr.c
--- simscan-1.4.0.1.orig/cdb/byte_cr.c	2007-10-29 17:59:34.000000000 +0100
+++ simscan-1.4.0.1/cdb/byte_cr.c	2013-05-28 22:33:55.434757109 +0200
@@ -1,9 +1,6 @@
 #include "byte.h"
 
-void byte_copyr(to,n,from)
-register char *to;
-register unsigned int n;
-register char *from;
+void byte_copyr(char *to,unsigned int n,const char *from)
 {
   to += n;
   from += n;
diff -ur simscan-1.4.0.1.orig/cdb/byte_diff.c simscan-1.4.0.1/cdb/byte_diff.c
--- simscan-1.4.0.1.orig/cdb/byte_diff.c	2007-10-29 17:59:34.000000000 +0100
+++ simscan-1.4.0.1/cdb/byte_diff.c	2013-05-28 22:35:10.924151127 +0200
@@ -1,9 +1,6 @@
 #include "byte.h"
 
-int byte_diff(s,n,t)
-register char *s;
-register unsigned int n;
-register char *t;
+int byte_diff(const char *s,unsigned int n,const char *t)
 {
   for (;;) {
     if (!n) return 0; if (*s != *t) break; ++s; ++t; --n;
diff -ur simscan-1.4.0.1.orig/cdb/byte.h simscan-1.4.0.1/cdb/byte.h
--- simscan-1.4.0.1.orig/cdb/byte.h	2007-10-29 17:59:34.000000000 +0100
+++ simscan-1.4.0.1/cdb/byte.h	2013-05-28 21:41:33.088840800 +0200
@@ -1,12 +1,12 @@
 #ifndef BYTE_H
 #define BYTE_H
 
-extern unsigned int byte_chr();
-extern unsigned int byte_rchr();
-extern void byte_copy();
-extern void byte_copyr();
-extern int byte_diff();
-extern void byte_zero();
+extern unsigned int byte_chr(const char *s,unsigned int n,int c);
+extern unsigned int byte_rchr(const char *s,unsigned int n,int c);
+extern void byte_copy(char *to,unsigned int n,const char *from);
+extern void byte_copyr(char *to,unsigned int n,const char *from);
+extern int byte_diff(const char *s,unsigned int n,const char *t);
+extern void byte_zero(char *s,unsigned int n);
 
 #define byte_equal(s,n,t) (!byte_diff((s),(n),(t)))
 
diff -ur simscan-1.4.0.1.orig/cdb/cdb.h simscan-1.4.0.1/cdb/cdb.h
--- simscan-1.4.0.1.orig/cdb/cdb.h	2007-10-29 17:59:34.000000000 +0100
+++ simscan-1.4.0.1/cdb/cdb.h	2013-05-28 22:41:43.247396423 +0200
@@ -8,6 +8,7 @@
 #define CDB_HASHSTART 5381
 extern uint32 cdb_hashadd(uint32,unsigned char);
 extern uint32 cdb_hash(char *,unsigned int);
+extern uint32 cdb_unpack(unsigned char *buf);
 
 struct cdb {
   char *map; /* 0 if no map is available */
diff -ur simscan-1.4.0.1.orig/cdb/cdb_seek.c simscan-1.4.0.1/cdb/cdb_seek.c
--- simscan-1.4.0.1.orig/cdb/cdb_seek.c	2007-10-29 17:59:34.000000000 +0100
+++ simscan-1.4.0.1/cdb/cdb_seek.c	2013-05-28 22:48:22.962779032 +0200
@@ -1,6 +1,7 @@
 #include <sys/types.h>
 #include <errno.h>
-extern int errno;
+#include <stdio.h>
+#include <unistd.h>
 #include "cdb.h"
 
 #ifndef SEEK_SET
@@ -51,7 +52,7 @@
 unsigned int len;
 uint32 *dlen;
 {
-  char packbuf[8];
+  unsigned char packbuf[8];
   uint32 pos;
   uint32 h;
   uint32 lenhash;
diff -ur simscan-1.4.0.1.orig/cdb/cdb_unpack.c simscan-1.4.0.1/cdb/cdb_unpack.c
--- simscan-1.4.0.1.orig/cdb/cdb_unpack.c	2007-10-29 17:59:34.000000000 +0100
+++ simscan-1.4.0.1/cdb/cdb_unpack.c	2013-05-28 22:41:58.859684762 +0200
@@ -1,7 +1,6 @@
 #include "cdb.h"
 
-uint32 cdb_unpack(buf)
-unsigned char *buf;
+uint32 cdb_unpack(unsigned char *buf)
 {
   uint32 num;
   num = buf[3]; num <<= 8;
diff -ur simscan-1.4.0.1.orig/cdb/seek.h simscan-1.4.0.1/cdb/seek.h
--- simscan-1.4.0.1.orig/cdb/seek.h	2007-10-29 17:59:34.000000000 +0100
+++ simscan-1.4.0.1/cdb/seek.h	2013-05-28 22:29:31.921891230 +0200
@@ -3,9 +3,9 @@
 
 typedef unsigned long seek_pos;
 
-extern seek_pos seek_cur(int);
+extern seek_pos seek_cur(int fd);
 
-extern int seek_set(int,seek_pos);
+extern int seek_set(int fd,seek_pos pos);
 extern int seek_end(int);
 
 extern int seek_trunc(int,seek_pos);
diff -ur simscan-1.4.0.1.orig/cdb/trycpp.c simscan-1.4.0.1/cdb/trycpp.c
--- simscan-1.4.0.1.orig/cdb/trycpp.c	2007-10-29 17:59:34.000000000 +0100
+++ simscan-1.4.0.1/cdb/trycpp.c	2013-05-28 22:58:17.365777595 +0200
@@ -1,3 +1,4 @@
+#include <stdio.h>
 main()
 {
 #ifdef NeXT
openSUSE Build Service is sponsored by