summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/nmh/distinfo38
-rw-r--r--mail/nmh/patches/patch-aa30
-rw-r--r--mail/nmh/patches/patch-ab13
-rw-r--r--mail/nmh/patches/patch-ac13
-rw-r--r--mail/nmh/patches/patch-ad13
-rw-r--r--mail/nmh/patches/patch-ae14
-rw-r--r--mail/nmh/patches/patch-af115
-rw-r--r--mail/nmh/patches/patch-ag13
-rw-r--r--mail/nmh/patches/patch-ah12
-rw-r--r--mail/nmh/patches/patch-ai13
-rw-r--r--mail/nmh/patches/patch-aj13
-rw-r--r--mail/nmh/patches/patch-ak13
-rw-r--r--mail/nmh/patches/patch-al12
-rw-r--r--mail/nmh/patches/patch-am13
-rw-r--r--mail/nmh/patches/patch-an12
-rw-r--r--mail/nmh/patches/patch-ao12
-rw-r--r--mail/nmh/patches/patch-ap13
-rw-r--r--mail/nmh/patches/patch-aq13
-rw-r--r--mail/nmh/patches/patch-ar12
-rw-r--r--mail/nmh/patches/patch-as13
-rw-r--r--mail/nmh/patches/patch-at12
-rw-r--r--mail/nmh/patches/patch-au13
-rw-r--r--mail/nmh/patches/patch-av13
-rw-r--r--mail/nmh/patches/patch-aw13
-rw-r--r--mail/nmh/patches/patch-ax21
-rw-r--r--mail/nmh/patches/patch-ay24
-rw-r--r--mail/nmh/patches/patch-az13
-rw-r--r--mail/nmh/patches/patch-ba13
-rw-r--r--mail/nmh/patches/patch-bb13
-rw-r--r--mail/nmh/patches/patch-bc13
-rw-r--r--mail/nmh/patches/patch-bd13
-rw-r--r--mail/nmh/patches/patch-be13
-rw-r--r--mail/nmh/patches/patch-bf12
-rw-r--r--mail/nmh/patches/patch-bg13
-rw-r--r--mail/nmh/patches/patch-bh13
-rw-r--r--mail/nmh/patches/patch-bi13
36 files changed, 611 insertions, 14 deletions
diff --git a/mail/nmh/distinfo b/mail/nmh/distinfo
index 117fcfc28be..4def44f0983 100644
--- a/mail/nmh/distinfo
+++ b/mail/nmh/distinfo
@@ -1,9 +1,43 @@
-$NetBSD: distinfo,v 1.10 2005/02/24 09:59:25 agc Exp $
+$NetBSD: distinfo,v 1.11 2006/03/02 21:28:23 joerg Exp $
SHA1 (nmh-1.0.4.tar.gz) = 71441a884d898db2fd9184a92e663682536425f5
RMD160 (nmh-1.0.4.tar.gz) = 32f0a0cb7aa76f7d7efc59d99b6e5aeeea519037
Size (nmh-1.0.4.tar.gz) = 683215 bytes
-SHA1 (patch-aa) = 88e3e0445cb0102bb3748eb2c9503950ae631931
+SHA1 (patch-aa) = 9bb5d1f8344751fc5414751cddfecaacd044c925
+SHA1 (patch-ab) = e6d0ef2fbd549bacd160972f45e66067f443e6fb
+SHA1 (patch-ac) = 110189a119fcdbfd78a1becd1d3b83482d156192
+SHA1 (patch-ad) = f1dcbd4ef8ffdff07d12dc1fa6036a7a7164af34
+SHA1 (patch-ae) = e8faef23ca86c5a838e1d0deef1696cb5aace084
+SHA1 (patch-af) = 90464f24d1b0b4887ee91dcd0d5be0fd82e714e2
+SHA1 (patch-ag) = c40467987ed6ae34bc59729003b2561541552117
+SHA1 (patch-ah) = 00c12fcc73ce630879688bd3628208755efc0a85
+SHA1 (patch-ai) = bb6ce79960d022b13bf3060d6dd4121dc0ce9a18
+SHA1 (patch-aj) = 32c6e81b02bc6888f719c8b9cfdca13838dd8130
+SHA1 (patch-ak) = 82d517241594920a21e514cfa7ae646f44c89d87
+SHA1 (patch-al) = 31407afcb1687fb5c29cecda3d9c078890ae3157
+SHA1 (patch-am) = 27e6c13ee80a5b907696c87ea261675661a176da
+SHA1 (patch-an) = e76f9a32b98e4e33325b04afff5209fa5e452f43
+SHA1 (patch-ao) = f9072835d2f2faac018803784a8deac56a694f93
+SHA1 (patch-ap) = 6ce802de091a1fa5d8fd2086d20597334bd39db9
+SHA1 (patch-aq) = eac9f24e310a64cb2a9e471f813e099acaab624a
+SHA1 (patch-ar) = 5e684c49b99e5ab3ef651bad35b966d1ebb2ad9e
+SHA1 (patch-as) = 017aa17dfee30429e11ade6486ca11a7cb01a971
+SHA1 (patch-at) = a6ecaa1ea5b03958fa02aebd1477d33be9b659e9
+SHA1 (patch-au) = e6e9604422cc7e17c1a543ce93265ed79359d379
+SHA1 (patch-av) = 265b73b22d62c34031b0554bcd5aed3372a89daf
+SHA1 (patch-aw) = b89b413b9c48050986dd278834a2839e957cfc82
+SHA1 (patch-ax) = d63d97b1bc0f8ba73061da09256d4f728b1066ef
+SHA1 (patch-ay) = 70da99e2192917180376f78e5452342df9440213
+SHA1 (patch-az) = 04704392993194936c300220f8b13bd5143f0b59
+SHA1 (patch-ba) = cf2098d7124bd6bbd1da09acf467196570dee044
+SHA1 (patch-bb) = 75bce49233ced39551f5b145ff44d4a04b996589
+SHA1 (patch-bc) = 86d8906800e4a0621366b3a19736b90bcb99a270
+SHA1 (patch-bd) = 994b773c80508891d744b39784094108fdb5ca51
+SHA1 (patch-be) = 1e244675d7a6b4279924599f55e89d78f765c144
+SHA1 (patch-bf) = f30740c6ec201c66493f26f9e0cbf88023323a4a
+SHA1 (patch-bg) = 0bdf466cf238d431b49d3b16aad55e988c13f646
+SHA1 (patch-bh) = f6d5371d0366e9fd7b432208beec399c05ade010
+SHA1 (patch-bi) = 3ad7237c2331bf957aa1736cf2182f6a14d45ed1
SHA1 (patch-ca) = 126d53b3af216754c40b828d7c444a6ee077073f
SHA1 (patch-cb) = 6e498988c08e393fdd4e8e27f2ff6ce457e2c803
SHA1 (patch-cd) = 13901025ef3a1b7fc07d0c13f8e1aef3e9bee2d6
diff --git a/mail/nmh/patches/patch-aa b/mail/nmh/patches/patch-aa
index 27328e02c2e..fff8b1b283a 100644
--- a/mail/nmh/patches/patch-aa
+++ b/mail/nmh/patches/patch-aa
@@ -1,11 +1,17 @@
-$NetBSD: patch-aa,v 1.4 2004/05/04 06:18:14 mrg Exp $
+$NetBSD: patch-aa,v 1.5 2006/03/02 21:28:23 joerg Exp $
-ugh. NetBSD-current (post 2.0) has a new fgetstr() that conflicts...
-
-
---- uip/mhbuildsbr.c.orig 1999-09-12 23:50:12.000000000 +1000
-+++ uip/mhbuildsbr.c 2004-05-04 12:45:13.000000000 +1000
-@@ -174,7 +174,7 @@
+--- uip/mhbuildsbr.c.orig 1999-09-12 13:50:12.000000000 +0000
++++ uip/mhbuildsbr.c
+@@ -40,8 +40,6 @@
+ #endif
+
+
+-extern int errno;
+-
+ extern int debugsw;
+ extern int verbosw;
+
+@@ -174,7 +172,7 @@ static int InitFTP (CT);
static int openFTP (CT, char **);
static int InitMail (CT);
static int openMail (CT, char **);
@@ -14,7 +20,7 @@ ugh. NetBSD-current (post 2.0) has a new fgetstr() that conflicts...
static int user_content (FILE *, char *, char *, CT *);
static void set_id (CT, int);
static int compose_content (CT);
-@@ -374,7 +374,7 @@
+@@ -374,7 +372,7 @@ finish_field:
* read and parse the composition file
* and the directives it contains.
*/
@@ -23,7 +29,7 @@ ugh. NetBSD-current (post 2.0) has a new fgetstr() that conflicts...
struct part *part;
CT p;
-@@ -2829,7 +2829,7 @@
+@@ -2829,7 +2827,7 @@ openMail (CT ct, char **file)
static char *
@@ -32,7 +38,7 @@ ugh. NetBSD-current (post 2.0) has a new fgetstr() that conflicts...
{
char *cp, *ep;
-@@ -2931,7 +2931,7 @@
+@@ -2931,7 +2929,7 @@ user_content (FILE *in, char *file, char
again_descr:
ct->c_descr = add (buffer + i + 1, ct->c_descr);
@@ -41,7 +47,7 @@ ugh. NetBSD-current (post 2.0) has a new fgetstr() that conflicts...
adios (NULL, "end-of-file after %s: field in plaintext", DESCR_FIELD);
switch (buffer[0]) {
case ' ':
-@@ -2954,7 +2954,7 @@
+@@ -2954,7 +2952,7 @@ again_descr:
rock_and_roll:
headers = -1;
pos = ftell (in);
@@ -50,7 +56,7 @@ ugh. NetBSD-current (post 2.0) has a new fgetstr() that conflicts...
break;
if (buffer[0] == '#') {
char *bp;
-@@ -3297,7 +3297,7 @@
+@@ -3297,7 +3295,7 @@ use_forw:
ct->c_ctparams = (void *) m;
pp = &m->mp_parts;
diff --git a/mail/nmh/patches/patch-ab b/mail/nmh/patches/patch-ab
new file mode 100644
index 00000000000..57534ebccac
--- /dev/null
+++ b/mail/nmh/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.5 2006/03/02 21:28:23 joerg Exp $
+
+--- sbr/context_read.c.orig 2006-03-02 16:47:03.000000000 +0000
++++ sbr/context_read.c
+@@ -9,8 +9,6 @@
+ #include <errno.h>
+ #include <pwd.h>
+
+-extern int errno;
+-
+ void
+ context_read (void)
+ {
diff --git a/mail/nmh/patches/patch-ac b/mail/nmh/patches/patch-ac
new file mode 100644
index 00000000000..e1b8684bc47
--- /dev/null
+++ b/mail/nmh/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.6 2006/03/02 21:28:23 joerg Exp $
+
+--- sbr/discard.c.orig 2006-03-02 20:24:08.000000000 +0000
++++ sbr/discard.c
+@@ -51,7 +51,7 @@ discard (FILE *io)
+ # endif
+ #endif
+
+-#ifdef _FSTDIO
++#if defined(_FSTDIO) || defined(__DragonFly__)
+ fpurge (io);
+ #else
+ # ifdef LINUX_STDIO
diff --git a/mail/nmh/patches/patch-ad b/mail/nmh/patches/patch-ad
new file mode 100644
index 00000000000..f20c31ed59f
--- /dev/null
+++ b/mail/nmh/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.4 2006/03/02 21:28:23 joerg Exp $
+
+--- sbr/lock_file.c.orig 2006-03-02 20:27:38.000000000 +0000
++++ sbr/lock_file.c
+@@ -40,8 +40,6 @@
+
+ #include <signal.h>
+
+-extern int errno;
+-
+ #ifdef LOCKDIR
+ char *lockdir = LOCKDIR;
+ #endif
diff --git a/mail/nmh/patches/patch-ae b/mail/nmh/patches/patch-ae
new file mode 100644
index 00000000000..8129c05aa49
--- /dev/null
+++ b/mail/nmh/patches/patch-ae
@@ -0,0 +1,14 @@
+$NetBSD: patch-ae,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- sbr/m_draft.c.orig 2006-03-02 20:28:13.000000000 +0000
++++ sbr/m_draft.c
+@@ -8,9 +8,6 @@
+ #include <h/mh.h>
+ #include <errno.h>
+
+-extern int errno;
+-
+-
+ char *
+ m_draft (char *folder, char *msg, int use, int *isdf)
+ {
diff --git a/mail/nmh/patches/patch-af b/mail/nmh/patches/patch-af
new file mode 100644
index 00000000000..83066c84505
--- /dev/null
+++ b/mail/nmh/patches/patch-af
@@ -0,0 +1,115 @@
+$NetBSD: patch-af,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- sbr/m_getfld.c.orig 2006-03-02 20:29:22.000000000 +0000
++++ sbr/m_getfld.c
+@@ -261,6 +261,9 @@ m_getfld (int state, unsigned char *name
+ bp = sp = (unsigned char *) iob->_IO_read_ptr - 1;
+ j = (cnt = ((long) iob->_IO_read_end -
+ (long) iob->_IO_read_ptr) + 1) < i ? cnt : i;
++#elif defined(__DragonFly__)
++ bp = sp = (unsigned char *) ((struct __FILE_public *)iob)->_p - 1;
++ j = (cnt = ((struct __FILE_public *)iob)->_r+1) < i ? cnt : i;
+ #else
+ bp = sp = (unsigned char *) iob->_ptr - 1;
+ j = (cnt = iob->_cnt+1) < i ? cnt : i;
+@@ -273,6 +276,8 @@ m_getfld (int state, unsigned char *name
+ #ifdef LINUX_STDIO
+ iob->_IO_read_ptr = iob->_IO_read_end;
+ if (__underflow(iob) == EOF) {
++#elif defined(__DragonFly__)
++ if (__srget(iob) == EOF) {
+ #else
+ if (_filbuf(iob) == EOF) {
+ #endif
+@@ -286,6 +291,9 @@ m_getfld (int state, unsigned char *name
+ } else {
+ #ifdef LINUX_STDIO
+ iob->_IO_read_ptr = bp + 1;
++#elif defined(__DragonFly__)
++ ((struct __FILE_public *)iob)->_p = bp + 1;
++ ((struct __FILE_public *)iob)->_r = cnt - 1;
+ #else
+ iob->_ptr = bp + 1;
+ iob->_cnt = cnt - 1;
+@@ -330,6 +338,9 @@ m_getfld (int state, unsigned char *name
+ #ifdef LINUX_STDIO
+ cnt = (long) iob->_IO_read_end - (long) iob->_IO_read_ptr;
+ bp = (unsigned char *) --iob->_IO_read_ptr;
++#elif defined(__DragonFly__)
++ cnt = ((struct __FILE_public *)iob)->_r++;
++ bp = (unsigned char *) --((struct __FILE_public *)iob)->_p;
+ #else
+ cnt = iob->_cnt++;
+ bp = (unsigned char *) --iob->_ptr;
+@@ -344,6 +355,11 @@ m_getfld (int state, unsigned char *name
+ j = ep - (unsigned char *) iob->_IO_read_ptr;
+ memcpy (cp, iob->_IO_read_ptr, j);
+ iob->_IO_read_ptr = ep;
++#elif defined(__DragonFly__)
++ j = ep - (unsigned char *) ((struct __FILE_public *)iob)->_p;
++ memcpy (cp, ((struct __FILE_public *)iob)->_p, j);
++ ((struct __FILE_public *)iob)->_p = ep;
++ ((struct __FILE_public *)iob)->_r -= j;
+ #else
+ j = ep - (unsigned char *) iob->_ptr;
+ memcpy (cp, iob->_ptr, j);
+@@ -363,6 +379,9 @@ m_getfld (int state, unsigned char *name
+ #ifdef LINUX_STDIO
+ c += bp - (unsigned char *) iob->_IO_read_ptr;
+ memcpy( cp, iob->_IO_read_ptr, c);
++#elif defined(__DragonFly__)
++ c += bp - (unsigned char *) ((struct __FILE_public *)iob)->_p;
++ memcpy( cp, ((struct __FILE_public *)iob)->_p, c);
+ #else
+ c += bp - (unsigned char *) iob->_ptr;
+ memcpy( cp, iob->_ptr, c);
+@@ -373,6 +392,9 @@ m_getfld (int state, unsigned char *name
+ /* the dest buffer is full */
+ #ifdef LINUX_STDIO
+ iob->_IO_read_ptr += c;
++#elif defined(__DragonFly__)
++ ((struct __FILE_public *)iob)->_r -= c;
++ ((struct __FILE_public *)iob)->_p += c;
+ #else
+ iob->_cnt -= c;
+ iob->_ptr += c;
+@@ -392,6 +414,9 @@ m_getfld (int state, unsigned char *name
+ iob->_IO_read_ptr = iob->_IO_read_end;
+ c = __underflow(iob);
+ iob->_IO_read_ptr++; /* NOT automatic! */
++#elif defined(__DragonFly__)
++ *cp++ =j = *(((struct __FILE_public *)iob)->_p + c);
++ c = __srget(iob);
+ #else
+ *cp++ = j = *(iob->_ptr + c);
+ c = _filbuf(iob);
+@@ -401,6 +426,9 @@ m_getfld (int state, unsigned char *name
+ if (c != EOF) {
+ #ifdef LINUX_STDIO
+ --iob->_IO_read_ptr;
++#elif defined(__DragonFly__)
++ --((struct __FILE_public *)iob)->_p;
++ ++((struct __FILE_public *)iob)->_r;
+ #else
+ --iob->_ptr;
+ ++iob->_cnt;
+@@ -424,6 +452,9 @@ m_getfld (int state, unsigned char *name
+ #ifdef LINUX_STDIO
+ bp = (unsigned char *) --iob->_IO_read_ptr;
+ cnt = (long) iob->_IO_read_end - (long) iob->_IO_read_ptr;
++#elif defined(__DragonFly__)
++ bp = (unsigned char *) --((struct __FILE_public *)iob)->_p;
++ cnt = ++((struct __FILE_public *)iob)->_r;
+ #else
+ bp = (unsigned char *) --iob->_ptr;
+ cnt = ++iob->_cnt;
+@@ -486,6 +517,9 @@ m_getfld (int state, unsigned char *name
+ memcpy( buf, bp, c );
+ #ifdef LINUX_STDIO
+ iob->_IO_read_ptr += c;
++#elif defined(__DragonFly__)
++ ((struct __FILE_public *)iob)->_r -= c;
++ ((struct __FILE_public *)iob)->_p += c;
+ #else
+ iob->_cnt -= c;
+ iob->_ptr += c;
diff --git a/mail/nmh/patches/patch-ag b/mail/nmh/patches/patch-ag
new file mode 100644
index 00000000000..6f1e62d0964
--- /dev/null
+++ b/mail/nmh/patches/patch-ag
@@ -0,0 +1,13 @@
+$NetBSD: patch-ag,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- sbr/makedir.c.orig 2006-03-02 20:51:25.000000000 +0000
++++ sbr/makedir.c
+@@ -14,8 +14,6 @@
+ #include <sys/param.h>
+ #include <sys/file.h>
+
+-extern int errno;
+-
+ int
+ makedir (char *dir)
+ {
diff --git a/mail/nmh/patches/patch-ah b/mail/nmh/patches/patch-ah
new file mode 100644
index 00000000000..44beb1533b0
--- /dev/null
+++ b/mail/nmh/patches/patch-ah
@@ -0,0 +1,12 @@
+$NetBSD: patch-ah,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- sbr/ruserpass.c.orig 2006-03-02 20:52:29.000000000 +0000
++++ sbr/ruserpass.c
+@@ -65,7 +65,6 @@ ruserpass(char *host, char **aname, char
+ char *hdir, buf[BUFSIZ];
+ int t, usedefault = 0;
+ struct stat stb;
+- extern int errno;
+
+ hdir = getenv("HOME");
+ if (hdir == NULL)
diff --git a/mail/nmh/patches/patch-ai b/mail/nmh/patches/patch-ai
new file mode 100644
index 00000000000..08280f0269e
--- /dev/null
+++ b/mail/nmh/patches/patch-ai
@@ -0,0 +1,13 @@
+$NetBSD: patch-ai,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/annosbr.c.orig 2006-03-02 20:53:09.000000000 +0000
++++ uip/annosbr.c
+@@ -10,8 +10,6 @@
+ #include <fcntl.h>
+ #include <errno.h>
+
+-extern int errno;
+-
+ /*
+ * static prototypes
+ */
diff --git a/mail/nmh/patches/patch-aj b/mail/nmh/patches/patch-aj
new file mode 100644
index 00000000000..2b25c0445f9
--- /dev/null
+++ b/mail/nmh/patches/patch-aj
@@ -0,0 +1,13 @@
+$NetBSD: patch-aj,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/folder.c.orig 2006-03-02 20:53:46.000000000 +0000
++++ uip/folder.c
+@@ -62,8 +62,6 @@ static struct swit switches[] = {
+ { NULL, 0 }
+ };
+
+-extern int errno;
+-
+ static int fshort = 0; /* output only folder names */
+ static int fcreat = 0; /* should we ask to create new folders? */
+ static int fpack = 0; /* are we packing the folder? */
diff --git a/mail/nmh/patches/patch-ak b/mail/nmh/patches/patch-ak
new file mode 100644
index 00000000000..d121f9f559f
--- /dev/null
+++ b/mail/nmh/patches/patch-ak
@@ -0,0 +1,13 @@
+$NetBSD: patch-ak,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mhbuild.c.orig 2006-03-02 20:54:32.000000000 +0000
++++ uip/mhbuild.c
+@@ -64,8 +64,6 @@ static struct swit switches[] = {
+ };
+
+
+-extern int errno;
+-
+ /* mhbuildsbr.c */
+ extern int checksw;
+ extern char *tmp; /* directory to place temp files */
diff --git a/mail/nmh/patches/patch-al b/mail/nmh/patches/patch-al
new file mode 100644
index 00000000000..d2bc143fb90
--- /dev/null
+++ b/mail/nmh/patches/patch-al
@@ -0,0 +1,12 @@
+$NetBSD: patch-al,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mhcachesbr.c.orig 2006-03-02 20:55:34.000000000 +0000
++++ uip/mhcachesbr.c
+@@ -34,7 +34,6 @@
+ #endif
+
+
+-extern int errno;
+ extern int debugsw;
+
+ extern pid_t xpid; /* mhshowsbr.c or mhbuildsbr.c */
diff --git a/mail/nmh/patches/patch-am b/mail/nmh/patches/patch-am
new file mode 100644
index 00000000000..f912118c653
--- /dev/null
+++ b/mail/nmh/patches/patch-am
@@ -0,0 +1,13 @@
+$NetBSD: patch-am,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mhlistsbr.c.orig 2006-03-02 20:57:04.000000000 +0000
++++ uip/mhlistsbr.c
+@@ -16,8 +16,6 @@
+ #include <h/mime.h>
+ #include <h/mhparse.h>
+
+-extern int errno;
+-
+ /* mhmisc.c */
+ int part_ok (CT, int);
+ int type_ok (CT, int);
diff --git a/mail/nmh/patches/patch-an b/mail/nmh/patches/patch-an
new file mode 100644
index 00000000000..9536ba168b7
--- /dev/null
+++ b/mail/nmh/patches/patch-an
@@ -0,0 +1,12 @@
+$NetBSD: patch-an,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mhoutsbr.c.orig 2006-03-02 20:57:31.000000000 +0000
++++ uip/mhoutsbr.c
+@@ -22,7 +22,6 @@
+ #endif
+
+
+-extern int errno;
+ extern int ebcdicsw;
+
+ static char ebcdicsafe[0x100] = {
diff --git a/mail/nmh/patches/patch-ao b/mail/nmh/patches/patch-ao
new file mode 100644
index 00000000000..6822e0c2839
--- /dev/null
+++ b/mail/nmh/patches/patch-ao
@@ -0,0 +1,12 @@
+$NetBSD: patch-ao,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mhmisc.c.orig 2006-03-02 20:57:53.000000000 +0000
++++ uip/mhmisc.c
+@@ -10,7 +10,6 @@
+ #include <h/mime.h>
+ #include <h/mhparse.h>
+
+-extern int errno;
+ extern int debugsw;
+
+ /*
diff --git a/mail/nmh/patches/patch-ap b/mail/nmh/patches/patch-ap
new file mode 100644
index 00000000000..cc671bfba2f
--- /dev/null
+++ b/mail/nmh/patches/patch-ap
@@ -0,0 +1,13 @@
+$NetBSD: patch-ap,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mhfree.c.orig 2006-03-02 20:58:16.000000000 +0000
++++ uip/mhfree.c
+@@ -11,8 +11,6 @@
+ #include <h/mime.h>
+ #include <h/mhparse.h>
+
+-extern int errno;
+-
+ /*
+ * prototypes
+ */
diff --git a/mail/nmh/patches/patch-aq b/mail/nmh/patches/patch-aq
new file mode 100644
index 00000000000..34fb7a658fe
--- /dev/null
+++ b/mail/nmh/patches/patch-aq
@@ -0,0 +1,13 @@
+$NetBSD: patch-aq,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mhlist.c.orig 2006-03-02 20:58:40.000000000 +0000
++++ uip/mhlist.c
+@@ -69,8 +69,6 @@ static struct swit switches[] = {
+ };
+
+
+-extern int errno;
+-
+ /* mhparse.c */
+ extern int checksw;
+ extern char *tmp; /* directory to place temp files */
diff --git a/mail/nmh/patches/patch-ar b/mail/nmh/patches/patch-ar
new file mode 100644
index 00000000000..6a2d64fec28
--- /dev/null
+++ b/mail/nmh/patches/patch-ar
@@ -0,0 +1,12 @@
+$NetBSD: patch-ar,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mhparse.c.orig 2006-03-02 20:59:04.000000000 +0000
++++ uip/mhparse.c
+@@ -22,7 +22,6 @@
+ #endif
+
+
+-extern int errno;
+ extern int debugsw;
+
+ extern int endian; /* mhmisc.c */
diff --git a/mail/nmh/patches/patch-as b/mail/nmh/patches/patch-as
new file mode 100644
index 00000000000..7b805c61c2e
--- /dev/null
+++ b/mail/nmh/patches/patch-as
@@ -0,0 +1,13 @@
+$NetBSD: patch-as,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mhn.c.orig 2006-03-02 20:59:32.000000000 +0000
++++ uip/mhn.c
+@@ -127,8 +127,6 @@ static struct swit switches[] = {
+ };
+
+
+-extern int errno;
+-
+ /* mhparse.c */
+ extern int checksw;
+ extern char *tmp; /* directory to place temp files */
diff --git a/mail/nmh/patches/patch-at b/mail/nmh/patches/patch-at
new file mode 100644
index 00000000000..f3cf514eb7e
--- /dev/null
+++ b/mail/nmh/patches/patch-at
@@ -0,0 +1,12 @@
+$NetBSD: patch-at,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mhshowsbr.c.orig 2006-03-02 20:59:58.000000000 +0000
++++ uip/mhshowsbr.c
+@@ -31,7 +31,6 @@
+ # define siglongjmp(env,val) longjmp(env,val)
+ #endif
+
+-extern int errno;
+ extern int debugsw;
+
+ int pausesw = 1;
diff --git a/mail/nmh/patches/patch-au b/mail/nmh/patches/patch-au
new file mode 100644
index 00000000000..56f3a4a3d5f
--- /dev/null
+++ b/mail/nmh/patches/patch-au
@@ -0,0 +1,13 @@
+$NetBSD: patch-au,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mhstoresbr.c.orig 2006-03-02 21:00:24.000000000 +0000
++++ uip/mhstoresbr.c
+@@ -17,8 +17,6 @@
+ #include <h/mime.h>
+ #include <h/mhparse.h>
+
+-extern int errno;
+-
+ /*
+ * The list of top-level contents to display
+ */
diff --git a/mail/nmh/patches/patch-av b/mail/nmh/patches/patch-av
new file mode 100644
index 00000000000..d855a011f63
--- /dev/null
+++ b/mail/nmh/patches/patch-av
@@ -0,0 +1,13 @@
+$NetBSD: patch-av,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mhshow.c.orig 2006-03-02 21:00:48.000000000 +0000
++++ uip/mhshow.c
+@@ -83,8 +83,6 @@ static struct swit switches[] = {
+ };
+
+
+-extern int errno;
+-
+ /* mhparse.c */
+ extern int checksw;
+ extern char *tmp; /* directory to place temp files */
diff --git a/mail/nmh/patches/patch-aw b/mail/nmh/patches/patch-aw
new file mode 100644
index 00000000000..8db06e56df4
--- /dev/null
+++ b/mail/nmh/patches/patch-aw
@@ -0,0 +1,13 @@
+$NetBSD: patch-aw,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mhstore.c.orig 2006-03-02 21:01:09.000000000 +0000
++++ uip/mhstore.c
+@@ -65,8 +65,6 @@ static struct swit switches[] = {
+ };
+
+
+-extern int errno;
+-
+ /* mhparse.c */
+ extern int checksw;
+ extern char *tmp; /* directory to place temp files */
diff --git a/mail/nmh/patches/patch-ax b/mail/nmh/patches/patch-ax
new file mode 100644
index 00000000000..99e56cbf0f8
--- /dev/null
+++ b/mail/nmh/patches/patch-ax
@@ -0,0 +1,21 @@
+$NetBSD: patch-ax,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mshcmds.c.orig 2006-03-02 21:02:23.000000000 +0000
++++ uip/mshcmds.c
+@@ -18,8 +18,6 @@
+ #include <h/msh.h>
+ #include <h/picksbr.h>
+
+-extern int errno;
+-
+ static char delim3[] = "-------"; /* from burst.c */
+
+ static int mhlnum;
+@@ -3006,7 +3004,6 @@ process (int msgnum, char *proc, int vec
+ strncpy (tmpfil, m_scratch ("", invo_name), sizeof(tmpfil));
+ if ((out = fopen (tmpfil, "w")) == NULL) {
+ int olderr;
+- extern int errno;
+ char newfil[80];
+
+ olderr = errno;
diff --git a/mail/nmh/patches/patch-ay b/mail/nmh/patches/patch-ay
new file mode 100644
index 00000000000..dd364c44fef
--- /dev/null
+++ b/mail/nmh/patches/patch-ay
@@ -0,0 +1,24 @@
+$NetBSD: patch-ay,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/scansbr.c.orig 2006-03-02 21:05:07.000000000 +0000
++++ uip/scansbr.c
+@@ -245,6 +245,8 @@ body:;
+ while (state == BODY) {
+ #ifdef LINUX_STDIO
+ if (scnout->_IO_write_ptr == scnout->_IO_write_end) {
++#elif defined(__DragonFly__)
++ if (((struct __FILE_public *)scnout)->_w <= 0) {
+ #else
+ if (scnout->_cnt <= 0) {
+ #endif
+@@ -255,6 +257,10 @@ body:;
+ state = m_getfld(state, name, scnout->_IO_write_ptr,
+ (long)scnout->_IO_write_ptr-(long)scnout->_IO_write_end , inb);
+ scnout->_IO_write_ptr += msg_count;
++#elif defined(__DragonFly__)
++ state = m_getfld( state, name, ((struct __FILE_public *)scnout)->_p, -(((struct __FILE_public *)scnout)->_w), inb );
++ ((struct __FILE_public *)scnout)->_w -= msg_count;
++ ((struct __FILE_public *)scnout)->_p += msg_count;
+ #else
+ state = m_getfld( state, name, scnout->_ptr, -(scnout->_cnt), inb );
+ scnout->_cnt -= msg_count;
diff --git a/mail/nmh/patches/patch-az b/mail/nmh/patches/patch-az
new file mode 100644
index 00000000000..137b96921fa
--- /dev/null
+++ b/mail/nmh/patches/patch-az
@@ -0,0 +1,13 @@
+$NetBSD: patch-az,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/dropsbr.c.orig 2006-03-02 21:07:50.000000000 +0000
++++ uip/dropsbr.c
+@@ -31,8 +31,6 @@
+
+ #include <fcntl.h>
+
+-extern int errno;
+-
+ /*
+ * static prototypes
+ */
diff --git a/mail/nmh/patches/patch-ba b/mail/nmh/patches/patch-ba
new file mode 100644
index 00000000000..16cb135c526
--- /dev/null
+++ b/mail/nmh/patches/patch-ba
@@ -0,0 +1,13 @@
+$NetBSD: patch-ba,v 1.5 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/packf.c.orig 2006-03-02 21:08:22.000000000 +0000
++++ uip/packf.c
+@@ -31,8 +31,6 @@ static struct swit switches[] = {
+ { NULL, 0 }
+ };
+
+-extern int errno;
+-
+ static int md = NOTOK;
+ static int mbx_style = MBOX_FORMAT;
+ static int mapping = 0;
diff --git a/mail/nmh/patches/patch-bb b/mail/nmh/patches/patch-bb
new file mode 100644
index 00000000000..b43f2662b55
--- /dev/null
+++ b/mail/nmh/patches/patch-bb
@@ -0,0 +1,13 @@
+$NetBSD: patch-bb,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/prompter.c.orig 2006-03-02 21:09:23.000000000 +0000
++++ uip/prompter.c
+@@ -60,8 +60,6 @@ static struct swit switches[] = {
+ { NULL, 0 }
+ };
+
+-extern int errno;
+-
+ #ifdef HAVE_TERMIOS_H
+ static struct termios tio;
+ # define ERASE tio.c_cc[VERASE]
diff --git a/mail/nmh/patches/patch-bc b/mail/nmh/patches/patch-bc
new file mode 100644
index 00000000000..7f1f2ac5e54
--- /dev/null
+++ b/mail/nmh/patches/patch-bc
@@ -0,0 +1,13 @@
+$NetBSD: patch-bc,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/refile.c.orig 2006-03-02 21:09:49.000000000 +0000
++++ uip/refile.c
+@@ -47,8 +47,6 @@ static struct swit switches[] = {
+ { NULL, 0 }
+ };
+
+-extern int errno;
+-
+ static char maildir[BUFSIZ];
+
+ struct st_fold {
diff --git a/mail/nmh/patches/patch-bd b/mail/nmh/patches/patch-bd
new file mode 100644
index 00000000000..59dbb37f844
--- /dev/null
+++ b/mail/nmh/patches/patch-bd
@@ -0,0 +1,13 @@
+$NetBSD: patch-bd,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/scan.c.orig 2006-03-02 21:11:26.000000000 +0000
++++ uip/scan.c
+@@ -47,8 +47,6 @@ static struct swit switches[] = {
+ { NULL, 0 }
+ };
+
+-extern int errno;
+-
+ /*
+ * global for sbr/formatsbr.c - yech!
+ */
diff --git a/mail/nmh/patches/patch-be b/mail/nmh/patches/patch-be
new file mode 100644
index 00000000000..59ab75d4c50
--- /dev/null
+++ b/mail/nmh/patches/patch-be
@@ -0,0 +1,13 @@
+$NetBSD: patch-be,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/send.c.orig 2006-03-02 21:11:50.000000000 +0000
++++ uip/send.c
+@@ -111,8 +111,6 @@ extern char *altmsg; /* .. */
+ extern char *annotext;
+ extern char *distfile;
+
+-extern int errno;
+-
+ int
+ main (int argc, char **argv)
+ {
diff --git a/mail/nmh/patches/patch-bf b/mail/nmh/patches/patch-bf
new file mode 100644
index 00000000000..18d861ab358
--- /dev/null
+++ b/mail/nmh/patches/patch-bf
@@ -0,0 +1,12 @@
+$NetBSD: patch-bf,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/viamail.c.orig 2006-03-02 21:12:25.000000000 +0000
++++ uip/viamail.c
+@@ -48,7 +48,6 @@ static struct swit switches[] = {
+ { NULL, 0 }
+ };
+
+-extern int errno;
+ extern int debugsw;
+ extern int splitsw;
+ extern int verbsw;
diff --git a/mail/nmh/patches/patch-bg b/mail/nmh/patches/patch-bg
new file mode 100644
index 00000000000..585ddf80803
--- /dev/null
+++ b/mail/nmh/patches/patch-bg
@@ -0,0 +1,13 @@
+$NetBSD: patch-bg,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/rcvstore.c.orig 2006-03-02 21:12:52.000000000 +0000
++++ uip/rcvstore.c
+@@ -38,8 +38,6 @@ static struct swit switches[] = {
+ { NULL, 0 }
+ };
+
+-extern int errno;
+-
+ /*
+ * name of temporary file to store incoming message
+ */
diff --git a/mail/nmh/patches/patch-bh b/mail/nmh/patches/patch-bh
new file mode 100644
index 00000000000..b1a627e16be
--- /dev/null
+++ b/mail/nmh/patches/patch-bh
@@ -0,0 +1,13 @@
+$NetBSD: patch-bh,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/mhtest.c.orig 2006-03-02 21:13:22.000000000 +0000
++++ uip/mhtest.c
+@@ -63,8 +63,6 @@ static struct swit switches[] = {
+ };
+
+
+-extern int errno;
+-
+ int ebcdicsw = 0; /* hack for linking purposes */
+
+ /* mhparse.c */
diff --git a/mail/nmh/patches/patch-bi b/mail/nmh/patches/patch-bi
new file mode 100644
index 00000000000..f4984aa8f57
--- /dev/null
+++ b/mail/nmh/patches/patch-bi
@@ -0,0 +1,13 @@
+$NetBSD: patch-bi,v 1.1 2006/03/02 21:28:23 joerg Exp $
+
+--- uip/inc.c.orig 2006-03-02 21:13:52.000000000 +0000
++++ uip/inc.c
+@@ -113,8 +113,6 @@ static struct swit switches[] = {
+ { NULL, 0 }
+ };
+
+-extern int errno;
+-
+ /*
+ * flags for the mail source
+ */