I've heard rumors about existing patches for MH 6.8.3 to compile
and run on NetBSD. Unfortunately I don't remember who had these
patches, and I don't have a copy.
I am wondering if it's anything else than the fact that there is
no dbm library, but just the emulation on top of db available on
NetBSD. I would hate to miss something important while moving
from Dell SVR4 (with a working MH) to NetBSD.
Any pointers to or copies of or ideas about the patches will be
greatly appreciated.
here's what i use. i've added my config file as
`conf/examples/netbsd' also. you might need patch -p1 to get
this patch to apply. it goes to virgin 6.8.3 source. it also
adds netbsd shlib's. it handles the fact that we use .db files
now.
please let me know of any problems.
.mrg.
ps: what are the current plans wrt the next MH release? 6.8.3
ws quite some time ago now... and i've sent several patches to
this list but not had any confirmation that they were good/bad
or anything.
Index: mh/conf/mhconfig.c
diff -c mh/conf/mhconfig.c:1.1.1.1 mh/conf/mhconfig.c:1.2
*** mh/conf/mhconfig.c:1.1.1.1 Fri Sep 22 18:23:40 1995
--- mh/conf/mhconfig.c Sat Sep 23 01:18:09 1995
***************
*** 448,453 ****
--- 448,457 ----
fprintf (fp, "/^(_at_)BEGIN: STDLIB$/d\n/^(_at_)END: STDLIB$/d\n");
fprintf (fp, "/^(_at_)BEGIN: SHAREDLIB$/,/^(_at_)END: SHAREDLIB$/d\n");
}
+ if (strcmp (sharedlib, "netbsd") == 0 || strcmp (sharedlib, "on") == 0)
+ fprintf (fp, "/^(_at_)BEGIN: NETBSDSHLIB$/d\n/^(_at_)END:
NETBSDSHLIB$/d\n");
+ else
+ fprintf (fp, "/^(_at_)BEGIN: NETBSDSHLIB$/,/^(_at_)END:
NETBSDSHLIB$/d\n");
if (strcmp (sharedlib, "sun4") == 0 || strcmp (sharedlib, "on") == 0)
fprintf (fp, "/^(_at_)BEGIN: SUN4SHLIB$/d\n/^(_at_)END:
SUN4SHLIB$/d\n");
else
***************
*** 774,782 ****
if (strcmp (sharedlib, "on") && strcmp (sharedlib, "off")
&& strcmp (sharedlib, "sun4") && strcmp (sharedlib, "sys5")
! && strcmp (sharedlib, "secure"))
adios (NULLCP,
! "sharedlib should be either \"sun4\", \"sys5\", or \"off\", not %s",
sharedlib);
(void) sprintf(buffer, "TYPESIG=%s", signl);
--- 778,786 ----
if (strcmp (sharedlib, "on") && strcmp (sharedlib, "off")
&& strcmp (sharedlib, "sun4") && strcmp (sharedlib, "sys5")
! && strcmp (sharedlib, "secure") && strcmp (sharedlib, "netbsd"))
adios (NULLCP,
! "sharedlib should be either \"sun4\", \"sys5\", \"netbsd\", or
\"off\", not %s",
sharedlib);
(void) sprintf(buffer, "TYPESIG=%s", signl);
Index: mh/conf/examples/netbsd
diff -c /dev/null mh/conf/examples/netbsd:1.1
*** /dev/null Fri Oct 6 17:57:12 1995
--- mh/conf/examples/netbsd Sat Sep 23 01:30:21 1995
***************
*** 0 ****
--- 1,55 ----
+ mts sendmail/smtp
+ curses -ltermcap -lcurses
+ signal void
+ sprintf int
+
+ bin /local/bin
+ etc /local/lib/mh
+ mail /var/mail
+ mandir /local/man
+ chown /usr/sbin/chown
+
+ cc cc
+ ccoptions -O2
+ ldoptions -s
+ sharedlib netbsd
+ slflags -fpic
+ slibdir /local/lib
+
+ pop on
+ manuals standard
+
+ options BIND
+ options BSD42
+ options BSD43
+ options BSD44
+ options DBMPWD
+ options FLOCK
+ options FOLDPROT='"0700"'
+ options GCOS_HACK
+ options ISI
+ options MHE
+ options MHRC
+ options MIME
+ options MORE='"/usr/bin/more"'
+ options MSGID
+ options MSGPROT='"0600"'
+ options NORUSERPASS
+ options NTOHLSWAP
+ options OVERHEAD
+ options POP
+ options POPSERVICE='"pop3"'
+ options POSIX
+ options RPATHS
+ options RPOP
+ options RENAME
+ options SENDMTS
+ options SMTP
+ options SYS5DIR
+ options TYPESIG=void
+ options UK
+ options UNISTD
+ options VSPRINTF
+ options WAITINT
+ options WHATNOW
+ options ZONEINFO
Index: mh/conf/makefiles/sbr
diff -c mh/conf/makefiles/sbr:1.1.1.1 mh/conf/makefiles/sbr:1.2
*** mh/conf/makefiles/sbr:1.1.1.1 Fri Sep 22 18:23:51 1995
--- mh/conf/makefiles/sbr Sat Sep 23 01:23:28 1995
***************
*** 84,89 ****
--- 84,93 ----
@BEGIN: SHAREDLIB
-rm -f $@ shared/$@
$(CC) $(CFLAGS) -c $(SLFLAGS) $*.c
+ @BEGIN: NETBSDSHLIB
+ -ld -x -r $@
+ -mv a.out $@
+ @END: NETBSDSHLIB
mv $@ shared/$@
-rm -f $@
@END: SHAREDLIB
***************
*** 123,128 ****
--- 127,135 ----
@BEGIN: SYS5SHLIB
(cd shared; ld -G -o ../$@ -h $(_at_)(_dot_)$(SLIBVER)
$(OFILES))
@END: SYS5SHLIB
+ @BEGIN: NETBSDSHLIB
+ (cd shared; ld -Bshareable -Bforcearchive -o ../$@ $(OFILES))
+ @END: NETBSDSHLIB
-(_at_)rm -f $(_at_)(_dot_)$(SLIBVER)
ln $@ $(_at_)(_dot_)$(SLIBVER)
-(_at_)ls -l $(_at_)*
Index: mh/conf/makefiles/uip
diff -c mh/conf/makefiles/uip:1.1.1.1 mh/conf/makefiles/uip:1.2
*** mh/conf/makefiles/uip:1.1.1.1 Fri Sep 22 18:23:51 1995
--- mh/conf/makefiles/uip Sat Sep 23 01:18:17 1995
***************
*** 142,147 ****
--- 142,151 ----
../zotnet/libzot.a
LDLIBES = ../config/config.o -Bdynamic @(SLDFLAG) -lmh$(SLIBVER) \
../mts/libmts.a ../zotnet/libzot.a
+ @BEGIN: NETBSDSHLIB
+ LDLIBES = ../config/config.o @(SLDFLAG) -lmh$(SLIBVER) \
+ ../mts/libmts.a ../zotnet/libzot.a
+ @END: NETBSDSHLIB
LDLIBS = $(LDLIBES) ../config/version.o $(LDOPTLIB)
@END: SHAREDLIB
LINT = lint
Index: mh/conf/makefiles/support/bboards
diff -c mh/conf/makefiles/support/bboards:1.1.1.1
mh/conf/makefiles/support/bboards:1.2
*** mh/conf/makefiles/support/bboards:1.1.1.1 Fri Sep 22 18:23:52 1995
--- mh/conf/makefiles/support/bboards Sat Sep 23 01:18:21 1995
***************
*** 53,61 ****
LIBES2 = ../../config/config.o ../../config/version.o \
../../sbr/libmh.so $(LIBES1)
LDLIBS1 = $(LIBES1) $(LDOPTLIB)
- LDLIBS2 = $(LIBES2) $(LDOPTLIB)
LDLIBS2 = ../../config/config.o ../../config/version.o \
-Bdynamic @(SLDFLAG) -lmh$(SLIBVER) $(LIBES1) $(LDOPTLIB)
@END: SHAREDLIB
LINT = lint
--- 53,64 ----
LIBES2 = ../../config/config.o ../../config/version.o \
../../sbr/libmh.so $(LIBES1)
LDLIBS1 = $(LIBES1) $(LDOPTLIB)
LDLIBS2 = ../../config/config.o ../../config/version.o \
-Bdynamic @(SLDFLAG) -lmh$(SLIBVER) $(LIBES1) $(LDOPTLIB)
+ @BEGIN: NETBSDSHLIB
+ LDLIBS2 = ../../config/config.o ../../config/version.o \
+ @(SLDFLAG) -lmh$(SLIBVER) $(LIBES1) $(LDOPTLIB)
+ @END: NETBSDSHLIB
@END: SHAREDLIB
LINT = lint
Index: mh/conf/makefiles/support/pop
diff -c mh/conf/makefiles/support/pop:1.1.1.1 mh/conf/makefiles/support/pop:1.2
*** mh/conf/makefiles/support/pop:1.1.1.1 Fri Sep 22 18:23:52 1995
--- mh/conf/makefiles/support/pop Sat Sep 23 01:18:22 1995
***************
*** 61,66 ****
--- 61,70 ----
LDLIBS1 = $(LIBES1) $(LDOPTLIB)
LDLIBS2 = ../../config/config.o ../../config/version.o \
-Bdynamic @(SLDFLAG) -lmh$(SLIBVER) $(LIBES1) $(LDOPTLIB)
+ @BEGIN: NETBSDSHLIB
+ LDLIBS2 = ../../config/config.o ../../config/version.o \
+ @(SLDFLAG) -lmh$(SLIBVER) $(LIBES1) $(LDOPTLIB)
+ @END: NETBSDSHLIB
@END: SHAREDLIB
LINT = lint
Index: mh/uip/inc.c
diff -c mh/uip/inc.c:1.1.1.1 mh/uip/inc.c:1.2
*** mh/uip/inc.c:1.1.1.1 Fri Sep 22 18:25:06 1995
--- mh/uip/inc.c Sat Sep 23 01:19:07 1995
*** 883,889 ****
/* */
#ifdef POP
! void done (status)
int status;
{
if (file && pd != NOTOK)
--- 883,889 ----
/* */
#ifdef POP
! static void done (status)
int status;
{
if (file && pd != NOTOK)
Index: mh/uip/mhn.c
diff -c mh/uip/mhn.c:1.1.1.1 mh/uip/mhn.c:1.2
*** mh/uip/mhn.c:1.1.1.1 Fri Sep 22 18:25:08 1995
--- mh/uip/mhn.c Sat Sep 23 01:19:11 1995
*** 7223,7229 ****
/* */
! void done (status)
int status;
{
register CT *ctp;
--- 7223,7229 ----
/* */
! static void done (status)
int status;
{
register CT *ctp;
Index: mh/uip/sendsbr.c
diff -c mh/uip/sendsbr.c:1.1.1.1 mh/uip/sendsbr.c:1.2
*** mh/uip/sendsbr.c:1.1.1.1 Fri Sep 22 18:25:16 1995
--- mh/uip/sendsbr.c Sat Sep 23 01:19:15 1995
*** 594,600 ****
/* */
! void done (status)
int status;
{
if (armed)
--- 594,600 ----
/* */
! static void done (status)
int status;
{
if (armed)
Index: mh/uip/slocal.c
diff -c mh/uip/slocal.c:1.1.1.1 mh/uip/slocal.c:1.2
*** mh/uip/slocal.c:1.1.1.1 Fri Sep 22 18:25:16 1995
--- mh/uip/slocal.c Sat Sep 23 01:19:17 1995
*** 379,385 ****
--- 379,389 ----
#ifdef MSGID
struct stat st;
+ #ifdef BSD44
+ if (stat (".maildelivery.db", &st) != NOTOK
+ #else
if (stat (".maildelivery.pag", &st) != NOTOK
+ #endif
&& check_msgid (fd, ".maildelivery") == DONE)
return OK;
#endif
***************
*** 1304,1309 ****
--- 1308,1314 ----
(void) fclose (in);
return NOTOK;
}
+ #ifndef BSD44
#ifdef FCNTL
{
struct flock fl;
***************
*** 1328,1333 ****
--- 1333,1339 ----
advise (file, "unable to perform flock on");
goto out;
}
+ #endif
#endif
#endif