summaryrefslogtreecommitdiff
path: root/mail/ja-mh
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2006-04-11 15:08:38 +0000
committerjoerg <joerg@pkgsrc.org>2006-04-11 15:08:38 +0000
commit3b6df974e14b3a39c84f9020a7d361f38198a3ed (patch)
tree5c21a304bfe4cec3a6c5e6ab79fe1c4aca0646be /mail/ja-mh
parent6e38cf71ae5bfe0c17d0ded676eec7c86eb362cb (diff)
downloadpkgsrc-3b6df974e14b3a39c84f9020a7d361f38198a3ed.tar.gz
Add DragonFly support. Fix errno usage. Remove special-casing
of FreeBSD-like systems with objformat, we want minor shared library numbers.
Diffstat (limited to 'mail/ja-mh')
-rw-r--r--mail/ja-mh/distinfo33
-rw-r--r--mail/ja-mh/patches/patch-ab21
-rw-r--r--mail/ja-mh/patches/patch-ac24
-rw-r--r--mail/ja-mh/patches/patch-ad13
-rw-r--r--mail/ja-mh/patches/patch-ae14
-rw-r--r--mail/ja-mh/patches/patch-af14
-rw-r--r--mail/ja-mh/patches/patch-ag110
-rw-r--r--mail/ja-mh/patches/patch-ah26
-rw-r--r--mail/ja-mh/patches/patch-ai25
-rw-r--r--mail/ja-mh/patches/patch-aj15
-rw-r--r--mail/ja-mh/patches/patch-ak12
-rw-r--r--mail/ja-mh/patches/patch-al44
-rw-r--r--mail/ja-mh/patches/patch-am15
-rw-r--r--mail/ja-mh/patches/patch-ao15
-rw-r--r--mail/ja-mh/patches/patch-ap22
-rw-r--r--mail/ja-mh/patches/patch-aq13
-rw-r--r--mail/ja-mh/patches/patch-ar25
-rw-r--r--mail/ja-mh/patches/patch-av15
-rw-r--r--mail/ja-mh/patches/patch-ax15
-rw-r--r--mail/ja-mh/patches/patch-ay12
-rw-r--r--mail/ja-mh/patches/patch-az15
-rw-r--r--mail/ja-mh/patches/patch-ba22
-rw-r--r--mail/ja-mh/patches/patch-bb15
-rw-r--r--mail/ja-mh/patches/patch-bc14
-rw-r--r--mail/ja-mh/patches/patch-bd14
-rw-r--r--mail/ja-mh/patches/patch-be14
-rw-r--r--mail/ja-mh/patches/patch-bf12
-rw-r--r--mail/ja-mh/patches/patch-bg15
-rw-r--r--mail/ja-mh/patches/patch-bh13
-rw-r--r--mail/ja-mh/patches/patch-bi16
30 files changed, 615 insertions, 18 deletions
diff --git a/mail/ja-mh/distinfo b/mail/ja-mh/distinfo
index eb08dcb145c..32f43699a47 100644
--- a/mail/ja-mh/distinfo
+++ b/mail/ja-mh/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2005/12/05 20:50:32 rillig Exp $
+$NetBSD: distinfo,v 1.9 2006/04/11 15:08:38 joerg Exp $
SHA1 (mh-6.8.4-JP-3.05.tar.gz) = cb531f80be4326cd56d33d6fa9efba4d2d63d0ce
RMD160 (mh-6.8.4-JP-3.05.tar.gz) = a092a9447370a09f770121baa2ae7eced130ff0f
@@ -16,9 +16,36 @@ SHA1 (mh-6.8.4-JP-3.05-20031106.patch.gz) = daaf41afb5e83143dceb5ae6444e26f1f9ca
RMD160 (mh-6.8.4-JP-3.05-20031106.patch.gz) = b0585c5c5aebdafa619e129917f0b7d7db987b02
Size (mh-6.8.4-JP-3.05-20031106.patch.gz) = 311 bytes
SHA1 (patch-aa) = 59b734fb27a8a5ccea529044bf5bd2f09965be85
-SHA1 (patch-al) = 59bd51d6b67beb0492b3a3d3acc05242474bac7b
+SHA1 (patch-ab) = d322f0400d065bc4152f681969ea858dfc2d87a9
+SHA1 (patch-ac) = ea10c3b0b230932a256fd9069b0aab34c7de92bb
+SHA1 (patch-ad) = 64d97e58ae75179f4be6222279aa6a470e37ac00
+SHA1 (patch-ae) = 7b39981a32d4a74bc7bd7c4b9a51300c73ff381a
+SHA1 (patch-af) = 3d477e8febb0af5605b8570bf03d77e1dbf64ab8
+SHA1 (patch-ag) = 863812f108d4d25b44c62996a50aafa8dbed2880
+SHA1 (patch-ah) = 6dcd2fffe854da65ecbf2ec4817d5f66ec7ca92e
+SHA1 (patch-ai) = 4f6e6ff7fa4b331d16edd27cff565eb022813443
+SHA1 (patch-aj) = 3fb227132f1556a864bd892fea30a2cdf99968e8
+SHA1 (patch-ak) = 97f021754702266996a05f8a665cd5dcc9168f60
+SHA1 (patch-al) = b91ccc3db1f1b889c9cd7d9c74b31a9c8f1b8993
+SHA1 (patch-am) = 5b94f3831692c3a23dd86b0a5cc4842712318ff2
+SHA1 (patch-ao) = 903d65929397ee283beb6aec93e08c32794dc709
+SHA1 (patch-ap) = 7c4069eb87ddca9d1d294b57681d51a393eab3f0
+SHA1 (patch-aq) = 7410ea8359575a89fb489403ab0ab76ff0c24a26
+SHA1 (patch-ar) = 7b3f65a4ff93c428dc4def0d4e3fe993bae7266b
SHA1 (patch-as) = 786c7bf7988806023d9fd5a2ced5a9d31550ff54
SHA1 (patch-at) = 5594d3beac4e911cfa3ff277d4ae034a6dccdccb
SHA1 (patch-au) = 3788f6ca9362a97323cc6bf0f942f2ba949e1c46
-SHA1 (patch-av) = 2f25ebe4272bbad270b6286d2eb1dce5ddae690e
+SHA1 (patch-av) = 14d79f16dcc7f5fe76caec499c9043fbc6874d06
SHA1 (patch-aw) = 8cfee271b0549e6886e29ae74e4e547dccc20230
+SHA1 (patch-ax) = d0b559c1d9f72c413ca8764ddf0794a086c19307
+SHA1 (patch-ay) = f62ad194e1bf70054ff833c094206f7754478a6f
+SHA1 (patch-az) = de12b9fc05d022a9850108541378f25249918182
+SHA1 (patch-ba) = 4e0880360e484f6b74c45870e97f6f89d3a87a76
+SHA1 (patch-bb) = a7ec0a5f4f96ca2e945dc1d133322852ec1d46dd
+SHA1 (patch-bc) = 44fc56c7bccca8c8d7c77a1a7eecfd2391228402
+SHA1 (patch-bd) = 448da6011564280649930b43fbf0d793030012b7
+SHA1 (patch-be) = a72a8a4e251a1329cc86d60b24cf7977c5f5482b
+SHA1 (patch-bf) = 6510f0ac0b88c1f08622948ba070f450cbcf02e1
+SHA1 (patch-bg) = 46a1d43ad4496ee2f4d031751f13ba48c4e492d4
+SHA1 (patch-bh) = f40cc4c0859f5e1bad7daabab99a33249561c061
+SHA1 (patch-bi) = c00381964adedd04613429c6adc9d9a91aac50b7
diff --git a/mail/ja-mh/patches/patch-ab b/mail/ja-mh/patches/patch-ab
new file mode 100644
index 00000000000..f71f72011b3
--- /dev/null
+++ b/mail/ja-mh/patches/patch-ab
@@ -0,0 +1,21 @@
+$NetBSD: patch-ab,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- zotnet/mts/client.c.orig 2006-04-11 13:04:19.000000000 +0000
++++ zotnet/mts/client.c
+@@ -52,7 +52,6 @@ static Key_schedule schedule;
+
+ /* */
+
+-extern int errno;
+ #if !defined(BSD44) && !defined(__GNU_LIBRARY__)
+ extern int sys_nerr;
+ extern char *sys_errlist[];
+@@ -361,7 +360,7 @@ int net;
+
+ #if !defined(SOLARIS) && !defined(linux) && !defined(__bsdi__) && \
+ !defined(OSF1) && !defined(__osf__) && !defined(__FreeBSD__) && \
+- !defined(__NetBSD__) && !defined(__OpenBSD__)
++ !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
+ #ifndef DG
+ #ifndef __alpha
+ u_long inet_addr ();
diff --git a/mail/ja-mh/patches/patch-ac b/mail/ja-mh/patches/patch-ac
new file mode 100644
index 00000000000..5f6484c7fc0
--- /dev/null
+++ b/mail/ja-mh/patches/patch-ac
@@ -0,0 +1,24 @@
+$NetBSD: patch-ac,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- configure.orig 2001-06-14 16:41:51.000000000 +0000
++++ configure
+@@ -1393,18 +1393,10 @@ case "$host_os" in
+ SOLARIS=`echo "$host_os" | $AWK -F. '{printf "SOLARIS=2%02d%02d",$2,$3}'`
+ SETEUID=`echo "$host_os" | $AWK -F. '$2>=3{printf "SETEUID"}'`
+ ;;
+- freebsd* | netbsd*)
++ freebsd* | netbsd* | dragonfly*)
+ if test "$use_sharedlib" != no
+ then
+ sharedlib=fbsd
+- if test -x /usr/bin/objformat
+- then
+- if test x`/usr/bin/objformat` = xelf
+- then
+- sharedlib=gnuelf
+- make_mhconfig='CFLAGS="-O -DMHSLIB_NOMINVER"'
+- fi
+- fi
+ echo __ELF__ | $CC -E - | grep -q __ELF__ || sharedlib=gnuelf
+ slflags="-fpic"
+ slibdir=$libdir
diff --git a/mail/ja-mh/patches/patch-ad b/mail/ja-mh/patches/patch-ad
new file mode 100644
index 00000000000..1da3b2fd07a
--- /dev/null
+++ b/mail/ja-mh/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- sbr/discard.c.orig 2006-04-11 13:20:41.000000000 +0000
++++ sbr/discard.c
+@@ -61,7 +61,7 @@ FILE *io;
+ #endif /* SYS5 */
+ #endif /* POSIX */
+
+-#ifdef _FSTDIO
++#if defined(_FSTDIO) || defined(__DragonFly__)
+ fpurge (io);
+ #else
+ #ifdef _STDIO_USES_IOSTREAM
diff --git a/mail/ja-mh/patches/patch-ae b/mail/ja-mh/patches/patch-ae
new file mode 100644
index 00000000000..3e03ed0c3e9
--- /dev/null
+++ b/mail/ja-mh/patches/patch-ae
@@ -0,0 +1,14 @@
+$NetBSD: patch-ae,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- sbr/m_draft.c.orig 2006-04-11 13:13:52.000000000 +0000
++++ sbr/m_draft.c
+@@ -10,9 +10,6 @@ static char ident[] = "@(#)$Id: m_draft.
+ #include <sys/stat.h>
+
+
+-extern int errno;
+-
+-
+ char *m_draft (folder, msg, use, isdf)
+ register char *folder,
+ *msg;
diff --git a/mail/ja-mh/patches/patch-af b/mail/ja-mh/patches/patch-af
new file mode 100644
index 00000000000..be9a84329eb
--- /dev/null
+++ b/mail/ja-mh/patches/patch-af
@@ -0,0 +1,14 @@
+$NetBSD: patch-af,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- sbr/m_getdefs.c.orig 2006-04-11 13:14:22.000000000 +0000
++++ sbr/m_getdefs.c
+@@ -13,9 +13,6 @@ static char ident[] = "@(#)$Id: m_getdef
+ #include <sys/stat.h>
+ #include <pwd.h>
+
+-
+-extern int errno;
+-
+ #ifndef __STDC__
+ #ifdef SYS5
+ struct passwd *getpwuid ();
diff --git a/mail/ja-mh/patches/patch-ag b/mail/ja-mh/patches/patch-ag
new file mode 100644
index 00000000000..10fb8bd58c7
--- /dev/null
+++ b/mail/ja-mh/patches/patch-ag
@@ -0,0 +1,110 @@
+$NetBSD: patch-ag,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- sbr/m_getfld.c.orig 2001-06-13 14:21:02.000000000 +0000
++++ sbr/m_getfld.c
+@@ -186,6 +186,9 @@ static int (*eom_action) () = NULL;
+ #define _cnt _r /* Retch */
+ #define _filbuf __srget /* Puke */
+ #endif
++#ifdef __DragonFly__)
++#define _filbuf __srget /* Puke */
++#endif
+
+ /* */
+
+@@ -302,6 +305,9 @@ register FILE *iob;
+ 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;
+@@ -332,6 +338,9 @@ register FILE *iob;
+ } else {
+ #ifdef _STDIO_USES_IOSTREAM
+ 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;
+@@ -377,6 +386,8 @@ register FILE *iob;
+ #ifdef _STDIO_USES_IOSTREAM
+ 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;
+ #endif
+@@ -390,6 +401,10 @@ register FILE *iob;
+ j = ep - (unsigned char *) iob->_IO_read_ptr;
+ (void) bcopy( iob->_IO_read_ptr, cp, j);
+ iob->_IO_read_ptr = ep;
++#elif defined(__DragonFly__)
++ j = ep - (unsigned char *) ((struct __FILE_public *)iob)->_p;
++ (void) bcopy( ((struct __FILE_public *)iob)->_p, cp, j);
++ ((struct __FILE_public *)iob)->_p = ep; ((struct __FILE_public *)iob)->_r -= j;
+ #else
+ j = ep - (unsigned char *) iob->_ptr;
+ (void) bcopy( iob->_ptr, cp, j);
+@@ -407,6 +422,9 @@ register FILE *iob;
+ #ifdef _STDIO_USES_IOSTREAM
+ c += bp - (unsigned char *) iob->_IO_read_ptr;
+ (void) bcopy( iob->_IO_read_ptr, cp, c);
++#elif defined(__DragonFly__)
++ c += bp - (unsigned char *) ((struct __FILE_public *)iob)->_p;
++ (void) bcopy( ((struct __FILE_public *)iob)->_p, cp, c);
+ #else
+ c += bp - (unsigned char *) iob->_ptr;
+ (void) bcopy( iob->_ptr, cp, c);
+@@ -416,6 +434,8 @@ register FILE *iob;
+ /* the dest buffer is full */
+ #ifdef _STDIO_USES_IOSTREAM
+ 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;
+ #endif
+@@ -434,6 +454,8 @@ register FILE *iob;
+ iob->_IO_read_ptr = iob->_IO_read_end;
+ c = __underflow((struct _IO_FILE *) iob);
+ iob->_IO_read_ptr++; /* NOT automatic! */
++#elif defined(__DragonFly__)
++ *cp++ = j = *(((struct __FILE_public *)iob)->_p + c);
+ #else
+ *cp++ = j = *(iob->_ptr + c);
+ #ifdef FILBUF_ADJ
+@@ -467,6 +489,8 @@ register FILE *iob;
+ if (c != EOF)
+ #ifdef _STDIO_USES_IOSTREAM
+ --iob->_IO_read_ptr;
++#elif defined(__DragonFly__)
++ --((struct __FILE_public *)iob)->_p, ++((struct __FILE_public *)iob)->_r;
+ #else
+ --iob->_ptr, ++iob->_cnt;
+ #endif
+@@ -488,6 +512,8 @@ register FILE *iob;
+ #ifdef _STDIO_USES_IOSTREAM
+ 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;
+ #endif
+@@ -549,6 +575,9 @@ register FILE *iob;
+ (void) bcopy( bp, buf, c );
+ #ifdef _STDIO_USES_IOSTREAM
+ 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/ja-mh/patches/patch-ah b/mail/ja-mh/patches/patch-ah
new file mode 100644
index 00000000000..7607e50a976
--- /dev/null
+++ b/mail/ja-mh/patches/patch-ah
@@ -0,0 +1,26 @@
+$NetBSD: patch-ah,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- sbr/makedir.c.orig 2006-04-11 13:36:24.000000000 +0000
++++ sbr/makedir.c
+@@ -14,10 +14,11 @@ static char ident[] = "@(#)$Id: makedir.
+ #include "../h/mh.h"
+ #include <stdio.h>
+
++#include <errno.h>
++
+ #if defined (BSD42) || defined(SVR4) || \
+ defined (hpux) || defined(sgi) || defined(__osf__) || defined(ncr) || \
+ defined (_AIX) || defined(AUX) || defined(linux) || defined(__CYGWIN32__)
+-#include <errno.h>
+ #include <sys/param.h>
+ #include <sys/file.h>
+ #endif /* BSD42 ... */
+@@ -29,8 +30,6 @@ static char ident[] = "@(#)$Id: makedir.
+ #include <unistd.h>
+ #endif
+
+-extern int errno;
+-
+ makedir (dir)
+ register char *dir;
+ {
diff --git a/mail/ja-mh/patches/patch-ai b/mail/ja-mh/patches/patch-ai
new file mode 100644
index 00000000000..0457fb5095a
--- /dev/null
+++ b/mail/ja-mh/patches/patch-ai
@@ -0,0 +1,25 @@
+$NetBSD: patch-ai,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- sbr/ruserpass.c.orig 2006-04-11 13:37:37.000000000 +0000
++++ sbr/ruserpass.c
+@@ -25,9 +25,10 @@ static char sccsid[] = "@(#)ruserpass.c
+ #include <ctype.h>
+ #include <pwd.h>
+ #include <errno.h>
++#include <string.h>
++#include <stdlib.h>
+
+-char *malloc(), *index(), *getenv(), *getpass(), *getlogin();
+-char *strcpy();
++char *index(), *getpass(), *getlogin();
+ static FILE *cfile;
+
+ #ifndef MAXHOSTNAMELEN
+@@ -66,7 +67,6 @@ ruserpass(host, aname, apass)
+ char myname[MAXHOSTNAMELEN], *mydomain;
+ int t, i, c, usedefault = 0;
+ struct stat stb;
+- extern int errno;
+
+ hdir = getenv("HOME");
+ if (hdir == NULL)
diff --git a/mail/ja-mh/patches/patch-aj b/mail/ja-mh/patches/patch-aj
new file mode 100644
index 00000000000..52f629e2e15
--- /dev/null
+++ b/mail/ja-mh/patches/patch-aj
@@ -0,0 +1,15 @@
+$NetBSD: patch-aj,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- sbr/advertise.c.orig 2006-04-11 13:42:29.000000000 +0000
++++ sbr/advertise.c
+@@ -15,10 +15,7 @@ static char ident[] = "@(#)$Id: advertis
+ output... More importantly though, it's a sexy syscall()...
+ */
+
+-#ifdef __CYGWIN32__
+ #include <errno.h>
+-#endif
+-extern int errno;
+ #if !defined(BSD44) && !defined(__GNU_LIBRARY__) /* in <stdio.h> */
+ extern int sys_nerr;
+ extern char *sys_errlist[];
diff --git a/mail/ja-mh/patches/patch-ak b/mail/ja-mh/patches/patch-ak
new file mode 100644
index 00000000000..6b34eb473ec
--- /dev/null
+++ b/mail/ja-mh/patches/patch-ak
@@ -0,0 +1,12 @@
+$NetBSD: patch-ak,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/annosbr.c.orig 2006-04-11 13:45:01.000000000 +0000
++++ uip/annosbr.c
+@@ -11,7 +11,6 @@ static char ident[] = "@(#)$Id: annosbr.
+ #include <sys/stat.h>
+
+
+-extern int errno;
+ off_t lseek ();
+ static annosbr();
+
diff --git a/mail/ja-mh/patches/patch-al b/mail/ja-mh/patches/patch-al
index 2d19a971ba3..52d168d4900 100644
--- a/mail/ja-mh/patches/patch-al
+++ b/mail/ja-mh/patches/patch-al
@@ -1,8 +1,8 @@
-$NetBSD: patch-al,v 1.2 2004/11/29 05:09:43 taca Exp $
+$NetBSD: patch-al,v 1.3 2006/04/11 15:08:38 joerg Exp $
---- uip/vmh.c.orig 2004-10-12 16:02:00.000000000 +0900
+--- uip/vmh.c.orig 2006-04-11 14:16:00.000000000 +0000
+++ uip/vmh.c
-@@ -113,6 +113,9 @@ void __cputchar __P((int));
+@@ -113,13 +113,20 @@ void __cputchar __P((int));
#define SMALLMOVE 1
#define LARGEMOVE 10
@@ -12,7 +12,19 @@ $NetBSD: patch-al,v 1.2 2004/11/29 05:09:43 taca Exp $
#define XYZ /* XXX */
-@@ -222,6 +225,15 @@ static struct ltchars ltc;
+-#if (defined(__FreeBSD__) && __FreeBSD__ >= 5) || (defined(linux))
++#if (defined(__FreeBSD__) && __FreeBSD__ >= 5) || (defined(linux)) || defined(__DragonFly__)
+ struct ldat
+ {
++#ifdef __DragonFly__
++ char *text;
++#else
+ NCURSES_CH_T *text;
++#endif
+ NCURSES_SIZE_T firstchar;
+ NCURSES_SIZE_T lastchar;
+ NCURSES_SIZE_T oldindex;
+@@ -222,6 +229,15 @@ static struct ltchars ltc;
#endif
#endif /* TIOCGLTC */
@@ -28,7 +40,15 @@ $NetBSD: patch-al,v 1.2 2004/11/29 05:09:43 taca Exp $
#if !defined(SYS5) && !defined(BSD44) && !defined(TERMINFO)
int _putchar ();
-@@ -348,7 +360,11 @@ static vmh () {
+@@ -239,7 +255,6 @@ static TYPESIG TSTPser ();
+
+
+ /* MISCELLANY */
+-extern int errno;
+ #if !defined(BSD44) && !defined(__GNU_LIBRARY__)
+ extern int sys_nerr;
+ extern char *sys_errlist[];
+@@ -348,7 +363,11 @@ static vmh () {
wclrtoeol (Command);
wrefresh (Command);
@@ -41,7 +61,7 @@ $NetBSD: patch-al,v 1.2 2004/11/29 05:09:43 taca Exp $
case NOTOK:
break;
-@@ -808,6 +824,9 @@ static int WINinit (nprog) {
+@@ -808,6 +827,9 @@ static int WINinit (nprog) {
sideground ();
#ifndef TERMINFO
@@ -51,7 +71,7 @@ $NetBSD: patch-al,v 1.2 2004/11/29 05:09:43 taca Exp $
if (CM == NULL)
#else /* TERMINFO */
if (cursor_address == NULL) /* assume mtr wanted "cm", not "CM" */
-@@ -822,6 +841,15 @@ static int WINinit (nprog) {
+@@ -822,6 +844,15 @@ static int WINinit (nprog) {
#ifndef TERMINFO
if (tgetflag ("xt") || tgetnum ("sg") > 0)
SO = SE = US = UE = NULL;
@@ -67,7 +87,7 @@ $NetBSD: patch-al,v 1.2 2004/11/29 05:09:43 taca Exp $
#else /* TERMINFO */
/*
* If termcap mapped directly to terminfo, we'd use the following:
-@@ -862,21 +890,36 @@ static int WINinit (nprog) {
+@@ -862,21 +893,36 @@ static int WINinit (nprog) {
/* */
@@ -108,7 +128,7 @@ $NetBSD: patch-al,v 1.2 2004/11/29 05:09:43 taca Exp $
case '\f':
wrefresh (curscr);
break;
-@@ -1382,7 +1425,7 @@ WINDOW *w;
+@@ -1382,7 +1428,7 @@ WINDOW *w;
lp -> l_buf[i] = w -> lines[getcury(w)] -> line[i].ch;
#else
wmove(w, getcury(w), i);
@@ -117,7 +137,7 @@ $NetBSD: patch-al,v 1.2 2004/11/29 05:09:43 taca Exp $
#endif
}
lp -> l_buf[getmaxx(w)] = '\0';
-@@ -1413,8 +1456,12 @@ WINDOW *w;
+@@ -1413,8 +1459,12 @@ WINDOW *w;
}
#endif /* __NCURSES_H */
for (cp = lp -> l_buf + strlen (lp -> l_buf) - 1; cp >= lp -> l_buf; cp--)
@@ -131,7 +151,7 @@ $NetBSD: patch-al,v 1.2 2004/11/29 05:09:43 taca Exp $
else
break;
-@@ -1579,7 +1626,9 @@ static TTYoff () {
+@@ -1579,7 +1629,9 @@ static TTYoff () {
INTR = intrc;
#ifndef SYS5
@@ -141,7 +161,7 @@ $NetBSD: patch-al,v 1.2 2004/11/29 05:09:43 taca Exp $
#else /* SYS5 */
#if defined(TCGETATTR) && !defined(TCSETA) && defined(TCSANOW)
(void) tcsetattr (fileno (stdin), TCSANOW, &sg);
-@@ -1591,6 +1640,9 @@ static TTYoff () {
+@@ -1591,6 +1643,9 @@ static TTYoff () {
leaveok (curscr, TRUE);
mvcur (0, COLS - 1, LINES - 1, 0);
endwin ();
diff --git a/mail/ja-mh/patches/patch-am b/mail/ja-mh/patches/patch-am
new file mode 100644
index 00000000000..1bf0896cf83
--- /dev/null
+++ b/mail/ja-mh/patches/patch-am
@@ -0,0 +1,15 @@
+$NetBSD: patch-am,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- conf/config/mts.c.orig 2006-04-11 13:46:53.000000000 +0000
++++ conf/config/mts.c
+@@ -33,10 +33,7 @@ static char ident[] = "@(#)$Id: mts.c,v
+
+ #define NULLCP ((char *) 0)
+
+-#ifdef __CYGWIN32__
+ #include <errno.h>
+-#endif
+-extern int errno;
+
+ static char *tailor_value ();
+
diff --git a/mail/ja-mh/patches/patch-ao b/mail/ja-mh/patches/patch-ao
new file mode 100644
index 00000000000..80b24e3f71c
--- /dev/null
+++ b/mail/ja-mh/patches/patch-ao
@@ -0,0 +1,15 @@
+$NetBSD: patch-ao,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- zotnet/mts/lock.c.orig 2006-04-11 13:49:57.000000000 +0000
++++ zotnet/mts/lock.c
+@@ -77,10 +77,7 @@ static char ident[] = "@(#)$Id: lock.c,v
+ #define FLOCK /* LOCKF will override this, if defined */
+ #endif
+
+-#ifdef __CYGWIN32__
+ #include <errno.h>
+-#endif
+-extern int errno;
+
+ #ifdef LOCKONLY
+ #ifndef MMDFONLY
diff --git a/mail/ja-mh/patches/patch-ap b/mail/ja-mh/patches/patch-ap
new file mode 100644
index 00000000000..51856ba19fe
--- /dev/null
+++ b/mail/ja-mh/patches/patch-ap
@@ -0,0 +1,22 @@
+$NetBSD: patch-ap,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/folder.c.orig 2006-04-11 14:21:12.000000000 +0000
++++ uip/folder.c
+@@ -74,8 +74,6 @@ static struct swit switches[] = {
+
+ /* */
+
+-extern int errno;
+-
+ static int fshort = 0;
+ static int fcreat = 0;
+ static int fpack = 0;
+@@ -572,7 +570,7 @@ register char *name;
+ }
+ while (dp = readdir (dd))
+ if (strcmp (dp -> d_name, ".") && strcmp (dp -> d_name, "..")) {
+-#if defined(SYS5DIR) && !defined(hpux) && !defined(__CYGWIN32__)
++#if defined(SYS5DIR) && !defined(hpux) && !defined(__CYGWIN32__) && !defined(__DragonFly__)
+ if (cp + dp -> d_reclen + 2 >= name + BUFSIZ)
+ #else /* SYS5DIR && !hpux && !__CYGWIN32__ */
+ if (cp + strlen (dp -> d_name) + 2 >= name + BUFSIZ)
diff --git a/mail/ja-mh/patches/patch-aq b/mail/ja-mh/patches/patch-aq
new file mode 100644
index 00000000000..659c851e431
--- /dev/null
+++ b/mail/ja-mh/patches/patch-aq
@@ -0,0 +1,13 @@
+$NetBSD: patch-aq,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/inc.c.orig 2006-04-11 14:22:52.000000000 +0000
++++ uip/inc.c
+@@ -142,8 +142,6 @@ static struct swit switches[] = {
+
+ /* */
+
+-extern int errno;
+-
+ #ifdef POP
+ int snoop = 0;
+ extern char response[];
diff --git a/mail/ja-mh/patches/patch-ar b/mail/ja-mh/patches/patch-ar
new file mode 100644
index 00000000000..93fe4f4ddd7
--- /dev/null
+++ b/mail/ja-mh/patches/patch-ar
@@ -0,0 +1,25 @@
+$NetBSD: patch-ar,v 1.3 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/scansbr.c.orig 2006-04-11 14:23:48.000000000 +0000
++++ uip/scansbr.c
+@@ -253,6 +253,8 @@ register FILE *inb;
+ while (state == BODY) {
+ #ifdef _STDIO_USES_IOSTREAM
+ if (scnout->_IO_write_ptr == scnout->_IO_write_end) {
++#elif defined(__DragonFly__)
++ if (((struct __FILE_public *)scnout)->_r <= 0) {
+ #else
+ if (scnout->_cnt <= 0) {
+ #endif
+@@ -264,6 +266,11 @@ register FILE *inb;
+ (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)->_r), inb );
++ ((struct __FILE_public *)scnout)->_r -= msg_count;
++ ((struct __FILE_public *)scnout)->_p += msg_count;
+ #else
+ state = m_getfld( state, name, scnout->_ptr,
+ -(scnout->_cnt), inb );
diff --git a/mail/ja-mh/patches/patch-av b/mail/ja-mh/patches/patch-av
index 6f5eacc0628..128096f2407 100644
--- a/mail/ja-mh/patches/patch-av
+++ b/mail/ja-mh/patches/patch-av
@@ -1,8 +1,8 @@
-$NetBSD: patch-av,v 1.2 2005/12/05 20:50:32 rillig Exp $
+$NetBSD: patch-av,v 1.3 2006/04/11 15:08:38 joerg Exp $
---- uip/dropsbr.c.orig 1998-04-24 06:02:00.000000000 +0900
+--- uip/dropsbr.c.orig 1998-04-23 21:02:00.000000000 +0000
+++ uip/dropsbr.c
-@@ -20,6 +20,9 @@
+@@ -20,6 +20,9 @@ static char ident[] = "@(#)$Id: dropsbr.
#undef NULLVP
#include <netinet/in.h>
#else
@@ -12,3 +12,12 @@ $NetBSD: patch-av,v 1.2 2005/12/05 20:50:32 rillig Exp $
#define ntohl(n) (n)
#endif
+@@ -33,8 +36,6 @@ static int mbx_style = MMDF;
+
+ static int mbx_create(), mbx_chk(), map_open();
+
+-extern int errno;
+-
+ off_t lseek ();
+
+ /* */
diff --git a/mail/ja-mh/patches/patch-ax b/mail/ja-mh/patches/patch-ax
new file mode 100644
index 00000000000..7348d42ca69
--- /dev/null
+++ b/mail/ja-mh/patches/patch-ax
@@ -0,0 +1,15 @@
+$NetBSD: patch-ax,v 1.1 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/popsbr.c.orig 2006-04-11 14:26:31.000000000 +0000
++++ uip/popsbr.c
+@@ -27,10 +27,7 @@ static char ident[] = "@(#)$Id: popsbr.c
+ #define TRM "."
+ #define TRMLEN (sizeof TRM - 1)
+
+-#ifdef __CYGWIN32__
+ #include <errno.h>
+-#endif
+-extern int errno;
+ #if !defined(BSD44) && !defined(__GNU_LIBRARY__)
+ extern int sys_nerr;
+ extern char *sys_errlist[];
diff --git a/mail/ja-mh/patches/patch-ay b/mail/ja-mh/patches/patch-ay
new file mode 100644
index 00000000000..1d8c1267128
--- /dev/null
+++ b/mail/ja-mh/patches/patch-ay
@@ -0,0 +1,12 @@
+$NetBSD: patch-ay,v 1.1 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/mhn.c.orig 2006-04-11 14:27:13.000000000 +0000
++++ uip/mhn.c
+@@ -219,7 +219,6 @@ static char *errs = NULL;
+ static char *tmp;
+
+
+-extern int errno;
+ #if !defined(BSD44) && !defined(__GNU_LIBRARY__)
+ extern int sys_nerr;
+ extern char *sys_errlist[];
diff --git a/mail/ja-mh/patches/patch-az b/mail/ja-mh/patches/patch-az
new file mode 100644
index 00000000000..cf28cb3dc95
--- /dev/null
+++ b/mail/ja-mh/patches/patch-az
@@ -0,0 +1,15 @@
+$NetBSD: patch-az,v 1.1 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/ftpsbr.c.orig 2006-04-11 14:28:22.000000000 +0000
++++ uip/ftpsbr.c
+@@ -66,10 +66,7 @@ struct hostent *gethostbystring ();
+
+ /* */
+
+-#ifdef __CYGWIN32__
+ #include <errno.h>
+-#endif
+-extern int errno;
+ #if !defined(BSD44) && !defined(__GNU_LIBRARY__)
+ extern int sys_nerr;
+ extern char *sys_errlist[];
diff --git a/mail/ja-mh/patches/patch-ba b/mail/ja-mh/patches/patch-ba
new file mode 100644
index 00000000000..e7d5e738de5
--- /dev/null
+++ b/mail/ja-mh/patches/patch-ba
@@ -0,0 +1,22 @@
+$NetBSD: patch-ba,v 1.1 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/mshcmds.c.orig 2006-04-11 14:28:57.000000000 +0000
++++ uip/mshcmds.c
+@@ -29,9 +29,6 @@ static char ident[] = "@(#)$Id: mshcmds.
+
+ /* */
+
+-extern int errno;
+-
+- /* BURST */
+ static char delim3[] = "-------";/* from burst.c */
+
+
+@@ -3529,7 +3526,6 @@ char *proc,
+ (void) strcpy (tmpfil, m_scratch ("", invo_name));
+ if ((out = fopen (tmpfil, "w")) == NULL) {
+ int olderr;
+- extern int errno;
+ char newfil[80];
+
+ olderr = errno;
diff --git a/mail/ja-mh/patches/patch-bb b/mail/ja-mh/patches/patch-bb
new file mode 100644
index 00000000000..03b3b906e0a
--- /dev/null
+++ b/mail/ja-mh/patches/patch-bb
@@ -0,0 +1,15 @@
+$NetBSD: patch-bb,v 1.1 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/vmhsbr.c.orig 2006-04-11 14:43:36.000000000 +0000
++++ uip/vmhsbr.c
+@@ -24,10 +24,7 @@ static FILE *fp = NULL;
+ static int PEERrfd = NOTOK;
+ static int PEERwfd = NOTOK;
+
+-#ifdef __CYGWIN32__
+ #include <errno.h>
+-#endif
+-extern int errno;
+ #if !defined(BSD44) && !defined(__GNU_LIBRARY__)
+ extern int sys_nerr;
+ extern char *sys_errlist[];
diff --git a/mail/ja-mh/patches/patch-bc b/mail/ja-mh/patches/patch-bc
new file mode 100644
index 00000000000..ab05eb970fc
--- /dev/null
+++ b/mail/ja-mh/patches/patch-bc
@@ -0,0 +1,14 @@
+$NetBSD: patch-bc,v 1.1 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/packf.c.orig 2006-04-11 14:44:10.000000000 +0000
++++ uip/packf.c
+@@ -27,9 +27,6 @@ static struct swit switches[] = {
+
+ /* */
+
+-extern int errno;
+-
+-
+ static int md = NOTOK;
+
+ char *file = NULL;
diff --git a/mail/ja-mh/patches/patch-bd b/mail/ja-mh/patches/patch-bd
new file mode 100644
index 00000000000..6efc193af3b
--- /dev/null
+++ b/mail/ja-mh/patches/patch-bd
@@ -0,0 +1,14 @@
+$NetBSD: patch-bd,v 1.1 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/prompter.c.orig 2006-04-11 14:45:09.000000000 +0000
++++ uip/prompter.c
+@@ -68,9 +68,6 @@ static struct swit switches[] = {
+
+ /* */
+
+-extern int errno;
+-
+-
+ #ifndef SYS5
+ #define ERASE sg.sg_erase
+ #define KILL sg.sg_kill
diff --git a/mail/ja-mh/patches/patch-be b/mail/ja-mh/patches/patch-be
new file mode 100644
index 00000000000..86e2f0b766a
--- /dev/null
+++ b/mail/ja-mh/patches/patch-be
@@ -0,0 +1,14 @@
+$NetBSD: patch-be,v 1.1 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/refile.c.orig 2006-04-11 14:45:44.000000000 +0000
++++ uip/refile.c
+@@ -47,9 +47,6 @@ static struct swit switches[] = {
+
+ /* */
+
+-extern int errno;
+-
+-
+ static char maildir[BUFSIZ];
+
+
diff --git a/mail/ja-mh/patches/patch-bf b/mail/ja-mh/patches/patch-bf
new file mode 100644
index 00000000000..404c4568e4b
--- /dev/null
+++ b/mail/ja-mh/patches/patch-bf
@@ -0,0 +1,12 @@
+$NetBSD: patch-bf,v 1.1 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/scan.c.orig 2006-04-11 14:46:19.000000000 +0000
++++ uip/scan.c
+@@ -50,7 +50,6 @@ static struct swit switches[] = {
+
+ /* */
+
+-extern int errno;
+ #ifdef LBL /* global for sbr/formatsbr.c - yech! */
+ extern struct msgs *fmt_current_folder;
+ #endif
diff --git a/mail/ja-mh/patches/patch-bg b/mail/ja-mh/patches/patch-bg
new file mode 100644
index 00000000000..a2226b1c05a
--- /dev/null
+++ b/mail/ja-mh/patches/patch-bg
@@ -0,0 +1,15 @@
+$NetBSD: patch-bg,v 1.1 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/send.c.orig 2006-04-11 14:47:09.000000000 +0000
++++ uip/send.c
+@@ -162,10 +162,6 @@ extern int verbsw;
+ extern char *altmsg; /* .. */
+ extern char *annotext;
+ extern char *distfile;
+-
+-
+-extern int errno;
+-
+ /* */
+
+ /* ARGSUSED */
diff --git a/mail/ja-mh/patches/patch-bh b/mail/ja-mh/patches/patch-bh
new file mode 100644
index 00000000000..764ae8b2b90
--- /dev/null
+++ b/mail/ja-mh/patches/patch-bh
@@ -0,0 +1,13 @@
+$NetBSD: patch-bh,v 1.1 2006/04/11 15:08:38 joerg Exp $
+
+--- uip/bbc.c.orig 2006-04-11 14:50:44.000000000 +0000
++++ uip/bbc.c
+@@ -112,8 +112,6 @@ struct bbcount {
+
+ /* */
+
+-extern int errno;
+-
+ static int changed = 0;
+ static int oops = 0;
+ static int quitting = 0;
diff --git a/mail/ja-mh/patches/patch-bi b/mail/ja-mh/patches/patch-bi
new file mode 100644
index 00000000000..c2254ce160e
--- /dev/null
+++ b/mail/ja-mh/patches/patch-bi
@@ -0,0 +1,16 @@
+$NetBSD: patch-bi,v 1.1 2006/04/11 15:08:39 joerg Exp $
+
+--- uip/rcvstore.c.orig 2006-04-11 14:51:32.000000000 +0000
++++ uip/rcvstore.c
+@@ -43,10 +43,7 @@ static struct swit switches[] = {
+
+ /* */
+
+-extern int errno;
+-
+-static char *tmpfilenam = NULLCP;
+-/* */
++static char *tmpfilenam = NULLCP; /* */
+
+ /* ARGSUSED */
+