しらいです。

 MH 形式のローカルメイルフォルダ用 POP3/SMTP サーバ MHpopd
1.00b の patch その 1 です。

Submitted-by: shirai@chandra2
Archive-name: MHpopd-1.00b.patch/part01

---- Cut Here and feed the following to sh ----
#!/bin/sh
# This is MHpopd-1.00b.patch, a shell archive (produced by GNU sharutils 4.2)
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 2006-05-30 00:00 JST by <shirai@chandra2>.
# Source directory was `/usr/home/shirai/src/mhpopd'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This is part 1 of a multipart archive.                                   
# Do not concatenate these parts, unpack them in order with `/bin/sh'.     
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#  67990 -rw-r--r-- MHpopd-1.00b.patch
#
echo=echo
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
  shar_touch=touch
else
  shar_touch=:
  echo
  $echo 'WARNING: not restoring timestamps.  Consider getting and'
  $echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 1231235999 $$.touch
#
if mkdir _sh00748; then
  $echo 'x -' 'creating lock directory'
else
  $echo 'failed to create lock directory'
  exit 1
fi
if test -r _sh00748/seq; then
  $echo 'Must unpack archives in sequence!'
  $echo 'Please unpack part' '`cat _sh00748/seq`' 'next!'
  exit 1
fi
# ============= MHpopd-1.00b.patch ==============
if test -f 'MHpopd-1.00b.patch' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'MHpopd-1.00b.patch' '(file already exists)'
  rm -f _sh00748/new
else
  > _sh00748/new
  $echo 'x -' extracting 'MHpopd-1.00b.patch' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'MHpopd-1.00b.patch' &&
diff -urNP ../MHpopd-1.00a/Configur ./Configur
--- ../MHpopd-1.00a/Configur    Tue May 31 00:00:00 2005
+++ ./Configur  Tue May 30 00:00:00 2006
@@ -163,18 +163,20 @@
X FORCEDSTDC STRICTSTDC NOSTDC NOCONST NOVOID NOLONGLONG HAVELONGLONG \
X NOUID_T USEPID_T DECLSIGLIST NOSIGLIST \
X DECLERRLIST PWNEEDERROR NOERRNO NOFILEMODE NOUNISTDH NOSTDLIBH NOTZFILEH \
-USELEAPCNT USESELECTH USESYSDIRH USETIMEH USESTDARGH USEMKDEVH USEMKNODH \
+USELEAPCNT USESELECTH USESYSDIRH USETIMEH \
+USESTDARGH USEMKDEVH USEMKNODH USELOCKFH \
X USESGTTY USETERMIO USETERMIOS HAVECLINE USEDEVPTMX \
X USEDIRECT SYSVDIRENT NODNAMLEN NODRECLEN DNAMESIZE \
X HAVETIMEZONE NOTMGMTOFF \
X USESTATVFSH USESTATFSH USEVFSH USEMOUNTH USEFSDATA \
X USESTATVFS_T USEFFSIZE STATFSARGS \
-USEMNTENTH USEMNTTABH USEGETFSSTAT USEMNTCTL \
+USEMNTENTH USEMNTTABH USEGETFSSTAT USEGETVFSTAT USEMNTCTL \
X USEMNTINFOR USEMNTINFO USEGETMNT USEGETFSENT \
X USEVFCNAME USEFFSTYPE \
X USERE_COMP USEREGCOMP USEREGCMP \
X USERAND48 USESETENV NOSELECT DEFFDSETSIZE SELECTRWONLY NOVSPRINTF NOTERMVAR \
-USEUTIME USEGETWD USETIMELOCAL USEMKTIME USESYSCONF USELLSEEK USEUNAME \
+USEUTIME USEGETWD USEFCNTLOCK USELOCKF NOFLOCK NOSYSLOG \
+USETIMELOCAL USEMKTIME USESYSCONF USELLSEEK USEUNAME \
X USEWAITPID USESIGACTION USESIGPMASK \
X USERESOURCEH USEULIMITH USEGETRUSAGE USETIMES \
X GETPGRPVOID USESETPGID USESETVBUF SIGARGINT SIGFNCINT \
@@ -425,7 +427,7 @@
X               echo "#define      USETERMIO"
X       fi
X fi
-if isexist "t.c_line" "termios" "struct termios t;"; then
+if isexist "t.c_line" termios "struct termios t;"; then
X       echo "#define      HAVECLINE"
X fi
X if [ -c /dev/ptmx -a -d /dev/pts ]; then
@@ -496,24 +498,21 @@
X       echo "#define      STATFSARGS      $arg"
X fi
X 
+statfs=
X if isexist "getmntent(0)" "stdio mntent"; then
X       echo "#define      USEMNTENTH"
X elif isexist "getmntent(0,0)" "stdio sys/mnttab"; then
X       echo "#define      USEMNTTABH"
X elif isexist "mntctl(0,0,0)"; then
X       echo "#define      USEMNTCTL"
+elif isexist "getvfsstat(0,0,0)" sys/statvfs; then
+       echo "#define      USEGETVFSTAT"
+       statfs=statvfs
X elif isexist "getmntinfo_r(0,0,0,0)"; then
X       echo "#define      USEMNTINFOR"
-elif isexist "getmntinfo(0,0)"; then {
+elif isexist "getmntinfo(0,0)"; then
X       echo "#define      USEMNTINFO"
-       if isexist "getvfsbytype(0); return(*(c.vfc_name));" \
-       "sys/param sys/mount" "struct vfsconf c;"; then
-               echo "#define      USEVFCNAME"
-       elif isexist "f.f_fstypename" \
-       "sys/param sys/mount" "struct statfs f;"; then
-               echo "#define      USEFFSTYPE"
-       fi
-}
+       statfs=statfs
X elif isexist "getfsstat(0,0,0)"; then
X       echo "#define      USEGETFSSTAT"
X elif isexist "getmnt(0,0,0,0,0)"; then
@@ -523,6 +522,15 @@
X       echo "#define      USEGETFSENT"
X fi
X 
+if [ -z "$statfs" ]; then
+       :
+elif isexist "getvfsbytype(0); return(*(c.vfc_name));" \
+"sys/param sys/mount" "struct vfsconf c;"; then
+       echo "#define      USEVFCNAME"
+elif isexist "f.f_fstypename" \
+"sys/param sys/mount" "struct $statfs f;"; then
+       echo "#define      USEFFSTYPE"
+fi
X 
X lib=
X if isexist "re_comp(0)" ctype "extern char *re_comp();" \
@@ -567,6 +575,21 @@
X if noexist "getcwd(0,0)"; then
X       echo "#define      USEGETWD"
X fi
+if isexist "fcntl(0,F_SETLKW,0)" fcntl; then
+       echo "#define      USEFCNTLOCK"
+elif isexist "flock(0,0)" sys/file; then
+       :
+elif isexist "lockf(0,0,0)"; then
+       echo "#define      USELOCKF"
+elif isexist "lockf(0,0,0)" sys/lockf; then
+       echo "#define      USELOCKFH"
+       echo "#define      USELOCKF"
+else
+       echo "#define      NOFLOCK"
+fi
+if noexist "syslog(0,0,0)" syslog; then
+       echo "#define      NOSYSLOG"
+fi
X if isexist "mktime(0)" time; then
X       echo "#define      USEMKTIME"
X elif isexist "timelocal(0)" time; then
@@ -575,7 +598,7 @@
X if isexist "sysconf(0)"; then
X       echo "#define      USESYSCONF"
X fi
-if isexist "_llseek(0,0,0,0,0)" "linux/unistd" "static _syscall5(int, _llseek,
+if isexist "_llseek(0,0,0,0,0)" linux/unistd "static _syscall5(int, _llseek,
X       unsigned int, fd,
X       unsigned long, ofs_h,
X       unsigned long, ofs_l,
diff -urNP ../MHpopd-1.00a/HISTORY ./HISTORY
--- ../MHpopd-1.00a/HISTORY     Tue May 31 00:00:00 2005
+++ ./HISTORY   Tue May 30 00:00:00 2006
@@ -1,3 +1,8 @@
+Ver. 1.00b (05/30/2006)
+       Support NetBSD 3.0.
+       Bug that actual log size is less than the size specified by maxlogsize.
+       Failure to do make with tail(1) strict on POSIX is fixed.
+
X Ver. 1.00a (05/31/2005)
X       Default timeout is expanded up to 30.
X 
diff -urNP ../MHpopd-1.00a/HISTORY.jp ./HISTORY.jp
--- ../MHpopd-1.00a/HISTORY.jp  Tue May 31 00:00:00 2005
+++ ./HISTORY.jp        Tue May 30 00:00:00 2006
@@ -1,3 +1,8 @@
+Ver. 1.00b (05/30/2006)
+       NetBSD 3.0 対応。
+       実際のログサイズが maxlogsize で指定した値より小さかった点を修正。
+       POSIX に厳密な tail(1) で make に失敗する点を修正。
+
X Ver. 1.00a (05/31/2005)
X       タイムアウト初期値を 30 に延長。
X 
diff -urNP ../MHpopd-1.00a/Makefile ./Makefile
--- ../MHpopd-1.00a/Makefile    Tue May 31 00:00:00 2005
+++ ./Makefile  Tue May 30 00:00:00 2006
@@ -12,13 +12,7 @@
X HOSTCC        = $(CC)
X SED   = sed
X 
-GETVER = HEAD="`tail -1 version.h`"; \
-       VER=`expr "$$HEAD" : '.*\([0-9][0-9]*\.[0-9a-z\-]*\).*'`
-GETDIST        = HEAD=`tail -2 version.h | head -1`; \
-       DIST=`expr "$$HEAD" : '.*"\(.*\)".*'`
-DEFCFLAGS = -DVER='"'$$VER'"' \
-       -DDIST='"'$$DIST'"' \
-       -DPREFIX='"'$(PREFIX)'"' \
+DEFCFLAGS = -DPREFIX='"'$(PREFIX)'"' \
X       -DCONFDIR='"'$(CONFDIR)'"' \
X       -DMHBIN='"'$(MHBIN)'"' \
X       -DCCCOMMAND='"'$(CC)'"' \
@@ -41,8 +35,7 @@
X       ./mkmfsed > mkmf.sed
X 
X mkmfsed: mkmfsed.c mhpopd.h machine.h config.h version.h
-       ($(GETVER); \
-       $(HOSTCC) $(CFLAGS) $(CPPFLAGS) $(DEFCFLAGS) -o $@ mkmfsed.c)
+       $(HOSTCC) $(CFLAGS) $(CPPFLAGS) $(DEFCFLAGS) -o $@ mkmfsed.c
X 
X config.h: config.hin
X       cp config.hin config.h
diff -urNP ../MHpopd-1.00a/Makefile.in ./Makefile.in
--- ../MHpopd-1.00a/Makefile.in Tue May 31 00:00:00 2005
+++ ./Makefile.in       Tue May 30 00:00:00 2006
@@ -3,7 +3,7 @@
X #
X 
X TITLE = MHpopd-
-VER    = __VER__
+VERSION        = __VERSION__
X PREFIX        = __PREFIX__
X CONFDIR       = __CONFDIR__
X MHBIN = __MHBIN__
@@ -119,7 +119,7 @@
X       $(CC) $(MHCFLAGS) $(DEFCFLAGS) -c __OUT__ $*.c
X 
X mhpasswd__OBJ__: mhpasswd.c
-       $(CC) $(MHCFLAGS) -DVER='"'$(VER)'"' -c __OUT__ $*.c
+       $(CC) $(MHCFLAGS) -DVER='"'$(VERSION)'"' -c __OUT__ $*.c
X 
X .c__OBJ__:
X       $(CC) $(MHCFLAGS) -c __OUT__ $*.c
@@ -315,20 +315,20 @@
X # for programer's maintenance
X 
X tar: $(SOURCES)
-       tar cvf $(TITLE)$(VER).tar $(SOURCES)
-       compress -f $(TITLE)$(VER).tar
+       tar cvf $(TITLE)$(VERSION).tar $(SOURCES)
+       compress -f $(TITLE)$(VERSION).tar
X 
X gtar: $(SOURCES)
-       tar cvf $(TITLE)$(VER).tar $(SOURCES)
-       gzip -f $(TITLE)$(VER).tar
+       tar cvf $(TITLE)$(VERSION).tar $(SOURCES)
+       gzip -f $(TITLE)$(VERSION).tar
X 
X lzh: $(SOURCES)
-       rm -f $(TITLE)$(VER).lzh
-       lha a $(TITLE)$(VER).lzh $(SOURCES)
+       rm -f $(TITLE)$(VERSION).lzh
+       lha a $(TITLE)$(VERSION).lzh $(SOURCES)
X 
X shar: $(SOURCES)
-       rm -f $(TITLE)$(VER).shar.[0-9][0-9]
-       shar -L50 -apc -n $(TITLE)$(VER) -o $(TITLE)$(VER).shar \
+       rm -f $(TITLE)$(VERSION).shar.[0-9][0-9]
+       shar -L50 -apc -n $(TITLE)$(VERSION) -o $(TITLE)$(VERSION).shar \
X       -T $(SRCS) -C $(JSRCS)
X 
X ipk: $(PROGRAM)__EXE__
@@ -350,7 +350,7 @@
X       $(ECHO) "Section: extras" >> $(IPKWDIR)/CONTROL/control
X       $(ECHO) "Maintainer: $(DIST)" >> $(IPKWDIR)/CONTROL/control
X       $(ECHO) "Architecture: arm" >> $(IPKWDIR)/CONTROL/control
-       $(ECHO) "Version: $(VER)-1" >> $(IPKWDIR)/CONTROL/control
+       $(ECHO) "Version: $(VERSION)-1" >> $(IPKWDIR)/CONTROL/control
X       $(ECHO) "Description: a POP3 server via MH local spool." \
X               >> $(IPKWDIR)/CONTROL/control
X       (cd $(IPKWDIR); tar cf ../data.tar --exclude=CONTROL .)
@@ -363,7 +363,7 @@
X       (cd $(IPKTDIR); \
X       tar cf ../ipk.tar ./debian-binary ./data.tar.gz ./control.tar.gz)
X       gzip ./ipk.tar
-       mv ./ipk.tar.gz ./$(TITLE)$(VER)-1_arm.ipk
+       mv ./ipk.tar.gz ./$(TITLE)$(VERSION)-1_arm.ipk
X       -rm -rf $(IPKWDIR) $(IPKTDIR)
X 
X clean:
@@ -378,120 +378,160 @@
X 
X main__OBJ__: mhpopd.h
X main__OBJ__: machine.h config.h
-main__OBJ__: types.h func.h var.h pop3.h smtp.h
+main__OBJ__: printf.h
+main__OBJ__: types.h func.h var.h
+main__OBJ__: pop3.h smtp.h
X syscall__OBJ__: mhpopd.h
X syscall__OBJ__: machine.h config.h
-syscall__OBJ__: types.h func.h var.h fileio.h
+syscall__OBJ__: printf.h
+syscall__OBJ__: types.h func.h
+syscall__OBJ__: var.h fileio.h
X libc__OBJ__: mhpopd.h
X libc__OBJ__: machine.h config.h
-libc__OBJ__: types.h func.h var.h fileio.h
+libc__OBJ__: printf.h
+libc__OBJ__: types.h func.h var.h
+libc__OBJ__: fileio.h
X libc__OBJ__: kctype.h
X printf__OBJ__: machine.h config.h
X printf__OBJ__: printf.h
X printf__OBJ__: kctype.h
X var__OBJ__: mhpopd.h
-var__OBJ__: machine.h config.h
+var__OBJ__: machine.h config.h printf.h
X var__OBJ__: types.h func.h var.h kctype.h
X list__OBJ__: mhpopd.h
X list__OBJ__: machine.h config.h
-list__OBJ__: types.h func.h var.h kctype.h
+list__OBJ__: printf.h
+list__OBJ__: types.h func.h var.h
+list__OBJ__: kctype.h
X time__OBJ__: mhpopd.h
X time__OBJ__: machine.h config.h
-time__OBJ__: types.h func.h var.h printf.h
+time__OBJ__: printf.h
+time__OBJ__: types.h func.h var.h
X term__OBJ__: mhpopd.h
X term__OBJ__: machine.h config.h
-term__OBJ__: types.h func.h var.h fileio.h
+term__OBJ__: printf.h
+term__OBJ__: types.h func.h var.h
+term__OBJ__: fileio.h
X signal__OBJ__: mhpopd.h
X signal__OBJ__: machine.h config.h
-signal__OBJ__: types.h func.h var.h
+signal__OBJ__: printf.h
+signal__OBJ__: types.h func.h
+signal__OBJ__: var.h
X wait__OBJ__: mhpopd.h
X wait__OBJ__: machine.h config.h
+wait__OBJ__: printf.h
X wait__OBJ__: types.h func.h var.h
X md5__OBJ__: machine.h config.h
X base64__OBJ__: machine.h config.h
X passwd__OBJ__: mhpopd.h
X passwd__OBJ__: machine.h config.h
-passwd__OBJ__: types.h func.h var.h
+passwd__OBJ__: printf.h
+passwd__OBJ__: types.h func.h
+passwd__OBJ__: var.h
X pid__OBJ__: mhpopd.h
-pid__OBJ__: machine.h config.h
-pid__OBJ__: types.h func.h var.h printf.h fileio.h
+pid__OBJ__: machine.h config.h printf.h
+pid__OBJ__: types.h func.h var.h fileio.h
X log__OBJ__: mhpopd.h
-log__OBJ__: machine.h config.h
+log__OBJ__: machine.h config.h printf.h
X log__OBJ__: types.h func.h var.h kctype.h
-log__OBJ__: printf.h
X config__OBJ__: mhpopd.h
X config__OBJ__: machine.h config.h
-config__OBJ__: types.h func.h var.h kctype.h
+config__OBJ__: printf.h
+config__OBJ__: types.h func.h
+config__OBJ__: var.h kctype.h
X config__OBJ__: fileio.h
X config__OBJ__: version.h
X socket__OBJ__: mhpopd.h
X socket__OBJ__: machine.h config.h
-socket__OBJ__: types.h func.h var.h kctype.h
+socket__OBJ__: printf.h
+socket__OBJ__: types.h func.h
+socket__OBJ__: var.h kctype.h
X stat__OBJ__: mhpopd.h
X stat__OBJ__: machine.h config.h
-stat__OBJ__: types.h func.h var.h fileio.h
+stat__OBJ__: printf.h
+stat__OBJ__: types.h func.h var.h
+stat__OBJ__: fileio.h
X filesys__OBJ__: mhpopd.h
X filesys__OBJ__: machine.h config.h
-filesys__OBJ__: types.h func.h var.h printf.h
-filesys__OBJ__: fileio.h
+filesys__OBJ__: printf.h
+filesys__OBJ__: types.h func.h
+filesys__OBJ__: var.h fileio.h
X pwd__OBJ__: mhpopd.h
-pwd__OBJ__: machine.h config.h
+pwd__OBJ__: machine.h config.h printf.h
X pwd__OBJ__: types.h func.h var.h kctype.h
-pwd__OBJ__: printf.h
X pty__OBJ__: mhpopd.h
-pty__OBJ__: machine.h config.h
-pty__OBJ__: types.h func.h var.h printf.h fileio.h
+pty__OBJ__: machine.h config.h printf.h
+pty__OBJ__: types.h func.h var.h fileio.h
X wild__OBJ__: mhpopd.h
X wild__OBJ__: machine.h config.h
+wild__OBJ__: printf.h
X wild__OBJ__: types.h func.h var.h
X argv__OBJ__: mhpopd.h
X argv__OBJ__: machine.h config.h
-argv__OBJ__: types.h func.h var.h kctype.h
+argv__OBJ__: printf.h
+argv__OBJ__: types.h func.h var.h
+argv__OBJ__: kctype.h
X dirent__OBJ__: mhpopd.h
X dirent__OBJ__: machine.h config.h
-dirent__OBJ__: types.h func.h var.h kctype.h
-dirent__OBJ__: printf.h fileio.h
+dirent__OBJ__: printf.h
+dirent__OBJ__: types.h func.h
+dirent__OBJ__: var.h kctype.h
+dirent__OBJ__: fileio.h
X mhcmd__OBJ__: mhpopd.h
X mhcmd__OBJ__: machine.h config.h
-mhcmd__OBJ__: types.h func.h var.h kctype.h
X mhcmd__OBJ__: printf.h
+mhcmd__OBJ__: types.h func.h var.h
+mhcmd__OBJ__: kctype.h
X mhcmd__OBJ__: fileio.h
X message__OBJ__: mhpopd.h
X message__OBJ__: machine.h config.h
-message__OBJ__: types.h func.h var.h kctype.h
X message__OBJ__: printf.h
+message__OBJ__: types.h func.h
+message__OBJ__: var.h kctype.h
X auth__OBJ__: mhpopd.h
X auth__OBJ__: machine.h config.h
-auth__OBJ__: types.h func.h var.h printf.h pop3.h smtp.h
+auth__OBJ__: printf.h
+auth__OBJ__: types.h func.h var.h
+auth__OBJ__: pop3.h smtp.h
X pop3__OBJ__: mhpopd.h
X pop3__OBJ__: machine.h config.h
-pop3__OBJ__: types.h func.h var.h kctype.h
X pop3__OBJ__: printf.h
+pop3__OBJ__: types.h func.h var.h
+pop3__OBJ__: kctype.h
X pop3__OBJ__: pop3.h
X pop3recv__OBJ__: mhpopd.h
X pop3recv__OBJ__: machine.h config.h
-pop3recv__OBJ__: types.h func.h var.h kctype.h
-pop3recv__OBJ__: printf.h pop3.h
+pop3recv__OBJ__: printf.h
+pop3recv__OBJ__: types.h func.h
+pop3recv__OBJ__: var.h kctype.h
+pop3recv__OBJ__: pop3.h
X pop3send__OBJ__: mhpopd.h
X pop3send__OBJ__: machine.h config.h
-pop3send__OBJ__: types.h func.h var.h printf.h
-pop3send__OBJ__: pop3.h
+pop3send__OBJ__: printf.h
+pop3send__OBJ__: types.h func.h
+pop3send__OBJ__: var.h pop3.h
X smtp__OBJ__: mhpopd.h
X smtp__OBJ__: machine.h config.h
-smtp__OBJ__: types.h func.h var.h kctype.h
X smtp__OBJ__: printf.h
+smtp__OBJ__: types.h func.h var.h
+smtp__OBJ__: kctype.h
X smtp__OBJ__: smtp.h
X smtprecv__OBJ__: mhpopd.h
X smtprecv__OBJ__: machine.h config.h
-smtprecv__OBJ__: types.h func.h var.h kctype.h
-smtprecv__OBJ__: printf.h smtp.h
+smtprecv__OBJ__: printf.h
+smtprecv__OBJ__: types.h func.h
+smtprecv__OBJ__: var.h kctype.h
+smtprecv__OBJ__: smtp.h
X smtpsend__OBJ__: mhpopd.h
X smtpsend__OBJ__: machine.h config.h
-smtpsend__OBJ__: types.h func.h var.h printf.h
-smtpsend__OBJ__: smtp.h
+smtpsend__OBJ__: printf.h
+smtpsend__OBJ__: types.h func.h
+smtpsend__OBJ__: var.h smtp.h
X mhpasswd__OBJ__: mhpopd.h
X mhpasswd__OBJ__: machine.h config.h
-mhpasswd__OBJ__: types.h func.h var.h
+mhpasswd__OBJ__: printf.h
+mhpasswd__OBJ__: types.h func.h
+mhpasswd__OBJ__: var.h
X kanjicnv__OBJ__: machine.h config.h
X expfunc__OBJ__: machine.h config.h
-mkmfsed__OBJ__: machine.h config.h
+mkmfsed__OBJ__: machine.h config.h version.h
diff -urNP ../MHpopd-1.00a/README ./README
--- ../MHpopd-1.00a/README      Tue May 31 00:00:00 2005
+++ ./README    Tue May 30 00:00:00 2006
@@ -3,7 +3,7 @@
X #     About MHpopd Ver. 1.00
X #
X #     Takashi SHIRAI, <shirai@unixusers.net>
-#      May 31, 2005
+#      May 30, 2006
X #
X ############################################################
X 
diff -urNP ../MHpopd-1.00a/README.jp ./README.jp
--- ../MHpopd-1.00a/README.jp   Tue May 31 00:00:00 2005
+++ ./README.jp Tue May 30 00:00:00 2006
@@ -3,7 +3,7 @@
X #     MHpopd Ver. 1.00 に関して
X #
X #     Takashi SHIRAI, <shirai@unixusers.net>
-#      May 31, 2005
+#      May 30, 2006
X #
X ############################################################
X 
diff -urNP ../MHpopd-1.00a/TECHKNOW ./TECHKNOW
--- ../MHpopd-1.00a/TECHKNOW    Tue May 31 00:00:00 2005
+++ ./TECHKNOW  Tue May 30 00:00:00 2006
@@ -204,6 +204,10 @@
X USEMKNODH
X       The macro (or function) major()/minor() for the device
X       number is defined <sys/mknod.h>.
+USELOCKFH
+       The constants which indicate the commands for the
+       function lockf(2) to lock files is defined in
+       <sys/lockf.h>.
X USETERMIO
X       The structure termio is used as the terminal interface.
X USETERMIOS
@@ -264,7 +268,7 @@
X       In case of that USESTATVFSH, USEFSDATA is defined,
X       this is meaningless.
X 
-(The following 8 identifiers is exclusive. These can not be
+(The following 9 identifiers is exclusive. These can not be
X defined simultaneously.)
X USEMNTENTH
X       The functions declared in <mntent.h> is used to get
@@ -273,7 +277,10 @@
X       The functions declared in <sys/mnttab.h> is used to
X       get the mount information.
X USEGETFSSTAT
-       The function getfsstat(3) is used to get the mount
+       The function getfsstat(2) is used to get the mount
+       information.
+USEGETVFSTAT
+       The function getvfsstat(2) is used to get the mount
X       information.
X USEMNTCTL
X       The function mntctl(3) is used to get the mount
@@ -346,6 +353,18 @@
X USEGETWD
X       The function getcwd(3) is unavailable to get the
X       current directory, and getwd(3) is used instead.
+USEFCNTLOCK
+       The function fnctl(2) is used instead of flock(2) to
+       lock files.
+USELOCKF
+       The function flock(2) is unavailable to lock files,
+       and lockf(2) is used instead.
+NOFLOCK
+       Both of the function flock(2) and lockf(2) are
+       unavailable to lock files.
+NOSYSLOG
+       The function syslog(3) is unavailable for system
+       logger.
X USETIMELOCAL
X       The function timelocal(3) is available as the inverse
X       function of localtime(3) for the time conversion.
diff -urNP ../MHpopd-1.00a/TECHKNOW.jp ./TECHKNOW.jp
--- ../MHpopd-1.00a/TECHKNOW.jp Tue May 31 00:00:00 2005
+++ ./TECHKNOW.jp       Tue May 30 00:00:00 2006
@@ -199,6 +199,9 @@
X USEMKNODH
X       デバイス番号用マクロ (または関数) major()/minor() が
X       <sys/mknod.h> の中で定義されています。
+USELOCKFH
+       ファイルロック関数 lockf(2) のコマンドを示す各定数が
+       <sys/lockf.h> の中で定義されています。
X USETERMIO
X       端末インタフェースとして、termio 構造体を用います。
X USETERMIOS
@@ -257,7 +260,7 @@
X       USESTATVFSH, USEFSDATA を定義した場合は意味を持ちま
X       せん。
X 
-(以下の 8 つは排他的です。同時に複数定義できません。)
+(以下の 9 つは排他的です。同時に複数定義できません。)
X USEMNTENTH
X       マウント情報を得るために、<mntent.h> で宣言されてい
X       る関数群を用います。
@@ -265,8 +268,11 @@
X       マウント情報を得るために、<sys/mnttab.h> で宣言され
X       ている関数群を用います。
X USEGETFSSTAT
-       マウント情報を得るために、関数 getfsstat(3) を用いま
+       マウント情報を得るために、関数 getfsstat(2) を用いま
X       す。
+USEGETVFSTAT
+       マウント情報を得るために、関数 getvfsstat(2) を用い
+       ます。
X USEMNTCTL
X       マウント情報を得るために、関数 mntctl(3) を用います。
X USEMNTINFOR
@@ -327,6 +333,17 @@
X USEGETWD
X       カレントディレクトリ検査関数として、getcwd(3) を用い
X       られず、代わりに getwd(3) を用います。
+USEFCNTLOCK
+       ファイル制御関数 fcntl(2) を flock(2) の代わりに用い
+       ます。
+USELOCKF
+       ファイルロック関数として flock(2) を使うことができず、
+       代わりに lockf(2) を用います。
+NOFLOCK
+       ファイルロック関数として flock(2) も lockf(2) も使う
+       ことができません。
+NOSYSLOG
+       システムロガー関数 syslog(3) を使うことができません。
X USETIMELOCAL
X       時間変換関数 timelocal(3) が localtime(3) の逆関数と
X       して使えます。
diff -urNP ../MHpopd-1.00a/auth.c ./auth.c
--- ../MHpopd-1.00a/auth.c      Tue May 31 00:00:00 2005
+++ ./auth.c    Tue May 30 00:00:00 2006
@@ -6,7 +6,6 @@
X  */
X 
X #include "mhpopd.h"
-#include "printf.h"
X #include "pop3.h"
X #include "smtp.h"
X 
@@ -18,7 +17,7 @@
X       authfunc_t func;
X       int argn;
X } authcmd_t;
-#define        DEFCMD(i,c,a)           {i, sizeof(i) - 1, c, a}
+#define        DEFCMD(i,c,a)           {i, strsize(i), c, a}
X 
X static char *auth_cramstr = NULL;
X static char *auth_username = NULL;
@@ -42,7 +41,7 @@
X       DEFCMD("DIGEST-MD5", auth_digest, 0),
X #endif
X };
-#define        AUTHCMDLISTSIZ  ((int)sizeof(authcmdlist) / sizeof(authcmd_t))
+#define        AUTHCMDLISTSIZ  arraysize(authcmdlist)
X 
X 
X static int NEAR auth_senderror(fp)
@@ -335,7 +334,7 @@
X       int i, n, flags;
X 
X       for (i = n = 0; i < AUTHCMDLISTSIZ; i++)
-               n += snprintf2(&(buf[n]), sizeof(buf) - n,
+               n += snprintf2(&(buf[n]), (int)sizeof(buf) - n,
X                       " %s", authcmdlist[i].ident);
X       flags = smtp_flags;
X       smtp_flags |= SMTP_CONTINUED;
diff -urNP ../MHpopd-1.00a/config.c ./config.c
--- ../MHpopd-1.00a/config.c    Tue May 31 00:00:00 2005
+++ ./config.c  Tue May 30 00:00:00 2006
@@ -61,14 +61,14 @@
X #define       def_num(n)              (configlist[n].def.num)
X #define       stack_str(n)            (configlist[n].stack.str)
X #define       stack_num(n)            (configlist[n].stack.num)
-#define        DEFCONF(i,c,v,d,f)      {i, sizeof(i) - 1, \
+#define        DEFCONF(i,c,v,d,f)      {i, strsize(i), \
X                               c, &(v), {(char *)d}, {NULL}, f, 0, 0}
X #else
X #define       def_str(n)              (configlist[n].def)
X #define       def_num(n)              ((int)(configlist[n].def))
X #define       stack_str(n)            (configlist[n].stack)
X #define       stack_num(n)            ((int)(configlist[n].stack))
-#define        DEFCONF(i,c,v,d,f)      {i, sizeof(i) - 1, \
+#define        DEFCONF(i,c,v,d,f)      {i, strsize(i), \
X                               c, &(v), (char *)d, NULL, f, 0, 0}
X #endif
X #define       ROTCONF(i,c,v,d,f)      DEFCONF(i, c, v, d, (f) | CF_NOUSER)
@@ -116,7 +116,7 @@
X 
X       ROTCONF("debuglevel", 'd', debuglevel, 0, CF_INT | CF_PRIORARGS),
X };
-#define        CONFIGLISTSIZ   ((int)sizeof(configlist) / sizeof(config_t))
+#define        CONFIGLISTSIZ   arraysize(configlist)
X 
X static int NEAR conf_isvalid __P_((int));
X static int NEAR conf_canset __P_((int, int));
diff -urNP ../MHpopd-1.00a/dirent.c ./dirent.c
--- ../MHpopd-1.00a/dirent.c    Tue May 31 00:00:00 2005
+++ ./dirent.c  Tue May 30 00:00:00 2006
@@ -6,7 +6,6 @@
X 
X #include "mhpopd.h"
X #include "kctype.h"
-#include "printf.h"
X #include "fileio.h"
X 
X static int NEAR dir_isdot __P_((char *));
@@ -74,7 +73,7 @@
X               if (dir_isdot(dp -> d_name)) continue;
X               if (!dir_isnumeric(dp -> d_name, &val)) continue;
X 
-               snprintf2(&(path[n]), sizeof(path) - n, "/%d", val);
+               snprintf2(&(path[n]), (int)sizeof(path) - n, "/%d", val);
X               if (stat_isreg(path, 0) <= 0) continue;
X 
X               new = (int *)Xrealloc(list, (argc + 1) * sizeof(int));
@@ -117,7 +116,8 @@
X               for (j = 0; args[j]; j++) {
X                       if (!dir_isnumeric(args[j], &val)) continue;
X 
-                       snprintf2(&(path[n]), sizeof(path) - n, "/%d", val);
+                       snprintf2(&(path[n]), (int)sizeof(path) - n,
+                               "/%d", val);
X                       if (stat_isreg(path, 0) <= 0) continue;
X 
X                       new = (int *)Xrealloc(list, (argc + 1) * sizeof(int));
diff -urNP ../MHpopd-1.00a/filesys.c ./filesys.c
--- ../MHpopd-1.00a/filesys.c   Tue May 31 00:00:00 2005
+++ ./filesys.c Tue May 30 00:00:00 2006
@@ -5,30 +5,29 @@
X  */
X 
X #include "mhpopd.h"
-#include "printf.h"
X #include "fileio.h"
X 
X #ifdef        USEMNTENTH
X #include <mntent.h>
-typedef struct mntent  mnt_t;
-#define        Xsetmntent      setmntent
-#define        Xgetmntent(f,m) getmntent(f)
-#define        Xendmntent      endmntent
+typedef struct mntent          mnt_t;
+#define        Xsetmntent              setmntent
+#define        Xgetmntent(f,m)         getmntent(f)
+#define        Xendmntent              endmntent
X #endif        /* USEMNTENTH */
X 
X #ifdef        USEMNTTABH
X #include <sys/mnttab.h>
-#define        MOUNTED         MNTTAB
-typedef struct mnttab  mnt_t;
-#define        Xsetmntent      fopen
-#define        Xgetmntent(f,m) (getmntent(f, m) ? NULL : m)
-#define        Xendmntent      fclose
-#define        mnt_dir         mnt_mountp
-#define        mnt_fsname      mnt_special
-#define        mnt_type        mnt_fstype
-#ifndef        mnt_opts
-#define        mnt_opts        mnt_mntopts
-#endif
+#define        MOUNTED                 MNTTAB
+typedef struct mnttab          mnt_t;
+#define        Xsetmntent              fopen
+#define        Xgetmntent(f,m)         (getmntent(f, m) ? NULL : m)
+#define        Xendmntent              fclose
+#define        mnt_dir                 mnt_mountp
+#define        mnt_fsname              mnt_special
+#define        mnt_type                mnt_fstype
+# ifndef       mnt_opts
+# define       mnt_opts        mnt_mntopts
+# endif
X #endif        /* USEMNTTABH */
X 
X #ifdef        USEMNTCTL
@@ -39,7 +38,8 @@
X #endif        /* USEMNTCTL */
X 
X #if   !defined (USEMOUNTH) && !defined (USEFSDATA) \
-&& (defined (USEGETFSSTAT) || defined (USEMNTINFOR) || defined (USEMNTINFO))
+&& (defined (USEGETFSSTAT) || defined (USEGETVFSTAT) \
+|| defined (USEMNTINFOR) || defined (USEMNTINFO))
X #include <sys/mount.h>
X #endif
X 
@@ -47,8 +47,9 @@
X #include <sys/fs_types.h>
X #endif
X 
-#if    defined (USEGETFSSTAT) || defined (USEMNTCTL) \
-|| defined (USEMNTINFOR) || defined (USEMNTINFO) || defined (USEGETMNT)
+#if    defined (USEGETFSSTAT) || defined (USEGETVFSTAT) \
+|| defined (USEMNTCTL) || defined (USEMNTINFOR) || defined (USEMNTINFO) \
+|| defined (USEGETMNT)
X typedef struct _mnt_t {
X       char *mnt_fsname;
X       char *mnt_dir;
@@ -57,29 +58,30 @@
X } mnt_t;
X static FILE *NEAR Xsetmntent __P_((char *, char *));
X static mnt_t *NEAR Xgetmntent __P_((FILE *, mnt_t *));
-#if    defined (USEMNTINFO) || defined (USEGETMNT)
-#define        Xendmntent(f)
-#else
-#define        Xendmntent      Xfree
-#endif
+# if   defined (USEMNTINFO) || defined (USEGETMNT)
+# define       Xendmntent(f)
+# else
+# define       Xendmntent      Xfree
+# endif
X static int mnt_ptr = 0;
X static int mnt_size = 0;
-#endif
+#endif /* USEGETFSSTAT || USEGETVFSTAT || USEMNTCTL \
+|| USEMNTINFOR || USEMNTINFO || USEGETMNT */
X 
X #ifdef        USEGETFSENT
X #include <fstab.h>
-typedef struct fstab   mnt_t;
-#define        Xsetmntent(f,m) (FILE *)(setfsent(), NULL)
-#define        Xgetmntent(f,m) getfsent()
-#define        Xendmntent(f)   endfsent()
-#define        mnt_dir         fs_file
-#define        mnt_fsname      fs_spec
-#define        mnt_type        fs_vfstype
+typedef struct fstab           mnt_t;
+#define        Xsetmntent(f,m)         (FILE *)(setfsent(), NULL)
+#define        Xgetmntent(f,m)         getfsent()
+#define        Xendmntent(f)           endfsent()
+#define        mnt_dir                 fs_file
+#define        mnt_fsname              fs_spec
+#define        mnt_type                fs_vfstype
X #endif        /* USEGETFSENT */
X 
-#ifdef USESTATVFSH
+#if    defined (USESTATVFSH) || defined (USEGETVFSTAT)
X #include <sys/statvfs.h>
-#endif /* USESTATVFSH */
+#endif
X 
X #ifdef        USESTATFSH
X #include <sys/statfs.h>
@@ -102,7 +104,7 @@
X #endif
X 
X #define       FSYS_MNTNFS     "nfs"
-#define        FSYS_MNTNFSLEN  (sizeof(FSYS_MNTNFS) - 1)
+#define        FSYS_MNTNFSLEN  strsize(FSYS_MNTNFS)
X 
X static int NEAR fsys_getmnt __P_((char *, mnt_t *));
X 
@@ -176,84 +178,97 @@
X       mntp -> mnt_fsname = fsname;
X       mntp -> mnt_dir = dir;
X       mntp -> mnt_type = (type) ? type : "???";
-       mntp -> mnt_opts = (vmntp -> vmt_flags & MNT_READONLY) ? "ro" : "";
+       mntp -> mnt_opts =
+               (vmntp -> vmt_flags & MNT_READONLY) ? "ro" : nullstr;
X       mnt_ptr += vmntp -> vmt_length;
X 
X       return(mntp);
X }
X #endif        /* USEMNTCTL */
X 
-#if    defined (USEMNTINFOR) || defined (USEMNTINFO) || defined (USEGETFSSTAT)
+#if    defined (USEMNTINFOR) || defined (USEMNTINFO) \
+|| defined (USEGETFSSTAT) || defined (USEGETVFSTAT)
+
+#ifdef USEGETVFSTAT
+#define        f_flags                 f_flag
+#define        Xgetfsstat              getvfsstat
+typedef struct statvfs         mntinfo_t;
+#else
+#define        Xgetfsstat              getfsstat
+typedef struct statfs          mntinfo_t;
+#endif
+
+#if    !defined (MNT_RDONLY) && defined (M_RDONLY)
+#define        MNT_RDONLY              M_RDONLY
+#endif
+
X /*ARGSUSED*/
X static FILE *NEAR Xsetmntent(file, mode)
X char *file, *mode;
X {
-#ifndef        USEMNTINFO
+# ifndef       USEMNTINFO
X       int size;
-#endif
-       struct statfs *buf;
+# endif
+       mntinfo_t *buf;
X 
X       buf = NULL;
X       mnt_ptr = mnt_size = 0;
-#ifdef USEMNTINFO
+
+# ifdef        USEMNTINFO
X       mnt_size = getmntinfo(&buf, MNT_NOWAIT);
-#else
-# ifdef        USEMNTINFOR
+# else /* !USEMNTINFO */
+#  ifdef       USEMNTINFOR
X       size = 0;
X       getmntinfo_r(&buf, MNT_WAIT, &mnt_size, &size);
-# else
-       size = (getfsstat(NULL, 0, MNT_WAIT) + 1) * sizeof(struct statfs);
+#  else
+       size = (Xgetfsstat(NULL, 0, MNT_WAIT) + 1) * sizeof(mntinfo_t);
X       if (size > 0) {
-               if (!(buf = (struct statfs *)Xmalloc(mnt_size))) return(NULL);
-               mnt_size = getfsstat(buf, mnt_size, MNT_WAIT);
+               if (!(buf = (mntinfo_t *)Xmalloc(mnt_size))) return(NULL);
+               mnt_size = Xgetfsstat(buf, mnt_size, MNT_WAIT);
X       }
-# endif
-#endif
+#  endif
+# endif        /* !USEMNTINFO */
X 
X       return((FILE *)buf);
X }
X 
-#if    !defined (MNT_RDONLY) && defined (M_RDONLY)
-#define        MNT_RDONLY      M_RDONLY
-#endif
-
X static mnt_t *NEAR Xgetmntent(fp, mntp)
X FILE *fp;
X mnt_t *mntp;
X {
-#ifdef USEMNTINFO
-# ifdef        USEVFCNAME
+# if   defined (USEMNTINFO) || defined (USEGETVFSTAT)
+#  ifdef       USEVFCNAME
X       struct vfsconf *conf;
-# define       getvfsbynumber(n)       ((conf = getvfsbytype(n)) \
+#  define      getvfsbynumber(n)       ((conf = getvfsbytype(n)) \
X                                       ? conf -> vfc_name : NULL)
-# else /* !USEVFCNAME */
-#  ifdef       USEFFSTYPE
-#  define      getvfsbynumber(n)       (buf[mnt_ptr].f_fstypename)
-#  else
-#   ifdef      INITMOUNTNAMES
+#  else        /* !USEVFCNAME */
+#   ifdef      USEFFSTYPE
+#   define     getvfsbynumber(n)       (buf[mnt_ptr].f_fstypename)
+#   else       /* !USEFFSTYPE */
+#    ifdef     INITMOUNTNAMES
X       static char *mnt_names[] = INITMOUNTNAMES;
-#   define     getvfsbynumber(n)       (((n) <= MOUNT_MAXTYPE) \
+#    define    getvfsbynumber(n)       (((n) <= MOUNT_MAXTYPE) \
X                                       ? mnt_names[n] : NULL)
-#   else
-#   define     getvfsbynumber(n)       (NULL)
-#   endif
-#  endif
-# endif        /* !USEVFCNAME */
-#else  /* !USEMNTINFO */
-# ifdef        USEGETFSSTAT
-# define       getvfsbynumber(n)       (((n) <= MOUNT_MAXTYPE) \
+#    else
+#    define    getvfsbynumber(n)       (NULL)
+#    endif
+#   endif      /* !USEFFSTYPE */
+#  endif       /* !USEVFCNAME */
+# else /* !USEMNTINFO && !USEGETVFSTAT */
+#  ifdef       USEGETFSSTAT
+#  define      getvfsbynumber(n)       (((n) <= MOUNT_MAXTYPE) \
X                                       ? mnt_names[n] : NULL)
-# endif
-#endif /* !USEMNTINFO */
+#  endif
+# endif        /* !USEMNTINFO && !USEGETVFSTAT */
X       static char *fsname = NULL;
X       static char *dir = NULL;
X       static char *type = NULL;
-       struct statfs *buf;
+       mntinfo_t *buf;
X       char *cp, *new;
X       ALLOC_T len;
X 
X       if (mnt_ptr >= mnt_size) return(NULL);
-       buf = (struct statfs *)fp;
+       buf = (mntinfo_t *)fp;
X 
X       len = strlen(buf[mnt_ptr].f_mntfromname) + 1;
X       if (!(new = Xrealloc(fsname, len))) return(NULL);
@@ -280,12 +295,13 @@
X       mntp -> mnt_fsname = fsname;
X       mntp -> mnt_dir = dir;
X       mntp -> mnt_type = (type) ? type : "???";
-       mntp -> mnt_opts = (buf[mnt_ptr].f_flags & MNT_RDONLY) ? "ro" : "";
+       mntp -> mnt_opts =
+               (buf[mnt_ptr].f_flags & MNT_RDONLY) ? "ro" : nullstr;
X       mnt_ptr++;
X 
X       return(mntp);
X }
-#endif /* USEMNTINFOR || USEMNTINFO || USEGETFSSTAT */
+#endif /* USEMNTINFOR || USEMNTINFO || USEGETFSSTAT || USEGETVFSTAT */
X 
X #ifdef        USEGETMNT
X /*ARGSUSED*/
@@ -330,7 +346,7 @@
X       mntp -> mnt_fsname = fsname;
X       mntp -> mnt_dir = dir;
X       mntp -> mnt_type = type;
-       mntp -> mnt_opts = (buf.fd_req.flags & M_RONLY) ? "ro" : "";
+       mntp -> mnt_opts = (buf.fd_req.flags & M_RONLY) ? "ro" : nullstr;
X 
X       return(mntp);
X }
@@ -346,9 +362,8 @@
X       ALLOC_T len, match;
X 
X       if (!mntbuf) mntbuf = &mnt;
-
-
X       match = (ALLOC_T)0;
+
X       if (!(fp = Xsetmntent(MOUNTED, "r"))) return(-1);
X       for (;;) {
X               if (!(mntp = Xgetmntent(fp, &mnt))) break;
@@ -366,7 +381,6 @@
X       while ((mntp = Xgetmntent(fp, &mnt)))
X               if (!strcmp(fsname, mntp -> mnt_fsname)) break;
X       Xendmntent(fp);
-
X       if (!mntp) {
X               errno = ENOENT;
X               return(-1);
diff -urNP ../MHpopd-1.00a/func.h ./func.h
--- ../MHpopd-1.00a/func.h      Tue May 31 00:00:00 2005
+++ ./func.h    Tue May 30 00:00:00 2006
@@ -72,8 +72,10 @@
X extern int Xopen __P_((char *, int, int, int));
X extern VOID Xclose __P_((int, char *));
X extern off_t Xlseek __P_((int, off_t, int, char *));
-extern int Xfcntl __P_((int, int, int, char *));
+extern int Xfcntl __P_((int, int, VOID_P, char *));
+#ifndef        NOFLOCK
X extern int Xflock __P_((int, int, char *));
+#endif
X extern int Xftruncate __P_((int, off_t, char *));
X extern int Xpipe __P_((int *));
X extern int Xdup2 __P_((int, int, char *));
diff -urNP ../MHpopd-1.00a/kctype.h ./kctype.h
--- ../MHpopd-1.00a/kctype.h    Tue May 31 00:00:00 2005
+++ ./kctype.h  Tue May 30 00:00:00 2006
@@ -237,6 +237,13 @@
X #define       isskana(s, i)   iskana2((s)[i])
X #define       isjkana(s, i)   (kctypetable[(u_char)((s)[i])] & KC_JKANA)
X 
+#define        isutf2(c1, c2)  ((((u_char)(c1) & 0xe0) == 0xc0) \
+                       && ((u_char)(c2) & 0xc0) == 0x80)
+#define        isutf3(c1, c2, c3) \
+                       (((u_char)(c1) & 0xf0) == 0xe0 \
+                       && ((u_char)(c2) & 0xc0) == 0x80 \
+                       && ((u_char)(c3) & 0xc0) == 0x80)
+
X #define       NOCNV   0
X #define       ENG     1
X #define       SJIS    2
@@ -254,9 +261,11 @@
X 
X #ifdef        CODEEUC
X #define       DEFCODE EUC
+#define        SECCODE SJIS
X #define       KANAWID 2
X #else
X #define       DEFCODE SJIS
+#define        SECCODE EUC
X #define       KANAWID 1
X #endif
X 
@@ -282,31 +291,36 @@
X || (!defined (_NOENGMES) && !defined (_NOJPNMES))
X K_EXTERN int outputkcode K_INIT(NOCNV);
X #endif
+#if    !defined (_NOKANJICONV) && !defined (_NOPTY)
+K_EXTERN int ptyinkcode K_INIT(NOCNV);
+K_EXTERN int ptyoutkcode K_INIT(NOCNV);
+#endif
X #ifndef       _NOKANJIFCONV
X K_EXTERN int fnamekcode K_INIT(NOCNV);
X #endif
X 
-#define        L_INPUT         0
-#define        L_OUTPUT        1
-#define        L_FNAME         2
+#define        L_INPUT         0001
+#define        L_OUTPUT        0002
+#define        L_FNAME         0004
+#define        L_TERMINAL      0010
X 
X K_EXTERN CONST char kanjiiomode[]
X # ifdef       K_INTERN
X = {
-       L_INPUT,        /* NOCNV */
-       L_OUTPUT,       /* ENG */
-       -1,             /* SJIS */
-       -1,             /* EUC */
-       L_INPUT,        /* JIS7 */
-       L_INPUT,        /* O_JIS7 */
-       L_INPUT,        /* JIS8 */
-       L_INPUT,        /* O_JIS8 */
-       L_INPUT,        /* JUNET */
-       L_INPUT,        /* O_JUNET */
-       L_FNAME,        /* HEX */
-       L_FNAME,        /* CAP */
-       -1,             /* UTF8 */
-       -1,             /* M_UTF8 */
+                 L_OUTPUT | L_FNAME | L_TERMINAL,      /* NOCNV */
+                 L_OUTPUT,                             /* ENG */
+       L_INPUT | L_OUTPUT | L_FNAME | L_TERMINAL,      /* SJIS */
+       L_INPUT | L_OUTPUT | L_FNAME | L_TERMINAL,      /* EUC */
+                 L_OUTPUT | L_FNAME,                   /* JIS7 */
+                 L_OUTPUT | L_FNAME,                   /* O_JIS7 */
+                 L_OUTPUT | L_FNAME,                   /* JIS8 */
+                 L_OUTPUT | L_FNAME,                   /* O_JIS8 */
+                 L_OUTPUT | L_FNAME,                   /* JUNET */
+                 L_OUTPUT | L_FNAME,                   /* O_JUNET */
+                            L_FNAME,                   /* HEX */
+                            L_FNAME,                   /* CAP */
+       L_INPUT | L_OUTPUT | L_FNAME | L_TERMINAL,      /* UTF8 */
+       L_INPUT | L_OUTPUT | L_FNAME | L_TERMINAL,      /* M_UTF8 */
X }
X # endif       /* K_INTERN */
X ;
@@ -327,17 +341,17 @@
X 
X #ifdef        _NOKANJICONV
X # ifdef       CODEEUC
-# define       isinkanji1(c)   iseuc(c)
-# define       isinkanji2(c)   iseuc(c)
+# define       isinkanji1(c,k) iseuc(c)
+# define       isinkanji2(c,k) iseuc(c)
X # else
-# define       isinkanji1(c)   issjis1(c)
-# define       isinkanji2(c)   issjis2(c)
+# define       isinkanji1(c,k) issjis1(c)
+# define       isinkanji2(c,k) issjis2(c)
X # endif
X #else /* !_NOKANJICONV */
-#define        isinkanji1(c)   ((inputkcode == EUC) ? iseuc(c) : \
-                       ((inputkcode == SJIS) ? issjis1(c) : 0))
-#define        isinkanji2(c)   ((inputkcode == EUC) ? iseuc(c) : \
-                       ((inputkcode == SJIS) ? issjis2(c) : 0))
+#define        isinkanji1(c,k) (((k) == EUC) ? iseuc(c) : \
+                       (((k) == SJIS) ? issjis1(c) : 0))
+#define        isinkanji2(c,k) (((k) == EUC) ? iseuc(c) : \
+                       (((k) == SJIS) ? issjis2(c) : 0))
X #endif        /* !_NOKANJICONV */
X 
X #endif        /* !__KCTYPE_H_ */
diff -urNP ../MHpopd-1.00a/libc.c ./libc.c
--- ../MHpopd-1.00a/libc.c      Tue May 31 00:00:00 2005
+++ ./libc.c    Tue May 30 00:00:00 2006
@@ -171,10 +171,12 @@
X       duperrno = errno;
X       VOID_C Xfflush(fp);
X 
+#ifndef        NOFLOCK
X       if (fp -> flags & XF_LOCKED) {
X               VOID_C Xlseek(fp -> fd, (off_t)0, SEEK_END, fp -> path);
X               VOID_C Xflock(fp -> fd, LOCK_UN, fp -> path);
X       }
+#endif /* !NOFLOCK */
X       if (!(fp -> flags & XF_NOCLOSE)) {
X               if (fp -> flags & XF_CONNECTED) Xshutdown(fp -> fd, SHUT_RDWR);
X               Xclose(fp -> fd, fp -> path);
@@ -204,6 +206,7 @@
X               return(NULL);
X       }
X 
+#ifndef        NOFLOCK
X       if (!isnfs) {
X               operation = ((flags & O_ACCMODE) == O_RDONLY)
X                       ? LOCK_SH : LOCK_EX;
@@ -213,6 +216,7 @@
X               }
X               fp -> flags |= XF_LOCKED;
X       }
+#endif /* !NOFLOCK */
X 
X       if (trunc && Xftruncate(fd, (off_t)0, path) < 0) {
X               Xfclose(fp);
diff -urNP ../MHpopd-1.00a/log.c ./log.c
--- ../MHpopd-1.00a/log.c       Tue May 31 00:00:00 2005
+++ ./log.c     Tue May 30 00:00:00 2006
@@ -6,10 +6,12 @@
X 
X #include "mhpopd.h"
X #include "kctype.h"
-#include "printf.h"
-#include <syslog.h>
X #include <sys/param.h>
X 
+#ifndef        NOSYSLOG
+#include <syslog.h>
+#endif
+
X static int log_working = 0;
X static CONST char *log_filename = NULL;
X static CONST char *log_function = NULL;
@@ -49,7 +51,7 @@
X       else if (n <= 0) return(NULL);
X       snprintf2(path, sizeof(path), "%s/%s", logdir, myname);
X       if (maxlogsize > 0 && stat_getsize(path, &size, XF_IGNORENOENT) >= 0
-       && size >= maxlogsize) {
+       && size >= (ALLOC_T)maxlogsize * (ALLOC_T)1024) {
X               snprintf2(old, sizeof(old), "%s.old", path);
X               if (Xrename(path, old) < 0) VOID_C Xunlink(path);
X       }
@@ -98,8 +100,8 @@
X       va_end(args);
X 
X       cp = (log_errno > 0) ? Xstrerror(log_errno) : NULL;
-       if (cp && n < (int)sizeof(buf) - 1)
-               snprintf2(&(buf[n]), sizeof(buf) - n, " (%s)", cp);
+       if (cp && n < strsize(buf))
+               snprintf2(&(buf[n]), (int)sizeof(buf) - n, " (%s)", cp);
X 
X       if (log_errno >= 0) {
X               memcpy(log_buf, buf, sizeof(log_buf));
@@ -122,17 +124,19 @@
X               }
X       }
X 
+#ifndef        NOSYSLOG
X       if (!nosyslog) {
X               if (type == LOG_INFO)
X                       syslog(type, "%s", buf);
X               else syslog(type, "%s:%s(%d):%s",
X                       log_filename, log_function, log_line, buf);
X       }
+#endif
X       if ((fp = log_open())) {
X               if (isatty(fp -> fd)) n = 0;
X               else n = snprintf2(tmp, sizeof(tmp),
X                       "%s:%s(%d):", log_filename, log_function, log_line);
-               snprintf2(&(tmp[n]), sizeof(tmp) - n, "%s\n", buf);
+               snprintf2(&(tmp[n]), (int)sizeof(tmp) - n, "%s\n", buf);
X               Xfputs(tmp, fp);
X               Xfclose(fp);
X       }
diff -urNP ../MHpopd-1.00a/machine.h ./machine.h
--- ../MHpopd-1.00a/machine.h   Tue May 31 00:00:00 2005
+++ ./machine.h Tue May 30 00:00:00 2006
@@ -26,6 +26,8 @@
X #define       NOTZFILEH
X #define       USETIMEH
X #define       USEUTIME
+#define        NOFLOCK
+#define        NOSYSLOG
X #define       USEMKTIME
X #define       USESTRERROR
X #define       SENSEPERSEC     20
@@ -366,6 +368,7 @@
X #define       USEMNTCTL
X #define       USERE_COMP
X # if  defined (_AIX41)
+# define       HAVELONGLONG
X # define      USESTATVFSH
X # define      USEMKTIME
X # define      SIGFNCINT
@@ -594,8 +597,6 @@
X #define       DECLSIGLIST
X #define       DECLERRLIST
X #define       USELEAPCNT
-#define        USEMOUNTH
-#define        USEMNTINFO
X #define       USEFFSTYPE
X #define       USERE_COMP
X #define       USESETENV
@@ -605,6 +606,13 @@
X # if  defined (NetBSD1_0) && (NetBSD1_0 < 1)
X # define      USEFFSIZE
X # endif
+# if   defined (__NetBSD_Version__) && (__NetBSD_Version__ >= 300000000)
+# define       USESTATVFSH
+# define       USEGETVFSTAT
+# else
+# define       USEMOUNTH
+# define       USEMNTINFO
+# endif
X #endif
X 
X #if   defined (__bsdi__)
@@ -828,6 +836,7 @@
X /* #define USESTDARGH ;use <stdarg.h> for va_list */
X /* #define USEMKDEVH  ;use <sys/mkdev.h> for major()/minor() */
X /* #define USEMKNODH  ;use <sys/mknod.h> for major()/minor() */
+/* #define USELOCKFH   ;use <sys/lockf.h> for lockf() */
X /* #define USESGTTY   ;use sgtty interface */
X /* #define USETERMIO  ;use termio interface */
X /* #define USETERMIOS ;use termios interface */
@@ -856,6 +865,7 @@
X /* #define USEMNTENTH ;use <mntent.h> as header of the mount entry */
X /* #define USEMNTTABH ;use <sys/mnttab.h> as header of the mount entry */
X /* #define USEGETFSSTAT       ;use getfsstat() to get the mount entry */
+/* #define USEGETVFSTAT        ;use getvfsstat() to get the mount entry */
X /* #define USEMNTCTL  ;use mntctl() to get the mount entry */
X /* #define USEMNTINFOR        ;use getmntinfo_r() to get the mount entry */
X /* #define USEMNTINFO ;use getmntinfo() to get the mount entry */
@@ -880,6 +890,10 @@
X /* #define NOTERMVAR  ;have not termcap variables such as PC, ospeed, etc. */
X /* #define USEUTIME   ;use utime() instead of utimes() */
X /* #define USEGETWD   ;use getwd() instead of getcwd() */
+/* #define USEFCNTLOCK ;use fcntl() lock instead of flock() */
+/* #define USELOCKF    ;use lockf() instead of flock() */
+/* #define NOFLOCK     ;have neither flock() nor lockf() */
+/* #define NOSYSLOG    ;have not syslog() */
X /* #define USETIMELOCAL       ;have timelocal() as inverse of localtime() */
X /* #define USEMKTIME  ;use mktime() instead of timelocal() */
X /* #define USESYSCONF ;use sysconf() for getting system configuration */
@@ -971,6 +985,10 @@
X #define       USEDEVPTMX
X #endif
X 
+#if    defined (POSIX) || defined (SYSV)
+#define        USEFCNTLOCK
+#endif
+
X /*                                 */
X /* Eval configurations by Configur */
X /*                                 */
@@ -1119,41 +1137,51 @@
X #endif
X 
X #if   defined (USEMNTTABH) || defined (USEGETFSSTAT)
+# ifdef        USEGETVFSTAT
+# undef        USEGETVFSTAT
+# endif
+#endif
+
+#if    defined (USEMNTTABH) || defined (USEGETFSSTAT) \
+|| defined (USEGETVFSTAT)
X # ifdef       USEMNTCTL
X # undef       USEMNTCTL
X # endif
X #endif
X 
-#if    defined (USEMNTTABH) || defined (USEGETFSSTAT) || defined (USEMNTCTL)
+#if    defined (USEMNTTABH) || defined (USEGETFSSTAT) \
+|| defined (USEGETVFSTAT) || defined (USEMNTCTL)
X # ifdef       USEMNTINFOR
X # undef       USEMNTINFOR
X # endif
X #endif
X 
-#if    defined (USEMNTTABH) || defined (USEGETFSSTAT) || defined (USEMNTCTL) \
-|| defined (USEMNTINFOR)
+#if    defined (USEMNTTABH) || defined (USEGETFSSTAT) \
+|| defined (USEGETVFSTAT) || defined (USEMNTCTL) || defined (USEMNTINFOR)
X # ifdef       USEMNTINFO
X # undef       USEMNTINFO
X # endif
X #endif
X 
-#if    defined (USEMNTTABH) || defined (USEGETFSSTAT) || defined (USEMNTCTL) \
-|| defined (USEMNTINFOR) || defined (USEMNTINFO)
+#if    defined (USEMNTTABH) || defined (USEGETFSSTAT) \
+|| defined (USEGETVFSTAT) || defined (USEMNTCTL) || defined (USEMNTINFOR) \
+|| defined (USEMNTINFO)
X # ifdef       USEGETMNT
X # undef       USEGETMNT
X # endif
X #endif
X 
-#if    defined (USEMNTTABH) || defined (USEGETFSSTAT) || defined (USEMNTCTL) \
-|| defined (USEMNTINFOR) || defined (USEMNTINFO) || defined (USEGETMNT)
+#if    defined (USEMNTTABH) || defined (USEGETFSSTAT) \
+|| defined (USEGETVFSTAT) || defined (USEMNTCTL) || defined (USEMNTINFOR) \
+|| defined (USEMNTINFO) || defined (USEGETMNT)
X # ifdef       USEGETFSENT
X # undef       USEGETFSENT
X # endif
X #endif
X 
-#if    defined (USEMNTTABH) || defined (USEGETFSSTAT) || defined (USEMNTCTL) \
-|| defined (USEMNTINFOR) || defined (USEMNTINFO) || defined (USEGETMNT) \
-|| defined (USEGETFSENT)
+#if    defined (USEMNTTABH) || defined (USEGETFSSTAT) \
+|| defined (USEGETVFSTAT) || defined (USEMNTCTL) || defined (USEMNTINFOR) \
+|| defined (USEMNTINFO) || defined (USEGETMNT) || defined (USEGETFSENT)
X # ifdef       USEMNTENTH
X # undef       USEMNTENTH
X # endif
diff -urNP ../MHpopd-1.00a/main.c ./main.c
--- ../MHpopd-1.00a/main.c      Tue May 31 00:00:00 2005
+++ ./main.c    Tue May 30 00:00:00 2006
@@ -26,12 +26,12 @@
X #endif
X       len = strlen(s);
X       myname = MHPOPD;
-       if (len == sizeof(MHPOPD) - 1 && !strnpathcmp(s, myname, len)) {
+       if (len == strsize(MHPOPD) && !strnpathcmp(s, myname, len)) {
X               mh_protocol = MHP_POP3;
X               return(0);
X       }
X       myname = MHSMTPD;
-       if (len == sizeof(MHSMTPD) - 1 && !strnpathcmp(s, myname, len)) {
+       if (len == strsize(MHSMTPD) && !strnpathcmp(s, myname, len)) {
X               mh_protocol = MHP_SMTP;
X               return(0);
X       }
diff -urNP ../MHpopd-1.00a/message.c ./message.c
--- ../MHpopd-1.00a/message.c   Tue May 31 00:00:00 2005
+++ ./message.c Tue May 30 00:00:00 2006
@@ -6,7 +6,6 @@
X 
X #include "mhpopd.h"
X #include "kctype.h"
-#include "printf.h"
X 
X static char *NEAR msg_addline __P_((char *, ALLOC_T *, char *, ALLOC_T, int));
X 
@@ -144,7 +143,7 @@
X 
X       VA_START(args, fmt);
X       n = vsnprintf2(buf, sizeof(buf), fmt, args);
-       n += snprintf2(&(buf[n]), sizeof(buf) - n, "\r\n");
+       n += snprintf2(&(buf[n]), (int)sizeof(buf) - n, "\r\n");
X       va_end(args);
X 
X       return(Xfwrite((u_char *)buf, n, fp));
diff -urNP ../MHpopd-1.00a/mhcmd.c ./mhcmd.c
--- ../MHpopd-1.00a/mhcmd.c     Tue May 31 00:00:00 2005
+++ ./mhcmd.c   Tue May 30 00:00:00 2006
@@ -6,7 +6,6 @@
X 
X #include "mhpopd.h"
X #include "kctype.h"
-#include "printf.h"
X #include "fileio.h"
X 
X #define       MH_MAXWAIT      5
@@ -169,7 +168,7 @@
X       if (!folder || !*folder || !sequence || !*sequence) return(-1);
X 
X       if ((n = mh_genpath(path, sizeof(path), folder, -1)) < 0) return(-1);
-       snprintf2(&(path[n]), sizeof(path) - n, "/%s", sequence);
+       snprintf2(&(path[n]), (int)sizeof(path) - n, "/%s", sequence);
X       if ((n = mh_getfield(path, curstr, tmp, sizeof(tmp))) < 0) return(-1);
X       if (!n || !isdigit2(*tmp) || (n = atoi(tmp)) < 0) n = 0;
X 
@@ -186,7 +185,7 @@
X       if (cur < 0) return(-1);
X       if (!folder || !*folder || !sequence || !*sequence) return(-1);
X       if ((n = mh_genpath(path, sizeof(path), folder, -1)) < 0) return(-1);
-       snprintf2(&(path[n]), sizeof(path) - n, "/%s", sequence);
+       snprintf2(&(path[n]), (int)sizeof(path) - n, "/%s", sequence);
X       snprintf2(tmp, sizeof(tmp), "%s: %d\n", curstr, cur);
X 
X       return(mh_setfield(path, curstr, tmp));
@@ -273,9 +272,9 @@
X 
X               if ((last = mh_getlast(buf)) >= 0) for (i = 0; i < n; i++) {
X                       if (list[i] <= seq) continue;
-                       snprintf2(&(src[slen]), sizeof(src) - slen,
+                       snprintf2(&(src[slen]), (int)sizeof(src) - slen,
X                               "/%d", list[i]);
-                       snprintf2(&(dest[dlen]), sizeof(dest) - dlen,
+                       snprintf2(&(dest[dlen]), (int)sizeof(dest) - dlen,
X                               "/%d", last + 1);
X                       if (Xrename(src, dest) < 0) continue;
X 
@@ -310,7 +309,7 @@
X 
X               if ((last = mh_getlast(draftdir)) < 0) return(NULL);
X               last++;
-               snprintf2(&(path[n]), sizeof(path) - n, "/%d", last);
+               snprintf2(&(path[n]), (int)sizeof(path) - n, "/%d", last);
X               snprintf2(file, size, "%s/%d", draftdir, last);
X       }
X 
@@ -328,7 +327,7 @@
X       int i, n, fd;
X 
X       if ((n = mh_genpath(path, sizeof(path), NULL, -1)) < 0) return(-1);
-       snprintf2(&(path[n]), sizeof(path) - n, "/.%s.lck", s);
+       snprintf2(&(path[n]), (int)sizeof(path) - n, "/.%s.lck", s);
X 
X       for (i = 0; i < MH_MAXWAIT * 10; i++) {
X               if (sig_check(1) < 0) return(-1);
@@ -357,7 +356,7 @@
X       int n;
X 
X       if ((n = mh_genpath(path, sizeof(path), NULL, -1)) < 0) return(-1);
-       snprintf2(&(path[n]), sizeof(path) - n, "/.%s.lck", s);
+       snprintf2(&(path[n]), (int)sizeof(path) - n, "/.%s.lck", s);
X       sig_pop(path);
X 
X       return(Xunlink(path));
@@ -442,8 +441,8 @@
X                       n = Xread(fd, &uc, sizeof(uc), 0, NULL);
X                       if (n <= 0 || uc == '\r' || uc == '\n') break;
X                       buf[ptr] = uc;
-                       if (ptr < sizeof(buf) - 1) ptr++;
-                       else memmove(buf, &(buf[1]), sizeof(buf) - 1);
+                       if (ptr < strsize(buf)) ptr++;
+                       else memmove(buf, &(buf[1]), strsize(buf));
X               }
X               if (n < 0) {
X                       if ((errno != EIO && errno != EINVAL)
diff -urNP ../MHpopd-1.00a/mhpass_j.cat ./mhpass_j.cat
--- ../MHpopd-1.00a/mhpass_j.cat        Tue May 31 00:00:00 2005
+++ ./mhpass_j.cat      Tue May 30 00:00:00 2006
@@ -34,4 +34,4 @@
X      m^Hmh^Hhp^Hpo^Hop^Hpd^Hd(8), m^Hmh^Hhs^Hsm^Hmt^Htp^Hpd^Hd(8)
X 
X 著^H^H著作^H^H作権^H^H権
-     Copyright (C) 2005 by Takashi SHIRAI
+     Copyright (C) 2005-2006 by Takashi SHIRAI
diff -urNP ../MHpopd-1.00a/mhpass_j.man ./mhpass_j.man
--- ../MHpopd-1.00a/mhpass_j.man        Tue May 31 00:00:00 2005
+++ ./mhpass_j.man      Tue May 30 00:00:00 2006
@@ -1,10 +1,10 @@
X .\"
-.\" Copyright (c) 2005 Takashi SHIRAI
+.\" Copyright (C) 2005-2006 Takashi SHIRAI
X .\"                    <shirai@unixusers.net>
X .\"
-.\" @(#)mhpasswd.1   1.00a 05/31/05
+.\" @(#)mhpasswd.1   1.00b 05/30/06
X .\"   mhpasswd - password generator for MHpopd
-.TH MHPASSWD 1 "May 31, 2005"
+.TH MHPASSWD 1 "May 30, 2006"
X .de sh
X .br
X .PP
@@ -60,4 +60,4 @@
X .BR mhpopd (8),
X .BR mhsmtpd (8)
X .SH 著作権
-Copyright (C) 2005 by Takashi SHIRAI
+Copyright (C) 2005-2006 by Takashi SHIRAI
diff -urNP ../MHpopd-1.00a/mhpasswd.c ./mhpasswd.c
--- ../MHpopd-1.00a/mhpasswd.c  Tue May 31 00:00:00 2005
+++ ./mhpasswd.c        Tue May 30 00:00:00 2006
@@ -38,7 +38,7 @@
X                       return(1);
X               }
X               len = strlen(pwd -> pw_dir);
-               if (len > sizeof(path) - 1 - sizeof(DEFPASSWDFILE)) {
+               if (len > strsize(path) - sizeof(DEFPASSWDFILE)) {
X                       fprintf(stderr, "%s: Too long home directory\n",
X                               pwd -> pw_dir);
X                       return(1);
@@ -55,7 +55,7 @@
X               fprintf(stderr, "%s Ver. %s\n", cp, VER);
X               return(0);
X       }
-       else if ((len = strlen(argv[1])) > sizeof(path) - 1) {
+       else if ((len = strlen(argv[1])) > strsize(path)) {
X               fprintf(stderr, "%s: Too long filename\n", argv[1]);
X               return(1);
X       }
@@ -73,7 +73,7 @@
X                       PASSWD_MINLEN);
X               return(1);
X       }
-       if (len >= sizeof(buf)) len = sizeof(buf) - 1;
+       if (len >= sizeof(buf)) len = strsize(buf);
X       memcpy(buf, cp, len);
X       buf[len] = '\0';
X 
diff -urNP ../MHpopd-1.00a/mhpasswd.cat ./mhpasswd.cat
--- ../MHpopd-1.00a/mhpasswd.cat        Tue May 31 00:00:00 2005
+++ ./mhpasswd.cat      Tue May 30 00:00:00 2006
@@ -33,4 +33,4 @@
X      m^Hmh^Hh(1), m^Hmh^Hhp^Hpo^Hop^Hpd^Hd(8), m^Hmh^Hhs^Hsm^Hmt^Htp^Hpd^Hd(8)
X 
X C^HCO^HOP^HPY^HYR^HRI^HIG^HGH^HHT^HT
-     Copyright (C) 2005 by Takashi SHIRAI
+     Copyright (C) 2005-2006 by Takashi SHIRAI
diff -urNP ../MHpopd-1.00a/mhpasswd.man ./mhpasswd.man
--- ../MHpopd-1.00a/mhpasswd.man        Tue May 31 00:00:00 2005
+++ ./mhpasswd.man      Tue May 30 00:00:00 2006
@@ -1,10 +1,10 @@
X .\"
-.\" Copyright (c) 2005 Takashi SHIRAI
+.\" Copyright (C) 2005-2006 Takashi SHIRAI
X .\"                    <shirai@unixusers.net>
X .\"
-.\" @(#)mhpasswd.1   1.00a 05/31/05
+.\" @(#)mhpasswd.1   1.00b 05/30/06
X .\"   mhpasswd - password generator for MHpopd
-.TH MHPASSWD 1 "May 31, 2005"
+.TH MHPASSWD 1 "May 30, 2006"
X .de sh
X .br
X .PP
@@ -66,4 +66,4 @@
X .BR mhpopd (8),
X .BR mhsmtpd (8)
X .SH COPYRIGHT
-Copyright (C) 2005 by Takashi SHIRAI
+Copyright (C) 2005-2006 by Takashi SHIRAI
diff -urNP ../MHpopd-1.00a/mhpopd.cat ./mhpopd.cat
--- ../MHpopd-1.00a/mhpopd.cat  Tue May 31 00:00:00 2005
+++ ./mhpopd.cat        Tue May 30 00:00:00 2006
@@ -407,4 +407,4 @@
X      l^Hlo^Hog^Hgd^Hd(8)
X 
X C^HCO^HOP^HPY^HYR^HRI^HIG^HGH^HHT^HT
-     Copyright (C) 2005 by Takashi SHIRAI
+     Copyright (C) 2005-2006 by Takashi SHIRAI
diff -urNP ../MHpopd-1.00a/mhpopd.h ./mhpopd.h
--- ../MHpopd-1.00a/mhpopd.h    Tue May 31 00:00:00 2005
+++ ./mhpopd.h  Tue May 30 00:00:00 2006
@@ -8,6 +8,7 @@
X #include <string.h>
X #include <errno.h>
X #include "machine.h"
+#include "printf.h"
X 
X #ifndef       NOUNISTDH
X #include <unistd.h>
SHAR_EOF
  : || $echo 'restore of' 'MHpopd-1.00b.patch' 'failed'
fi
$echo 'End of' 'MHpopd-1.00b.patch' 'part' '1'
$echo 'File' 'MHpopd-1.00b.patch' 'is continued in part' '2'
echo 2 > _sh00748/seq
exit 0
-- 
                                               しらい たかし