nmh-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated


From: Ken Hornstein
Subject: [Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 93bd0519e7383755a82da4aeff3e1e368f048525
Date: Wed, 04 Jan 2012 03:29:18 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The nmh Mail Handling System".

The branch, master has been updated
       via  93bd0519e7383755a82da4aeff3e1e368f048525 (commit)
       via  403c91f8d575003b1b6396bcbb60a0fe5c3683fa (commit)
       via  07661da3d824585f12d0b5d19cc262115bea979a (commit)
       via  c70ca7816838825c93fbc54ac9e4a6e2a7bef6d8 (commit)
       via  3865f55b4195bac67932ac3aacbd8f3c53239b62 (commit)
       via  a93204a5abced109070990a2b9d567344f352cbd (commit)
       via  9a69af8582a7268e45383d1b518c38000db5bf8e (commit)
       via  164be8e5e8b40ce4572281be26d423a9c9d595f3 (commit)
       via  c696510f3aea5e0181a326d1f044d1952f87d26a (commit)
       via  c267220c147445266cdb9fb20e7e2c22957138f3 (commit)
       via  3f05764b66c12e358878ecd7efdb393740acd9f1 (commit)
       via  666e1973600c0952d3bc3c1f8fb51ecfa16a6998 (commit)
       via  9e3ce028db3b9fe01032ddee77df80210f7d0217 (commit)
       via  ec8527028003cd9bd8170b5aa3f8ba63020487d3 (commit)
       via  e356655aaaabfd0e0fb3941177a495403ff08634 (commit)
       via  cf77619e653bb068c8069a2da757ae9e89f7037f (commit)
       via  3cadd47a71d0d3c78f88bde8042bab8905107152 (commit)
       via  38eb01750ce11fabaccbb0850843d825f3557c7b (commit)
       via  ed759f583c7c5b2487ee5317d3ad4bc791a1d249 (commit)
       via  156785f9320f2e2ec7caa66e1fa7807a9e92b949 (commit)
       via  d1b702b1220d45e441b2b9597a8cf58edb51a653 (commit)
       via  a7c1fa07ded2209d535bcb37ff6f8605afb20605 (commit)
       via  b4973af5791d58baeb1eb742b3769fcd29f93ddd (commit)
       via  a940963381421de5cd0354c6fd1491754b5d1f5c (commit)
      from  eaa371139c2042251ab0376cfddc6983833fd2ba (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=93bd0519e7383755a82da4aeff3e1e368f048525


commit 93bd0519e7383755a82da4aeff3e1e368f048525
Author: Ken Hornstein <address@hidden>
Date:   Tue Jan 3 22:28:44 2012 -0500

    Whoops, for right now we do need those signal function checks.

diff --git a/configure.in b/configure.in
index 942e6ca..9cb18fc 100644
--- a/configure.in
+++ b/configure.in
@@ -487,7 +487,8 @@ AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM,1,
 dnl ---------------
 dnl CHECK FUNCTIONS
 dnl ---------------
-AC_CHECK_FUNCS(writev lstat tzset getutent nl_langinfo)
+AC_CHECK_FUNCS(writev lstat tzset getutent nl_langinfo sigaction sigprocmask \
+              sigblock sigsetmask sighold sigrelse)
 
 dnl Look for the initgroups() declaration.  On AIX 4.[13], Solaris 4.1.3, and
 dnl ULTRIX 4.2A the function is defined in libc but there's no declaration in

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=403c91f8d575003b1b6396bcbb60a0fe5c3683fa


commit 403c91f8d575003b1b6396bcbb60a0fe5c3683fa
Author: Ken Hornstein <address@hidden>
Date:   Tue Jan 3 22:21:07 2012 -0500

    Switch to standard autoconf macro for checking d_type field in struct 
dirent.

diff --git a/aclocal.m4 b/aclocal.m4
index 20d123f..eada924 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -74,55 +74,3 @@ else
   :
 fi
 ])dnl
-
-dnl ----------------
-dnl CHECK FOR d_type
-dnl ----------------
-dnl
-dnl From Jim Meyering.
-dnl
-dnl Check whether struct dirent has a member named d_type.
-dnl
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
-# Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([CHECK_TYPE_STRUCT_DIRENT_D_TYPE],
-  [AC_REQUIRE([AC_HEADER_DIRENT])dnl
-   AC_CACHE_CHECK([for d_type member in directory struct],
-                  jm_cv_struct_dirent_d_type,
-     [AC_TRY_LINK(dnl
-       [
-#include <sys/types.h>
-#ifdef HAVE_DIRENT_H
-# include <dirent.h>
-#else /* not HAVE_DIRENT_H */
-# define dirent direct
-# ifdef HAVE_SYS_NDIR_H
-#  include <sys/ndir.h>
-# endif /* HAVE_SYS_NDIR_H */
-# ifdef HAVE_SYS_DIR_H
-#  include <sys/dir.h>
-# endif /* HAVE_SYS_DIR_H */
-# ifdef HAVE_NDIR_H
-#  include <ndir.h>
-# endif /* HAVE_NDIR_H */
-#endif /* HAVE_DIRENT_H */
-       ],
-       [struct dirent dp; dp.d_type = 0;],
-
-       jm_cv_struct_dirent_d_type=yes,
-       jm_cv_struct_dirent_d_type=no)
-     ]
-   )
-   if test $jm_cv_struct_dirent_d_type = yes; then
-     AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1,
-       [Define if there is a member named d_type in the struct describing
-        directory headers.])
-   fi
-  ]
-)
diff --git a/configure.in b/configure.in
index 0a27c85..942e6ca 100644
--- a/configure.in
+++ b/configure.in
@@ -794,7 +794,7 @@ AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,,
 
 AC_CHECK_MEMBERS(struct utmp.ut_type,,,[#include <utmp.h>])
 
-CHECK_TYPE_STRUCT_DIRENT_D_TYPE()
+AC_STRUCT_DIRENT_D_TYPE
 
 dnl -------------
 dnl CHECK SIGNALS

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=07661da3d824585f12d0b5d19cc262115bea979a


commit 07661da3d824585f12d0b5d19cc262115bea979a
Author: Lyndon Nerenberg <address@hidden>
Date:   Mon Dec 26 09:19:35 2011 -0800

    Remove #ifdef around use of sigsetjmp().

diff --git a/configure.in b/configure.in
index 4cdbfca..0a27c85 100644
--- a/configure.in
+++ b/configure.in
@@ -487,16 +487,7 @@ AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM,1,
 dnl ---------------
 dnl CHECK FUNCTIONS
 dnl ---------------
-AC_CHECK_FUNCS(waitpid wait3 sigaction sigprocmask sigblock sigsetmask \
-               sighold sigrelse writev lstat uname tzset mkstemp \
-               getutent nl_langinfo mbtowc wcwidth)
-
-dnl sigsetjmp may be a macro
-AC_MSG_CHECKING(for sigsetjmp)
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <setjmp.h>]],
-  [[sigsetjmp((void *)0, 0);]])],[AC_DEFINE(HAVE_SIGSETJMP, 1,
-    [Define to 1 if you have the `sigsetjmp'.]) AC_MSG_RESULT(yes)],
-  [AC_MSG_RESULT(no)])
+AC_CHECK_FUNCS(writev lstat tzset getutent nl_langinfo)
 
 dnl Look for the initgroups() declaration.  On AIX 4.[13], Solaris 4.1.3, and
 dnl ULTRIX 4.2A the function is defined in libc but there's no declaration in
diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c
index d3397ae..efa9ad3 100644
--- a/uip/mhshowsbr.c
+++ b/uip/mhshowsbr.c
@@ -20,16 +20,6 @@
 #include <h/mhparse.h>
 #include <h/utils.h>
 
-/*
- * Just use sigjmp/longjmp on older machines that
- * don't have sigsetjmp/siglongjmp.
- */
-#ifndef HAVE_SIGSETJMP
-# define sigjmp_buf jmp_buf
-# define sigsetjmp(env,mask) setjmp(env)
-# define siglongjmp(env,val) longjmp(env,val)
-#endif
-
 extern int debugsw;
 
 int pausesw  = 1;

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=c70ca7816838825c93fbc54ac9e4a6e2a7bef6d8


commit c70ca7816838825c93fbc54ac9e4a6e2a7bef6d8
Author: Lyndon Nerenberg <address@hidden>
Date:   Sun Dec 25 19:17:58 2011 -0800

    Remove overrides for 'broken' stat macros.
    Remove redundant SEEK_* macro definitions.

diff --git a/configure.in b/configure.in
index 060086c..4cdbfca 100644
--- a/configure.in
+++ b/configure.in
@@ -463,7 +463,6 @@ AC_SUBST(OURDEFS)
 
 AC_HEADER_STDC
 AC_HEADER_TIME
-AC_HEADER_STAT
 AC_HEADER_TIOCGWINSZ
 AC_CHECK_HEADERS(errno.h fcntl.h crypt.h termcap.h \
                  langinfo.h wchar.h wctype.h iconv.h netdb.h \
diff --git a/h/nmh.h b/h/nmh.h
index 8ff4ba8..00c408f 100644
--- a/h/nmh.h
+++ b/h/nmh.h
@@ -25,19 +25,6 @@
 # include <limits.h>
 
 /*
- * symbolic constants for lseek and fseek
- */
-#ifndef SEEK_SET
-# define SEEK_SET 0
-#endif
-#ifndef SEEK_CUR
-# define SEEK_CUR 1
-#endif
-#ifndef SEEK_END
-# define SEEK_END 2
-#endif
-
-/*
  * we should be getting this value from pathconf(_PC_PATH_MAX)
  */
 #ifndef PATH_MAX
@@ -78,41 +65,3 @@
 #define bcopy(b1,b2,length)     memcpy (b2, b1, length)
 #define bcpy(b1,b2,length)      memcmp (b1, b2, length)
 #define bzero(b,length)         memset (b, 0, length)
-
-/*
- * If your stat macros are broken,
- * we will just undefine them.
- */
-#ifdef STAT_MACROS_BROKEN
-# ifdef S_ISBLK
-#  undef S_ISBLK
-# endif 
-# ifdef S_ISCHR
-#  undef S_ISCHR
-# endif 
-# ifdef S_ISDIR
-#  undef S_ISDIR
-# endif 
-# ifdef S_ISFIFO
-#  undef S_ISFIFO
-# endif 
-# ifdef S_ISLNK
-#  undef S_ISLNK
-# endif 
-# ifdef S_ISMPB
-#  undef S_ISMPB
-# endif 
-# ifdef S_ISMPC
-#  undef S_ISMPC
-# endif 
-# ifdef S_ISNWK
-#  undef S_ISNWK
-# endif 
-# ifdef S_ISREG
-#  undef S_ISREG
-# endif 
-# ifdef S_ISSOCK
-#  undef S_ISSOCK
-# endif 
-#endif  /* STAT_MACROS_BROKEN.  */
-

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=3865f55b4195bac67932ac3aacbd8f3c53239b62


commit 3865f55b4195bac67932ac3aacbd8f3c53239b62
Author: Lyndon Nerenberg <address@hidden>
Date:   Sun Dec 25 17:20:26 2011 -0800

    Include <stdio.h> for snprintf() prototype.

diff --git a/config/config.c b/config/config.c
index c2d307e..b08b3e2 100644
--- a/config/config.c
+++ b/config/config.c
@@ -8,6 +8,7 @@
  */
 
 #include <h/mh.h>
+#include <stdio.h>
 
 #ifdef MHRC
 # include <pwd.h>

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=a93204a5abced109070990a2b9d567344f352cbd


commit a93204a5abced109070990a2b9d567344f352cbd
Author: Lyndon Nerenberg <address@hidden>
Date:   Sun Dec 25 12:23:41 2011 -0800

    Nuke directory processing conditionals; use dirent.h.

diff --git a/configure.in b/configure.in
index a933613..060086c 100644
--- a/configure.in
+++ b/configure.in
@@ -461,10 +461,8 @@ case "$target_os" in
 esac
 AC_SUBST(OURDEFS)
 
-AC_HEADER_DIRENT
 AC_HEADER_STDC
 AC_HEADER_TIME
-AC_HEADER_SYS_WAIT
 AC_HEADER_STAT
 AC_HEADER_TIOCGWINSZ
 AC_CHECK_HEADERS(errno.h fcntl.h crypt.h termcap.h \
diff --git a/h/nmh.h b/h/nmh.h
index c354482..8ff4ba8 100644
--- a/h/nmh.h
+++ b/h/nmh.h
@@ -10,22 +10,8 @@
 #include <ctype.h>
 #include <sys/stat.h>
 
-#if HAVE_DIRENT_H
 # include <dirent.h>
-# define NLENGTH(dirent) strlen((dirent)->d_name)
-#else
-# define dirent direct
-# define NLENGTH(dirent) (dirent)->d_namlen
-# if HAVE_SYS_NDIR_H
-#  include <sys/ndir.h>
-# endif
-# if HAVE_SYS_DIR_H
-#  include <sys/dir.h>
-# endif
-# if HAVE_NDIR_H
-#  include <ndir.h>
-# endif
-#endif
+#define NLENGTH(dirent) strlen((dirent)->d_name)
 
 #include <stdlib.h>
 #include <stdarg.h>

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=9a69af8582a7268e45383d1b518c38000db5bf8e


commit 9a69af8582a7268e45383d1b518c38000db5bf8e
Author: Lyndon Nerenberg <address@hidden>
Date:   Sun Dec 25 12:16:08 2011 -0800

    Add back missing include of <sys/wait.h>

diff --git a/sbr/pidstatus.c b/sbr/pidstatus.c
index 7da78ac..b7aad79 100644
--- a/sbr/pidstatus.c
+++ b/sbr/pidstatus.c
@@ -7,6 +7,7 @@
  * complete copyright information.
  */
 
+#include <sys/wait.h>
 #include <h/mh.h>
 
 /*

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=164be8e5e8b40ce4572281be26d423a9c9d595f3


commit 164be8e5e8b40ce4572281be26d423a9c9d595f3
Author: Lyndon Nerenberg <address@hidden>
Date:   Sun Dec 25 12:09:21 2011 -0800

    Clean up process wait to use POSIX waitpid() interface.

diff --git a/configure.in b/configure.in
index 01dbcf8..a933613 100644
--- a/configure.in
+++ b/configure.in
@@ -806,34 +806,6 @@ AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,,
 
 AC_CHECK_MEMBERS(struct utmp.ut_type,,,[#include <utmp.h>])
 
-AC_MSG_CHECKING(for union wait)
-AC_CACHE_VAL(nmh_cv_union_wait, [dnl
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#include <sys/wait.h>]],
-    [[union wait status; int pid; pid = wait (&status);
-#ifdef WEXITSTATUS
-/* Some POSIXoid systems have both the new-style macros and the old
-   union wait type, and they do not work together.  If union wait
-   conflicts with WEXITSTATUS et al, we don't want to use it at all.  */
-        if (WEXITSTATUS (status) != 0) pid = -1;
-#ifdef WTERMSIG
-        /* If we have WEXITSTATUS and WTERMSIG, just use them on ints.  */
-        -- blow chunks here --
-#endif
-#endif
-#ifdef HAVE_WAITPID
-        /* Make sure union wait works with waitpid.  */
-        pid = waitpid (-1, &status, 0);
-#endif
-      ]])],
-    [nmh_cv_union_wait=yes],
-    [nmh_cv_union_wait=no])])
-if test "$nmh_cv_union_wait" = yes; then
-  AC_DEFINE(HAVE_UNION_WAIT, 1,
-    [Define to 1 if you have the \`union wait' type in <sys/wait.h>.])
-fi
-AC_MSG_RESULT($nmh_cv_union_wait)
-
 CHECK_TYPE_STRUCT_DIRENT_D_TYPE()
 
 dnl -------------
diff --git a/h/prototypes.h b/h/prototypes.h
index d88cf8e..1c55136 100644
--- a/h/prototypes.h
+++ b/h/prototypes.h
@@ -77,8 +77,6 @@ char *m_maildir (char *);
 char *m_mailpath (char *);
 char *m_name (int);
 int m_putenv (char *, char *);
-char *m_scratch (char *, char *);
-char *m_tmpfil (char *);
 char *m_mktemp(const char *, int *, FILE **);
 char *m_mktemp2(const char *, const char *, int *, FILE **);
 void m_unknown(FILE *);
diff --git a/sbr/Makefile.in b/sbr/Makefile.in
index 5bb3f22..83af141 100644
--- a/sbr/Makefile.in
+++ b/sbr/Makefile.in
@@ -61,7 +61,7 @@ SRCS = addrsbr.c ambigsw.c atooi.c brkstring.c                
        \
        fmt_addr.c fmt_compile.c fmt_new.c fmt_rfc2047.c                \
        fmt_scan.c lock_file.c m_atoi.c m_backup.c                      \
        m_convert.c m_draft.c m_getfld.c m_gmprot.c                     \
-       m_maildir.c m_name.c m_scratch.c m_tmpfil.c                     \
+       m_maildir.c m_name.c                                            \
        makedir.c mts.c norm_charmap.c                                  \
        path.c peekc.c pidwait.c pidstatus.c                            \
        print_help.c print_sw.c print_version.c push.c                  \
diff --git a/sbr/lock_file.c b/sbr/lock_file.c
index 0e14e8d..83cf01a 100644
--- a/sbr/lock_file.c
+++ b/sbr/lock_file.c
@@ -431,18 +431,8 @@ lockit (struct lockinfo *li)
     curlock = li->curlock;
     tmplock = li->tmplock;
 
-#ifdef HAVE_MKSTEMP
     if ((fd = mkstemp(tmplock)) == -1)
        return -1;
-#else
-    if (mktemp(tmplock) == NULL)
-       return -1;
-    if (unlink(tmplock) == -1 && errno != ENOENT)
-       return -1;
-    /* create the temporary lock file */
-    if ((fd = creat(tmplock, 0600)) == -1)
-       return -1;
-#endif
 
 #if 0
     /* write our process id into lock file */
diff --git a/sbr/pidstatus.c b/sbr/pidstatus.c
index f16f7e0..7da78ac 100644
--- a/sbr/pidstatus.c
+++ b/sbr/pidstatus.c
@@ -14,10 +14,6 @@
  */
 #include <sigmsg.h>
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 #ifndef WTERMSIG
 # define WTERMSIG(s) ((int)((s) & 0x7F))
 #endif
diff --git a/sbr/pidwait.c b/sbr/pidwait.c
index ef42e1a..f454161 100644
--- a/sbr/pidwait.c
+++ b/sbr/pidwait.c
@@ -12,21 +12,13 @@
 #include <errno.h>
 #include <signal.h>
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 int
 pidwait (pid_t id, int sigsok)
 {
     pid_t pid;
     SIGNAL_HANDLER istat = NULL, qstat = NULL;
 
-#ifdef HAVE_UNION_WAIT
-    union wait status;
-#else
     int status;
-#endif
 
     if (sigsok == -1) {
        /* ignore a couple of signals */
@@ -34,13 +26,8 @@ pidwait (pid_t id, int sigsok)
        qstat = SIGNAL (SIGQUIT, SIG_IGN);
     }
 
-#ifdef HAVE_WAITPID
     while ((pid = waitpid(id, &status, 0)) == -1 && errno == EINTR)
        ;
-#else
-    while ((pid = wait(&status)) != -1 && pid != id)
-       continue;
-#endif
 
     if (sigsok == -1) {
        /* reset the signal handlers */
@@ -48,9 +35,5 @@ pidwait (pid_t id, int sigsok)
        SIGNAL (SIGQUIT, qstat);
     }
 
-#ifdef HAVE_UNION_WAIT
-    return (pid == -1 ? -1 : status.w_status);
-#else
     return (pid == -1 ? -1 : status);
-#endif
 }
diff --git a/uip/mhbuild.c b/uip/mhbuild.c
index 1e86290..d7a3cf0 100644
--- a/uip/mhbuild.c
+++ b/uip/mhbuild.c
@@ -20,10 +20,6 @@
 #include <h/mhcachesbr.h>
 #include <h/utils.h>
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 static struct swit switches[] = {
 #define        CHECKSW                 0
     { "check", 0 },
diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c
index f01abd5..a36941f 100644
--- a/uip/mhbuildsbr.c
+++ b/uip/mhbuildsbr.c
@@ -38,10 +38,6 @@
 # endif
 #endif
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 
 extern int debugsw;
 extern int verbosw;
diff --git a/uip/mhcachesbr.c b/uip/mhcachesbr.c
index 2223e80..79d6bda 100644
--- a/uip/mhcachesbr.c
+++ b/uip/mhcachesbr.c
@@ -32,10 +32,6 @@
 # endif
 #endif
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 extern int debugsw;
 
 extern pid_t xpid;     /* mhshowsbr.c or mhbuildsbr.c */
diff --git a/uip/mhlist.c b/uip/mhlist.c
index cb6a3cf..6ef455d 100644
--- a/uip/mhlist.c
+++ b/uip/mhlist.c
@@ -20,10 +20,6 @@
 #include <h/mhcachesbr.h>
 #include <h/utils.h>
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 static struct swit switches[] = {
 #define        CHECKSW                 0
     { "check", 0 },
diff --git a/uip/mhn.c b/uip/mhn.c
index a7644a3..2ce21d3 100644
--- a/uip/mhn.c
+++ b/uip/mhn.c
@@ -20,10 +20,6 @@
 #include <h/mhcachesbr.h>
 #include <h/utils.h>
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 static struct swit switches[] = {
 #define        AUTOSW                  0
     { "auto", 0 },
diff --git a/uip/mhoutsbr.c b/uip/mhoutsbr.c
index 7e12c46..2651452 100644
--- a/uip/mhoutsbr.c
+++ b/uip/mhoutsbr.c
@@ -19,10 +19,6 @@
 #include <h/mime.h>
 #include <h/mhparse.h>
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 
 extern int ebcdicsw;
 
diff --git a/uip/mhparse.c b/uip/mhparse.c
index d40d78c..14322ab 100644
--- a/uip/mhparse.c
+++ b/uip/mhparse.c
@@ -20,10 +20,6 @@
 #include <h/mhparse.h>
 #include <h/utils.h>
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 
 extern int debugsw;
 
diff --git a/uip/mhshow.c b/uip/mhshow.c
index 191eeff..722dcf6 100644
--- a/uip/mhshow.c
+++ b/uip/mhshow.c
@@ -20,10 +20,6 @@
 #include <h/mhcachesbr.h>
 #include <h/utils.h>
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 static struct swit switches[] = {
 #define        CHECKSW                 0
     { "check", 0 },
diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c
index 368b25c..d3397ae 100644
--- a/uip/mhshowsbr.c
+++ b/uip/mhshowsbr.c
@@ -20,10 +20,6 @@
 #include <h/mhparse.h>
 #include <h/utils.h>
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 /*
  * Just use sigjmp/longjmp on older machines that
  * don't have sigsetjmp/siglongjmp.
@@ -132,11 +128,7 @@ show_single_message (CT ct, char *form)
 {
     sigset_t set, oset;
 
-#ifdef HAVE_UNION_WAIT
-    union wait status;
-#else
     int status;
-#endif
 
     /* Allow user executable bit so that temporary directories created by
      * the viewer (e.g., lynx) are going to be accessible */
@@ -170,11 +162,7 @@ show_single_message (CT ct, char *form)
     SIGPROCMASK (SIG_BLOCK, &set, &oset);
 
     while (wait (&status) != NOTOK) {
-#ifdef HAVE_UNION_WAIT
-       pidcheck (status.w_status);
-#else
        pidcheck (status);
-#endif
        continue;
     }
 
@@ -783,11 +771,7 @@ show_multi_internal (CT ct, int serial, int alternate)
     if (serial && !nowserial) {
        pid_t pid;
        int kids;
-#ifdef HAVE_UNION_WAIT
-       union wait status;
-#else
        int status;
-#endif
 
        kids = 0;
        for (part = m->mp_parts; part; part = part->mp_next) {
@@ -802,11 +786,7 @@ show_multi_internal (CT ct, int serial, int alternate)
        }
 
        while (kids > 0 && (pid = wait (&status)) != NOTOK) {
-#ifdef HAVE_UNION_WAIT
-           pidcheck (status.w_status);
-#else
            pidcheck (status);
-#endif
 
            for (part = m->mp_parts; part; part = part->mp_next) {
                p = part->mp_part;
diff --git a/uip/mhstore.c b/uip/mhstore.c
index 7b44a96..5bc8daa 100644
--- a/uip/mhstore.c
+++ b/uip/mhstore.c
@@ -20,10 +20,6 @@
 #include <h/mhcachesbr.h>
 #include <h/utils.h>
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 static struct swit switches[] = {
 #define        AUTOSW                  0
     { "auto", 0 },
diff --git a/uip/mhtest.c b/uip/mhtest.c
index 5c10b8b..022f6c4 100644
--- a/uip/mhtest.c
+++ b/uip/mhtest.c
@@ -20,10 +20,6 @@
 #include <h/mhcachesbr.h>
 #include <h/utils.h>
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 static struct swit switches[] = {
 #define        CHECKSW                 0
     { "check", 0 },
diff --git a/uip/rcvtty.c b/uip/rcvtty.c
index 219af22..07053d2 100644
--- a/uip/rcvtty.c
+++ b/uip/rcvtty.c
@@ -223,13 +223,7 @@ message_fd (char **vec)
     char tmpfil[BUFSIZ];
     struct stat st;
 
-#ifdef HAVE_MKSTEMP
     fd = mkstemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil)));
-#else
-    unlink (mktemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil))));
-    if ((fd = open (tmpfil, O_RDWR | O_CREAT | O_TRUNC, 0600)) == NOTOK)
-       return header_fd ();
-#endif
     unlink (tmpfil);
 
     if ((child_id = vfork()) == NOTOK) {
diff --git a/uip/spost.c b/uip/spost.c
index c7582ba..e9e44a8 100644
--- a/uip/spost.c
+++ b/uip/spost.c
@@ -350,15 +350,8 @@ main (int argc, char **argv)
        out = stdout;
     }
     else {
-#ifdef HAVE_MKSTEMP
            if ((out = fdopen( mkstemp (tmpfil), "w" )) == NULL )
                adios (tmpfil, "unable to create");
-#else
-           mktemp (tmpfil);
-           if ((out = fopen (tmpfil, "w")) == NULL)
-               adios (tmpfil, "unable to create");
-           chmod (tmpfil, 0600);
-#endif
        }
 
     hdrtab = (msgstate == normal) ? NHeaders : RHeaders;
@@ -747,15 +740,9 @@ make_bcc_file (void)
     char *vec[6];
     FILE * in, *out;
 
-#ifdef HAVE_MKSTEMP
     fd = mkstemp(bccfil);
     if (fd == -1 || (out = fdopen(fd, "w")) == NULL)
        adios (bccfil, "unable to create");
-#else
-    mktemp (bccfil);
-    if ((out = fopen (bccfil, "w")) == NULL)
-       adios (bccfil, "unable to create");
-#endif
     chmod (bccfil, 0600);
 
     fprintf (out, "Date: %s\n", dtimenow (0));
diff --git a/uip/viamail.c b/uip/viamail.c
index aea746d..2e1c51c 100644
--- a/uip/viamail.c
+++ b/uip/viamail.c
@@ -18,10 +18,6 @@
 #include <h/mime.h>
 #include <h/mhparse.h>
 
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
 static struct swit switches[] = {
 #define        TOSW                    0
     { "to mailpath", 0 },

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=c696510f3aea5e0181a326d1f044d1952f87d26a


commit c696510f3aea5e0181a326d1f044d1952f87d26a
Author: Ken Hornstein <address@hidden>
Date:   Tue Jan 3 22:01:07 2012 -0500

    No longer check for the mkstemp() function in the mkstemp library.

diff --git a/configure.in b/configure.in
index 9d750c0..01dbcf8 100644
--- a/configure.in
+++ b/configure.in
@@ -490,7 +490,6 @@ AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM,1,
 dnl ---------------
 dnl CHECK FUNCTIONS
 dnl ---------------
-AC_CHECK_LIB(mkstemp,mkstemp)
 AC_CHECK_FUNCS(waitpid wait3 sigaction sigprocmask sigblock sigsetmask \
                sighold sigrelse writev lstat uname tzset mkstemp \
                getutent nl_langinfo mbtowc wcwidth)

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=c267220c147445266cdb9fb20e7e2c22957138f3


commit c267220c147445266cdb9fb20e7e2c22957138f3
Author: Lyndon Nerenberg <address@hidden>
Date:   Sun Dec 25 11:58:38 2011 -0800

    Make use of mkstemp() unconditional (vs. mktemp().
    
    This patch also removes the m_scratch() and m_tmpfil() functions.
    They have been deprecated for a while, and are no longer used in any of
    the code base.

diff --git a/sbr/m_scratch.c b/sbr/m_scratch.c
deleted file mode 100644
index 3c63d09..0000000
--- a/sbr/m_scratch.c
+++ /dev/null
@@ -1,41 +0,0 @@
-
-/*
- * m_scratch.c -- construct a scratch file
- *
- * This code is Copyright (c) 2002, by the authors of nmh.  See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
-
-#include <h/mh.h>
-
-/***************************************************************************
- * DO NOT USE THIS FUNCTION!  IT WILL BE REMOVED IN THE FUTURE.
- * THIS FUNCTION IS INSECURE.  USE THE FUNCTIONS DEFINED IN m_mktemp.c.
- ***************************************************************************/
-char *
-m_scratch (char *file, char *template)
-{
-    char *cp;
-    static char buffer[BUFSIZ], tmpfil[BUFSIZ];
-
-    snprintf (tmpfil, sizeof(tmpfil), "%sXXXXXX", template);
-/*
-  Mkstemp work postponed until later -Doug
-#ifdef HAVE_MKSTEMP
-    mkstemp (tmpfil);
-#else
-*/
-    mktemp (tmpfil);
-/*
-#endif
-*/
-    /* nasty - this really means: if there is no '/' in the path */
-    if ((cp = r1bindex (file, '/')) == file)
-       strncpy (buffer, tmpfil, sizeof(buffer));
-    else
-       snprintf (buffer, sizeof(buffer), "%.*s%s", (int)(cp - file), file, 
tmpfil);
-    unlink (buffer);
-
-    return buffer;
-}
diff --git a/sbr/m_tmpfil.c b/sbr/m_tmpfil.c
deleted file mode 100644
index 291d996..0000000
--- a/sbr/m_tmpfil.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * m_tmpfil.c -- construct a temporary file
- *
- * This code is Copyright (c) 2002, by the authors of nmh.  See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
-
-#include <h/mh.h>
-
-/***************************************************************************
- * DO NOT USE THIS FUNCTION!  IT WILL BE REMOVED IN THE FUTURE.
- * THIS FUNCTION IS INSECURE.  USE THE FUNCTIONS DEFINED IN m_mktemp.c.
- ***************************************************************************/
-char *
-m_tmpfil (char *template)
-{
-    static char tmpfil[BUFSIZ];
-
-    snprintf (tmpfil, sizeof(tmpfil), "/tmp/%sXXXXXX", template);
-/*
-  Mkstemp work postponed until later -Doug
-#ifdef HAVE_MKSTEMP
-    unlink(mkstemp(tmpfil));
-#else
-*/
-    unlink(mktemp(tmpfil));
-/*
-#endif
-*/
-    return tmpfil;
-}

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=3f05764b66c12e358878ecd7efdb393740acd9f1


commit 3f05764b66c12e358878ecd7efdb393740acd9f1
Author: Lyndon Nerenberg <address@hidden>
Date:   Sun Dec 25 11:28:07 2011 -0800

    Remove compatibility functions that are always provided by the
    POSIX host environment.

diff --git a/configure.in b/configure.in
index 9663dc2..9d750c0 100644
--- a/configure.in
+++ b/configure.in
@@ -502,8 +502,6 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <setjmp.h>]],
     [Define to 1 if you have the `sigsetjmp'.]) AC_MSG_RESULT(yes)],
   [AC_MSG_RESULT(no)])
 
-AC_REPLACE_FUNCS(memmove snprintf strerror strdup)
-
 dnl Look for the initgroups() declaration.  On AIX 4.[13], Solaris 4.1.3, and
 dnl ULTRIX 4.2A the function is defined in libc but there's no declaration in
 dnl any system header.  
diff --git a/sbr/Makefile.in b/sbr/Makefile.in
index 581cc6d..5bb3f22 100644
--- a/sbr/Makefile.in
+++ b/sbr/Makefile.in
@@ -30,8 +30,6 @@ GNU_LIBTOOL = @GNU_LIBTOOL@
 LINT   = @LINT@
 LINTFLAGS = @LINTFLAGS@ 
 
-LIBOBJS = @LIBOBJS@
-
 mailspool    = @mailspool@
 sendmailpath = @sendmailpath@
 
@@ -76,16 +74,13 @@ SRCS = addrsbr.c ambigsw.c atooi.c brkstring.c              
        \
        strindex.c trimcpy.c uprf.c vfgets.c fmt_def.c                  \
        m_msgdef.c mf.c utils.c m_mktemp.c
 
-# source for compatibility functions
-COMPAT = memmove.c snprintf.c strdup.c strerror.c
-
-OBJS = $(SRCS:.c=.o) $(LIBOBJS)
+OBJS = $(SRCS:.c=.o)
 
 # auxiliary files
 AUX = Makefile.in sigmsg.awk dtimep.lex
 
 # all files in this directory included in the distribution
-DIST = $(SRCS) $(COMPAT) $(AUX)
+DIST = $(SRCS) $(AUX)
 
 # ========= DEPENDENCIES FOR BUILDING ==========
 
diff --git a/sbr/memmove.c b/sbr/memmove.c
deleted file mode 100644
index 62a303f..0000000
--- a/sbr/memmove.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* public domain function from Jan Wolter Unix Incompatibility Notes */
-/* http://unixpapa.com/incnote/ */
-char *memmove(char *dst, char *src, int n)
-{
-  if (src > dst)
-    for ( ; n > 0; n--)
-      *(dst++)= *(src++);
-  else
-    for (dst+= n-1, src+= n-1; n > 0; n--)
-      *(dst--)= *(src--);
-}
diff --git a/sbr/snprintf.c b/sbr/snprintf.c
deleted file mode 100644
index efb6df0..0000000
--- a/sbr/snprintf.c
+++ /dev/null
@@ -1,1045 +0,0 @@
-/*
- * snprintf.c -- formatted output to a string
- *
- * This is an implementation of snprintf() and vsnprintf()
- * taken from the Apache web server.  This is only used on
- * systems which do not have a native version.
- */
-
-/* ====================================================================
- * Copyright (c) 1995-1999 The Apache Group.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- *    software must display the following acknowledgment:
- *    "This product includes software developed by the Apache Group
- *    for use in the Apache HTTP server project (http://www.apache.org/)."
- *
- * 4. The names "Apache Server" and "Apache Group" must not be used to
- *    endorse or promote products derived from this software without
- *    prior written permission. For written permission, please contact
- *    address@hidden
- *
- * 5. Products derived from this software may not be called "Apache"
- *    nor may "Apache" appear in their names without prior written
- *    permission of the Apache Group.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- *    acknowledgment:
- *    "This product includes software developed by the Apache Group
- *    for use in the Apache HTTP server project (http://www.apache.org/)."
- *
- * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Group and was originally based
- * on public domain software written at the National Center for
- * Supercomputing Applications, University of Illinois, Urbana-Champaign.
- * For more information on the Apache Group and the Apache HTTP server
- * project, please see <http://www.apache.org/>.
- *
- * This code is based on, and used with the permission of, the
- * SIO stdio-replacement strx_* functions by Panos Tsirigotis
- * <address@hidden> for xinetd.
- */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <stdarg.h>
-#include <string.h>
-#include <stdlib.h>
-#include <math.h>
-#include <netinet/in.h>
-
-typedef enum {
-    NO = 0, YES = 1
-} boolean_e;
-
-#ifndef FALSE
-#define FALSE                  0
-#endif
-#ifndef TRUE
-#define TRUE                   1
-#endif
-#define NUL                    '\0'
-#define INT_NULL               ((int *)0)
-#define WIDE_INT               long
-
-typedef struct {
-    char *curpos;
-    char *endpos;
-} ap_vformatter_buff;
-
-typedef WIDE_INT wide_int;
-typedef unsigned WIDE_INT u_wide_int;
-typedef int bool_int;
-
-#define S_NULL                 "(null)"
-#define S_NULL_LEN             6
-
-#define FLOAT_DIGITS           6
-#define EXPONENT_LENGTH                10
-
-/* These macros allow correct support of 8-bit characters on systems which
- * support 8-bit characters.  Pretty dumb how the cast is required, but
- * that's legacy libc for ya.  These new macros do not support EOF like
- * the standard macros do.  Tough.
- */
-#define ap_isalpha(c) (isalpha(((unsigned char)(c))))
-#define ap_isdigit(c) (isdigit(((unsigned char)(c))))
-#define ap_islower(c) (islower(((unsigned char)(c))))
-
-/*
- * NUM_BUF_SIZE is the size of the buffer used for arithmetic conversions
- *
- * XXX: this is a magic number; do not decrease it
- */
-#define NUM_BUF_SIZE           512
-
-/*
- * cvt.c - IEEE floating point formatting routines for FreeBSD
- * from GNU libc-4.6.27.  Modified to be thread safe.
- */
-
-/*
- *    ap_ecvt converts to decimal
- *      the number of digits is specified by ndigit
- *      decpt is set to the position of the decimal point
- *      sign is set to 0 for positive, 1 for negative
- */
-
-#define        NDIG    80
-
-/* buf must have at least NDIG bytes */
-static char *ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag, 
char *buf)
-{
-    register int r2;
-    double fi, fj;
-    register char *p, *p1;
-
-    if (ndigits >= NDIG - 1)
-       ndigits = NDIG - 2;
-    r2 = 0;
-    *sign = 0;
-    p = &buf[0];
-    if (arg < 0) {
-       *sign = 1;
-       arg = -arg;
-    }
-    arg = modf(arg, &fi);
-    p1 = &buf[NDIG];
-    /*
-     * Do integer part
-     */
-    if (fi != 0) {
-       p1 = &buf[NDIG];
-       while (fi != 0) {
-           fj = modf(fi / 10, &fi);
-           *--p1 = (int) ((fj + .03) * 10) + '0';
-           r2++;
-       }
-       while (p1 < &buf[NDIG])
-           *p++ = *p1++;
-    }
-    else if (arg > 0) {
-       while ((fj = arg * 10) < 1) {
-           arg = fj;
-           r2--;
-       }
-    }
-    p1 = &buf[ndigits];
-    if (eflag == 0)
-       p1 += r2;
-    *decpt = r2;
-    if (p1 < &buf[0]) {
-       buf[0] = '\0';
-       return (buf);
-    }
-    while (p <= p1 && p < &buf[NDIG]) {
-       arg *= 10;
-       arg = modf(arg, &fj);
-       *p++ = (int) fj + '0';
-    }
-    if (p1 >= &buf[NDIG]) {
-       buf[NDIG - 1] = '\0';
-       return (buf);
-    }
-    p = p1;
-    *p1 += 5;
-    while (*p1 > '9') {
-       *p1 = '0';
-       if (p1 > buf)
-           ++ * --p1;
-       else {
-           *p1 = '1';
-           (*decpt)++;
-           if (eflag == 0) {
-               if (p > buf)
-                   *p = '0';
-               p++;
-           }
-       }
-    }
-    *p = '\0';
-    return (buf);
-}
-
-static char *ap_ecvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
-{
-    return (ap_cvt(arg, ndigits, decpt, sign, 1, buf));
-}
-
-static char *ap_fcvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
-{
-    return (ap_cvt(arg, ndigits, decpt, sign, 0, buf));
-}
-
-/*
- * ap_gcvt  - Floating output conversion to
- * minimal length string
- */
-
-static char *ap_gcvt(double number, int ndigit, char *buf, boolean_e altform)
-{
-    int sign, decpt;
-    register char *p1, *p2;
-    register int i;
-    char buf1[NDIG];
-
-    p1 = ap_ecvt(number, ndigit, &decpt, &sign, buf1);
-    p2 = buf;
-    if (sign)
-       *p2++ = '-';
-    for (i = ndigit - 1; i > 0 && p1[i] == '0'; i--)
-       ndigit--;
-    if ((decpt >= 0 && decpt - ndigit > 4)
-       || (decpt < 0 && decpt < -3)) {         /* use E-style */
-       decpt--;
-       *p2++ = *p1++;
-       *p2++ = '.';
-       for (i = 1; i < ndigit; i++)
-           *p2++ = *p1++;
-       *p2++ = 'e';
-       if (decpt < 0) {
-           decpt = -decpt;
-           *p2++ = '-';
-       }
-       else
-           *p2++ = '+';
-       if (decpt / 100 > 0)
-           *p2++ = decpt / 100 + '0';
-       if (decpt / 10 > 0)
-           *p2++ = (decpt % 100) / 10 + '0';
-       *p2++ = decpt % 10 + '0';
-    }
-    else {
-       if (decpt <= 0) {
-           if (*p1 != '0')
-               *p2++ = '.';
-           while (decpt < 0) {
-               decpt++;
-               *p2++ = '0';
-           }
-       }
-       for (i = 1; i <= ndigit; i++) {
-           *p2++ = *p1++;
-           if (i == decpt)
-               *p2++ = '.';
-       }
-       if (ndigit < decpt) {
-           while (ndigit++ < decpt)
-               *p2++ = '0';
-           *p2++ = '.';
-       }
-    }
-    if (p2[-1] == '.' && !altform)
-       p2--;
-    *p2 = '\0';
-    return (buf);
-}
-
-/*
- * The INS_CHAR macro inserts a character in the buffer and writes
- * the buffer back to disk if necessary
- * It uses the char pointers sp and bep:
- *      sp points to the next available character in the buffer
- *      bep points to the end-of-buffer+1
- * While using this macro, note that the nextb pointer is NOT updated.
- *
- * NOTE: Evaluation of the c argument should not have any side-effects
- */
-#define INS_CHAR(c, sp, bep, cc)                               \
-           {                                                   \
-               if (sp >= bep) {                                \
-                   vbuff->curpos = sp;                         \
-                   if (flush_func(vbuff))                      \
-                       return -1;                              \
-                   sp = vbuff->curpos;                         \
-                   bep = vbuff->endpos;                        \
-               }                                               \
-               *sp++ = (c);                                    \
-               cc++;                                           \
-           }
-
-#define NUM( c )                       ( c - '0' )
-
-#define STR_TO_DEC( str, num )         \
-    num = NUM( *str++ ) ;              \
-    while ( ap_isdigit( *str ) )               \
-    {                                  \
-       num *= 10 ;                     \
-       num += NUM( *str++ ) ;          \
-    }
-
-/*
- * This macro does zero padding so that the precision
- * requirement is satisfied. The padding is done by
- * adding '0's to the left of the string that is going
- * to be printed.
- */
-#define FIX_PRECISION( adjust, precision, s, s_len )   \
-    if ( adjust )                                      \
-       while ( s_len < precision )                     \
-       {                                               \
-           *--s = '0' ;                                \
-           s_len++ ;                                   \
-       }
-
-/*
- * Macro that does padding. The padding is done by printing
- * the character ch.
- */
-#define PAD( width, len, ch )  do              \
-       {                                       \
-           INS_CHAR( ch, sp, bep, cc ) ;       \
-           width-- ;                           \
-       }                                       \
-       while ( width > len )
-
-/*
- * Prefix the character ch to the string str
- * Increase length
- * Set the has_prefix flag
- */
-#define PREFIX( str, length, ch )       *--str = ch ; length++ ; has_prefix = 
YES
-
-
-/*
- * Convert num to its decimal format.
- * Return value:
- *   - a pointer to a string containing the number (no sign)
- *   - len contains the length of the string
- *   - is_negative is set to TRUE or FALSE depending on the sign
- *     of the number (always set to FALSE if is_unsigned is TRUE)
- *
- * The caller provides a buffer for the string: that is the buf_end argument
- * which is a pointer to the END of the buffer + 1 (i.e. if the buffer
- * is declared as buf[ 100 ], buf_end should be &buf[ 100 ])
- */
-static char *conv_10(register wide_int num, register bool_int is_unsigned,
-                    register bool_int *is_negative, char *buf_end,
-                    register int *len)
-{
-    register char *p = buf_end;
-    register u_wide_int magnitude;
-
-    if (is_unsigned) {
-       magnitude = (u_wide_int) num;
-       *is_negative = FALSE;
-    }
-    else {
-       *is_negative = (num < 0);
-
-       /*
-        * On a 2's complement machine, negating the most negative integer 
-        * results in a number that cannot be represented as a signed integer.
-        * Here is what we do to obtain the number's magnitude:
-        *      a. add 1 to the number
-        *      b. negate it (becomes positive)
-        *      c. convert it to unsigned
-        *      d. add 1
-        */
-       if (*is_negative) {
-           wide_int t = num + 1;
-
-           magnitude = ((u_wide_int) -t) + 1;
-       }
-       else
-           magnitude = (u_wide_int) num;
-    }
-
-    /*
-     * We use a do-while loop so that we write at least 1 digit 
-     */
-    do {
-       register u_wide_int new_magnitude = magnitude / 10;
-
-       *--p = (char) (magnitude - new_magnitude * 10 + '0');
-       magnitude = new_magnitude;
-    }
-    while (magnitude);
-
-    *len = buf_end - p;
-    return (p);
-}
-
-
-
-static char *conv_in_addr(struct in_addr *ia, char *buf_end, int *len)
-{
-    unsigned addr = ntohl(ia->s_addr);
-    char *p = buf_end;
-    bool_int is_negative;
-    int sub_len;
-
-    p = conv_10((addr & 0x000000FF)      , TRUE, &is_negative, p, &sub_len);
-    *--p = '.';
-    p = conv_10((addr & 0x0000FF00) >>  8, TRUE, &is_negative, p, &sub_len);
-    *--p = '.';
-    p = conv_10((addr & 0x00FF0000) >> 16, TRUE, &is_negative, p, &sub_len);
-    *--p = '.';
-    p = conv_10((addr & 0xFF000000) >> 24, TRUE, &is_negative, p, &sub_len);
-
-    *len = buf_end - p;
-    return (p);
-}
-
-
-
-static char *conv_sockaddr_in(struct sockaddr_in *si, char *buf_end, int *len)
-{
-    char *p = buf_end;
-    bool_int is_negative;
-    int sub_len;
-
-    p = conv_10(ntohs(si->sin_port), TRUE, &is_negative, p, &sub_len);
-    *--p = ':';
-    p = conv_in_addr(&si->sin_addr, p, &sub_len);
-
-    *len = buf_end - p;
-    return (p);
-}
-
-
-
-/*
- * Convert a floating point number to a string formats 'f', 'e' or 'E'.
- * The result is placed in buf, and len denotes the length of the string
- * The sign is returned in the is_negative argument (and is not placed
- * in buf).
- */
-static char *conv_fp(register char format, register double num,
-    boolean_e add_dp, int precision, bool_int *is_negative,
-    char *buf, int *len)
-{
-    register char *s = buf;
-    register char *p;
-    int decimal_point;
-    char buf1[NDIG];
-
-    if (format == 'f')
-       p = ap_fcvt(num, precision, &decimal_point, is_negative, buf1);
-    else                       /* either e or E format */
-       p = ap_ecvt(num, precision + 1, &decimal_point, is_negative, buf1);
-
-    /*
-     * Check for Infinity and NaN
-     */
-    if (ap_isalpha(*p)) {
-       *len = strlen(strcpy(buf, p));
-       *is_negative = FALSE;
-       return (buf);
-    }
-
-    if (format == 'f') {
-       if (decimal_point <= 0) {
-           *s++ = '0';
-           if (precision > 0) {
-               *s++ = '.';
-               while (decimal_point++ < 0)
-                   *s++ = '0';
-           }
-           else if (add_dp)
-               *s++ = '.';
-       }
-       else {
-           while (decimal_point-- > 0)
-               *s++ = *p++;
-           if (precision > 0 || add_dp)
-               *s++ = '.';
-       }
-    }
-    else {
-       *s++ = *p++;
-       if (precision > 0 || add_dp)
-           *s++ = '.';
-    }
-
-    /*
-     * copy the rest of p, the NUL is NOT copied
-     */
-    while (*p)
-       *s++ = *p++;
-
-    if (format != 'f') {
-       char temp[EXPONENT_LENGTH];     /* for exponent conversion */
-       int t_len;
-       bool_int exponent_is_negative;
-
-       *s++ = format;          /* either e or E */
-       decimal_point--;
-       if (decimal_point != 0) {
-           p = conv_10((wide_int) decimal_point, FALSE, &exponent_is_negative,
-                       &temp[EXPONENT_LENGTH], &t_len);
-           *s++ = exponent_is_negative ? '-' : '+';
-
-           /*
-            * Make sure the exponent has at least 2 digits
-            */
-           if (t_len == 1)
-               *s++ = '0';
-           while (t_len--)
-               *s++ = *p++;
-       }
-       else {
-           *s++ = '+';
-           *s++ = '0';
-           *s++ = '0';
-       }
-    }
-
-    *len = s - buf;
-    return (buf);
-}
-
-
-/*
- * Convert num to a base X number where X is a power of 2. nbits determines X.
- * For example, if nbits is 3, we do base 8 conversion
- * Return value:
- *      a pointer to a string containing the number
- *
- * The caller provides a buffer for the string: that is the buf_end argument
- * which is a pointer to the END of the buffer + 1 (i.e. if the buffer
- * is declared as buf[ 100 ], buf_end should be &buf[ 100 ])
- */
-static char *conv_p2(register u_wide_int num, register int nbits,
-                    char format, char *buf_end, register int *len)
-{
-    register int mask = (1 << nbits) - 1;
-    register char *p = buf_end;
-    static const char low_digits[] = "0123456789abcdef";
-    static const char upper_digits[] = "0123456789ABCDEF";
-    register const char *digits = (format == 'X') ? upper_digits : low_digits;
-
-    do {
-       *--p = digits[num & mask];
-       num >>= nbits;
-    }
-    while (num);
-
-    *len = buf_end - p;
-    return (p);
-}
-
-
-/*
- * Do format conversion placing the output in buffer
- */
-int ap_vformatter(int (*flush_func)(ap_vformatter_buff *),
-    ap_vformatter_buff *vbuff, const char *fmt, va_list ap)
-{
-    register char *sp;
-    register char *bep;
-    register int cc = 0;
-    register int i;
-
-    register char *s = NULL;
-    char *q;
-    int s_len;
-
-    register int min_width = 0;
-    int precision = 0;
-    enum {
-       LEFT, RIGHT
-    } adjust;
-    char pad_char;
-    char prefix_char;
-
-    double fp_num;
-    wide_int i_num = (wide_int) 0;
-    u_wide_int ui_num;
-
-    char num_buf[NUM_BUF_SIZE];
-    char char_buf[2];          /* for printing %% and %<unknown> */
-
-    /*
-     * Flag variables
-     */
-    boolean_e is_long;
-    boolean_e alternate_form;
-    boolean_e print_sign;
-    boolean_e print_blank;
-    boolean_e adjust_precision;
-    boolean_e adjust_width;
-    bool_int is_negative;
-
-    sp = vbuff->curpos;
-    bep = vbuff->endpos;
-
-    while (*fmt) {
-       if (*fmt != '%') {
-           INS_CHAR(*fmt, sp, bep, cc);
-       }
-       else {
-           /*
-            * Default variable settings
-            */
-           adjust = RIGHT;
-           alternate_form = print_sign = print_blank = NO;
-           pad_char = ' ';
-           prefix_char = NUL;
-
-           fmt++;
-
-           /*
-            * Try to avoid checking for flags, width or precision
-            */
-           if (!ap_islower(*fmt)) {
-               /*
-                * Recognize flags: -, #, BLANK, +
-                */
-               for (;; fmt++) {
-                   if (*fmt == '-')
-                       adjust = LEFT;
-                   else if (*fmt == '+')
-                       print_sign = YES;
-                   else if (*fmt == '#')
-                       alternate_form = YES;
-                   else if (*fmt == ' ')
-                       print_blank = YES;
-                   else if (*fmt == '0')
-                       pad_char = '0';
-                   else
-                       break;
-               }
-
-               /*
-                * Check if a width was specified
-                */
-               if (ap_isdigit(*fmt)) {
-                   STR_TO_DEC(fmt, min_width);
-                   adjust_width = YES;
-               }
-               else if (*fmt == '*') {
-                   min_width = va_arg(ap, int);
-                   fmt++;
-                   adjust_width = YES;
-                   if (min_width < 0) {
-                       adjust = LEFT;
-                       min_width = -min_width;
-                   }
-               }
-               else
-                   adjust_width = NO;
-
-               /*
-                * Check if a precision was specified
-                *
-                * XXX: an unreasonable amount of precision may be specified
-                * resulting in overflow of num_buf. Currently we
-                * ignore this possibility.
-                */
-               if (*fmt == '.') {
-                   adjust_precision = YES;
-                   fmt++;
-                   if (ap_isdigit(*fmt)) {
-                       STR_TO_DEC(fmt, precision);
-                   }
-                   else if (*fmt == '*') {
-                       precision = va_arg(ap, int);
-                       fmt++;
-                       if (precision < 0)
-                           precision = 0;
-                   }
-                   else
-                       precision = 0;
-               }
-               else
-                   adjust_precision = NO;
-           }
-           else
-               adjust_precision = adjust_width = NO;
-
-           /*
-            * Modifier check
-            */
-           if (*fmt == 'l') {
-               is_long = YES;
-               fmt++;
-           }
-           else {
-               if (*fmt == 'h')  /* "short" backward compatibility */
-                   ++fmt;
-               is_long = NO;
-           }
-
-           /*
-            * Argument extraction and printing.
-            * First we determine the argument type.
-            * Then, we convert the argument to a string.
-            * On exit from the switch, s points to the string that
-            * must be printed, s_len has the length of the string
-            * The precision requirements, if any, are reflected in s_len.
-            *
-            * NOTE: pad_char may be set to '0' because of the 0 flag.
-            *   It is reset to ' ' by non-numeric formats
-            */
-           switch (*fmt) {
-           case 'u':
-               if (is_long)
-                   i_num = va_arg(ap, u_wide_int);
-               else
-                   i_num = (wide_int) va_arg(ap, unsigned int);
-               s = conv_10(i_num, 1, &is_negative,
-                           &num_buf[NUM_BUF_SIZE], &s_len);
-               FIX_PRECISION(adjust_precision, precision, s, s_len);
-               break;
-
-           case 'd':
-           case 'i':
-               if (is_long)
-                   i_num = va_arg(ap, wide_int);
-               else
-                   i_num = (wide_int) va_arg(ap, int);
-               s = conv_10(i_num, 0, &is_negative,
-                           &num_buf[NUM_BUF_SIZE], &s_len);
-               FIX_PRECISION(adjust_precision, precision, s, s_len);
-
-               if (is_negative)
-                   prefix_char = '-';
-               else if (print_sign)
-                   prefix_char = '+';
-               else if (print_blank)
-                   prefix_char = ' ';
-               break;
-
-
-           case 'o':
-               if (is_long)
-                   ui_num = va_arg(ap, u_wide_int);
-               else
-                   ui_num = (u_wide_int) va_arg(ap, unsigned int);
-               s = conv_p2(ui_num, 3, *fmt,
-                           &num_buf[NUM_BUF_SIZE], &s_len);
-               FIX_PRECISION(adjust_precision, precision, s, s_len);
-               if (alternate_form && *s != '0') {
-                   *--s = '0';
-                   s_len++;
-               }
-               break;
-
-
-           case 'x':
-           case 'X':
-               if (is_long)
-                   ui_num = (u_wide_int) va_arg(ap, u_wide_int);
-               else
-                   ui_num = (u_wide_int) va_arg(ap, unsigned int);
-               s = conv_p2(ui_num, 4, *fmt,
-                           &num_buf[NUM_BUF_SIZE], &s_len);
-               FIX_PRECISION(adjust_precision, precision, s, s_len);
-               if (alternate_form && i_num != 0) {
-                   *--s = *fmt;        /* 'x' or 'X' */
-                   *--s = '0';
-                   s_len += 2;
-               }
-               break;
-
-
-           case 's':
-               s = va_arg(ap, char *);
-               if (s != NULL) {
-                   s_len = strlen(s);
-                   if (adjust_precision && precision < s_len)
-                       s_len = precision;
-               }
-               else {
-                   s = S_NULL;
-                   s_len = S_NULL_LEN;
-               }
-               pad_char = ' ';
-               break;
-
-
-           case 'f':
-           case 'e':
-           case 'E':
-               fp_num = va_arg(ap, double);
-               /*
-                * * We use &num_buf[ 1 ], so that we have room for the sign
-                */
-               s = conv_fp(*fmt, fp_num, alternate_form,
-                       (adjust_precision == NO) ? FLOAT_DIGITS : precision,
-                           &is_negative, &num_buf[1], &s_len);
-               if (is_negative)
-                   prefix_char = '-';
-               else if (print_sign)
-                   prefix_char = '+';
-               else if (print_blank)
-                   prefix_char = ' ';
-               break;
-
-
-           case 'g':
-           case 'G':
-               if (adjust_precision == NO)
-                   precision = FLOAT_DIGITS;
-               else if (precision == 0)
-                   precision = 1;
-               /*
-                * * We use &num_buf[ 1 ], so that we have room for the sign
-                */
-               s = ap_gcvt(va_arg(ap, double), precision, &num_buf[1],
-                           alternate_form);
-               if (*s == '-')
-                   prefix_char = *s++;
-               else if (print_sign)
-                   prefix_char = '+';
-               else if (print_blank)
-                   prefix_char = ' ';
-
-               s_len = strlen(s);
-
-               if (alternate_form && (q = strchr(s, '.')) == NULL) {
-                   s[s_len++] = '.';
-                   s[s_len] = '\0'; /* delimit for following strchr() */
-               }
-               if (*fmt == 'G' && (q = strchr(s, 'e')) != NULL)
-                   *q = 'E';
-               break;
-
-
-           case 'c':
-               char_buf[0] = (char) (va_arg(ap, int));
-               s = &char_buf[0];
-               s_len = 1;
-               pad_char = ' ';
-               break;
-
-
-           case '%':
-               char_buf[0] = '%';
-               s = &char_buf[0];
-               s_len = 1;
-               pad_char = ' ';
-               break;
-
-
-           case 'n':
-               *(va_arg(ap, int *)) = cc;
-               break;
-
-               /*
-                * This is where we extend the printf format, with a second
-                * type specifier
-                */
-           case 'p':
-               switch(*++fmt) {
-                   /*
-                    * If the pointer size is equal to the size of an unsigned
-                    * integer we convert the pointer to a hex number, 
otherwise 
-                    * we print "%p" to indicate that we don't handle "%p".
-                    */
-               case 'p':
-                   ui_num = (u_wide_int) va_arg(ap, void *);
-
-                   if (sizeof(char *) <= sizeof(u_wide_int))
-                               s = conv_p2(ui_num, 4, 'x',
-                                           &num_buf[NUM_BUF_SIZE], &s_len);
-                   else {
-                       s = "%p";
-                       s_len = 2;
-                       prefix_char = NUL;
-                   }
-                   pad_char = ' ';
-                   break;
-
-                   /* print a struct sockaddr_in as a.b.c.d:port */
-               case 'I':
-                   {
-                       struct sockaddr_in *si;
-
-                       si = va_arg(ap, struct sockaddr_in *);
-                       if (si != NULL) {
-                           s = conv_sockaddr_in(si, &num_buf[NUM_BUF_SIZE], 
&s_len);
-                           if (adjust_precision && precision < s_len)
-                               s_len = precision;
-                       }
-                       else {
-                           s = S_NULL;
-                           s_len = S_NULL_LEN;
-                       }
-                       pad_char = ' ';
-                   }
-                   break;
-
-                   /* print a struct in_addr as a.b.c.d */
-               case 'A':
-                   {
-                       struct in_addr *ia;
-
-                       ia = va_arg(ap, struct in_addr *);
-                       if (ia != NULL) {
-                           s = conv_in_addr(ia, &num_buf[NUM_BUF_SIZE], 
&s_len);
-                           if (adjust_precision && precision < s_len)
-                               s_len = precision;
-                       }
-                       else {
-                           s = S_NULL;
-                           s_len = S_NULL_LEN;
-                       }
-                       pad_char = ' ';
-                   }
-                   break;
-
-               case NUL:
-                   /* if %p ends the string, oh well ignore it */
-                   continue;
-
-               default:
-                   s = "bogus %p";
-                   s_len = 8;
-                   prefix_char = NUL;
-                   break;
-               }
-               break;
-
-           case NUL:
-               /*
-                * The last character of the format string was %.
-                * We ignore it.
-                */
-               continue;
-
-
-               /*
-                * The default case is for unrecognized %'s.
-                * We print %<char> to help the user identify what
-                * option is not understood.
-                * This is also useful in case the user wants to pass
-                * the output of format_converter to another function
-                * that understands some other %<char> (like syslog).
-                * Note that we can't point s inside fmt because the
-                * unknown <char> could be preceded by width etc.
-                */
-           default:
-               char_buf[0] = '%';
-               char_buf[1] = *fmt;
-               s = char_buf;
-               s_len = 2;
-               pad_char = ' ';
-               break;
-           }
-
-           if (prefix_char != NUL && s != S_NULL && s != char_buf) {
-               *--s = prefix_char;
-               s_len++;
-           }
-
-           if (adjust_width && adjust == RIGHT && min_width > s_len) {
-               if (pad_char == '0' && prefix_char != NUL) {
-                   INS_CHAR(*s, sp, bep, cc);
-                   s++;
-                   s_len--;
-                   min_width--;
-               }
-               PAD(min_width, s_len, pad_char);
-           }
-
-           /*
-            * Print the string s. 
-            */
-           for (i = s_len; i != 0; i--) {
-               INS_CHAR(*s, sp, bep, cc);
-               s++;
-           }
-
-           if (adjust_width && adjust == LEFT && min_width > s_len)
-               PAD(min_width, s_len, pad_char);
-       }
-       fmt++;
-    }
-    vbuff->curpos = sp;
-    return cc;
-}
-
-
-static int snprintf_flush(ap_vformatter_buff *vbuff)
-{
-    /* if the buffer fills we have to abort immediately, there is no way
-     * to "flush" a snprintf... there's nowhere to flush it to.
-     */
-    return -1;
-}
-
-
-int snprintf(char *buf, size_t len, const char *format,...)
-{
-    int cc;
-    va_list ap;
-    ap_vformatter_buff vbuff;
-
-    if (len == 0)
-       return 0;
-
-    /* save one byte for nul terminator */
-    vbuff.curpos = buf;
-    vbuff.endpos = buf + len - 1;
-    va_start(ap, format);
-    cc = ap_vformatter(snprintf_flush, &vbuff, format, ap);
-    va_end(ap);
-    *vbuff.curpos = '\0';
-    return (cc == -1) ? len : cc;
-}
-
-
-int vsnprintf(char *buf, size_t len, const char *format, va_list ap)
-{
-    int cc;
-    ap_vformatter_buff vbuff;
-
-    if (len == 0)
-       return 0;
-
-    /* save one byte for nul terminator */
-    vbuff.curpos = buf;
-    vbuff.endpos = buf + len - 1;
-    cc = ap_vformatter(snprintf_flush, &vbuff, format, ap);
-    *vbuff.curpos = '\0';
-    return (cc == -1) ? len : cc;
-}
diff --git a/sbr/strdup.c b/sbr/strdup.c
deleted file mode 100644
index 251145a..0000000
--- a/sbr/strdup.c
+++ /dev/null
@@ -1,27 +0,0 @@
-
-/*
- * strdup.c -- duplicate a string
- *
- * This code is Copyright (c) 2002, by the authors of nmh.  See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
-
-#include <h/mh.h>
-#include <h/utils.h>
-
-
-char *
-strdup (const char *str)
-{
-    char *cp;
-    size_t len;
-
-    if (!str)
-       return NULL;
-
-    len = strlen(str) + 1;
-    cp = mh_xmalloc (len);
-    memcpy (cp, str, len);
-    return cp;
-}
diff --git a/sbr/strerror.c b/sbr/strerror.c
deleted file mode 100644
index 476a574..0000000
--- a/sbr/strerror.c
+++ /dev/null
@@ -1,19 +0,0 @@
-
-/*
- * strerror.c -- get error message string
- */
-
-#include <h/mh.h>
-
-extern int sys_nerr;
-extern char *sys_errlist[];
-
-
-char *
-strerror (int errnum)
-{
-   if (errnum > 0 && errnum < sys_nerr)
-       return sys_errlist[errnum];
-   else
-       return NULL;
-}

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=666e1973600c0952d3bc3c1f8fb51ecfa16a6998


commit 666e1973600c0952d3bc3c1f8fb51ecfa16a6998
Author: Ken Hornstein <address@hidden>
Date:   Tue Jan 3 21:54:07 2012 -0500

    Get rid of checking for vfork(), since we no longer use.

diff --git a/configure.in b/configure.in
index 8d5f871..9663dc2 100644
--- a/configure.in
+++ b/configure.in
@@ -490,7 +490,6 @@ AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM,1,
 dnl ---------------
 dnl CHECK FUNCTIONS
 dnl ---------------
-AC_FUNC_VFORK
 AC_CHECK_LIB(mkstemp,mkstemp)
 AC_CHECK_FUNCS(waitpid wait3 sigaction sigprocmask sigblock sigsetmask \
                sighold sigrelse writev lstat uname tzset mkstemp \

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=9e3ce028db3b9fe01032ddee77df80210f7d0217


commit 9e3ce028db3b9fe01032ddee77df80210f7d0217
Author: Lyndon Nerenberg <address@hidden>
Date:   Sat Dec 24 18:18:22 2011 -0800

    Replace <arpa/ftp.h> with "h/arpa_ftp.h".

diff --git a/uip/ftpsbr.c b/uip/ftpsbr.c
index b2c3c42..0ffca35 100644
--- a/uip/ftpsbr.c
+++ b/uip/ftpsbr.c
@@ -9,13 +9,7 @@
 #include <h/mh.h>
 #include <h/mime.h>
 
-#ifdef notdef_lyndon_posix
-/*
- * Does this get included indirectly?  Let's find out.  It's not
- * part of Posix.  Mail address@hidden if this breaks your build.
- */
-# include <arpa/ftp.h>
-#endif
+#include "h/arpa_ftp.h"
 
 #define        v_debug debugsw
 #define        v_verbose verbosw

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=ec8527028003cd9bd8170b5aa3f8ba63020487d3


commit ec8527028003cd9bd8170b5aa3f8ba63020487d3
Author: Lyndon Nerenberg <address@hidden>
Date:   Sat Dec 24 18:17:10 2011 -0800

    Import non-Posix <arpa/ftp.h> for uip/ftpsbr.c.

diff --git a/h/arpa_ftp.h b/h/arpa_ftp.h
new file mode 100644
index 0000000..64532b9
--- /dev/null
+++ b/h/arpa_ftp.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 1983, 1989, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)ftp.h       8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _FTP_H_
+#define        _FTP_H_
+
+/* Definitions for FTP; see RFC-765. */
+
+/*
+ * Reply codes.
+ */
+#define PRELIM         1       /* positive preliminary */
+#define COMPLETE       2       /* positive completion */
+#define CONTINUE       3       /* positive intermediate */
+#define TRANSIENT      4       /* transient negative completion */
+#define ERROR          5       /* permanent negative completion */
+
+/*
+ * Type codes
+ */
+#define        TYPE_A          1       /* ASCII */
+#define        TYPE_E          2       /* EBCDIC */
+#define        TYPE_I          3       /* image */
+#define        TYPE_L          4       /* local byte size */
+
+#ifdef FTP_NAMES
+char *typenames[] =  {"0", "ASCII", "EBCDIC", "Image", "Local" };
+#endif
+
+/*
+ * Form codes
+ */
+#define        FORM_N          1       /* non-print */
+#define        FORM_T          2       /* telnet format effectors */
+#define        FORM_C          3       /* carriage control (ASA) */
+#ifdef FTP_NAMES
+char *formnames[] =  {"0", "Nonprint", "Telnet", "Carriage-control" };
+#endif
+
+/*
+ * Structure codes
+ */
+#define        STRU_F          1       /* file (no record structure) */
+#define        STRU_R          2       /* record structure */
+#define        STRU_P          3       /* page structure */
+#ifdef FTP_NAMES
+char *strunames[] =  {"0", "File", "Record", "Page" };
+#endif
+
+/*
+ * Mode types
+ */
+#define        MODE_S          1       /* stream */
+#define        MODE_B          2       /* block */
+#define        MODE_C          3       /* compressed */
+#ifdef FTP_NAMES
+char *modenames[] =  {"0", "Stream", "Block", "Compressed" };
+#endif
+
+/*
+ * Record Tokens
+ */
+#define        REC_ESC         '\377'  /* Record-mode Escape */
+#define        REC_EOR         '\001'  /* Record-mode End-of-Record */
+#define REC_EOF                '\002'  /* Record-mode End-of-File */
+
+/*
+ * Block Header
+ */
+#define        BLK_EOR         0x80    /* Block is End-of-Record */
+#define        BLK_EOF         0x40    /* Block is End-of-File */
+#define BLK_ERRORS     0x20    /* Block is suspected of containing errors */
+#define        BLK_RESTART     0x10    /* Block is Restart Marker */
+
+#define        BLK_BYTECOUNT   2       /* Bytes in this block */
+
+#endif /* !_FTP_H_ */

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=e356655aaaabfd0e0fb3941177a495403ff08634


commit e356655aaaabfd0e0fb3941177a495403ff08634
Author: Lyndon Nerenberg <address@hidden>
Date:   Sat Dec 24 18:15:06 2011 -0800

    Remove HAVE_ARPA_FTP_H and arpa/ftp.h references.

diff --git a/configure.in b/configure.in
index 82de6fa..8d5f871 100644
--- a/configure.in
+++ b/configure.in
@@ -469,7 +469,7 @@ AC_HEADER_STAT
 AC_HEADER_TIOCGWINSZ
 AC_CHECK_HEADERS(errno.h fcntl.h crypt.h termcap.h \
                  langinfo.h wchar.h wctype.h iconv.h netdb.h \
-                 sys/param.h sys/time.h sys/stream.h arpa/ftp.h)
+                 sys/param.h sys/time.h sys/stream.h)
  
 dnl
 dnl Checks for _IO_write_ptr. A Linuxism used by nmh on linux. We
diff --git a/uip/ftpsbr.c b/uip/ftpsbr.c
index 57f25ba..b2c3c42 100644
--- a/uip/ftpsbr.c
+++ b/uip/ftpsbr.c
@@ -9,7 +9,11 @@
 #include <h/mh.h>
 #include <h/mime.h>
 
-#ifdef HAVE_ARPA_FTP_H
+#ifdef notdef_lyndon_posix
+/*
+ * Does this get included indirectly?  Let's find out.  It's not
+ * part of Posix.  Mail address@hidden if this breaks your build.
+ */
 # include <arpa/ftp.h>
 #endif
 

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=cf77619e653bb068c8069a2da757ae9e89f7037f


commit cf77619e653bb068c8069a2da757ae9e89f7037f
Author: Ken Hornstein <address@hidden>
Date:   Tue Jan 3 21:38:07 2012 -0500

    Remove autoconf ospeed checks

diff --git a/configure.in b/configure.in
index cd3792c..82de6fa 100644
--- a/configure.in
+++ b/configure.in
@@ -699,35 +699,6 @@ dnl tests will find it when it tries to link test programs.
 nmh_save_LIBS="$LIBS"
 LIBS="$TERMLIB $LIBS"
 
-dnl Checks for external variable ospeed in the termcap library.
-AC_CACHE_CHECK(if an include file defines ospeed,
-nmh_cv_decl_ospeed_include_defines,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#if HAVE_TERMIOS_H
-#include <termios.h>
-#endif
-#if HAVE_TERMCAP_H
-#include <termcap.h>
-#endif]], [[ospeed = 0;]])],
-nmh_cv_decl_ospeed_include_defines=yes,nmh_cv_decl_ospeed_include_defines=no)])
- 
-if test $nmh_cv_decl_ospeed_include_defines = no; then
-  AC_CACHE_CHECK(if you must define ospeed,
-  nmh_cv_decl_ospeed_must_define,
-  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
-  [[extern short ospeed; ospeed = 0;]])],
-  nmh_cv_decl_ospeed_must_define=yes,nmh_cv_decl_ospeed_must_define=no)])
-fi
- 
-AH_TEMPLATE(HAVE_OSPEED, [Define to 1 if your termcap library has the ospeed 
variable.])
-if test $nmh_cv_decl_ospeed_include_defines = yes; then
-  AC_DEFINE(HAVE_OSPEED)dnl
-elif test $nmh_cv_decl_ospeed_must_define = yes; then
-  AC_DEFINE(HAVE_OSPEED)
-  AC_DEFINE(MUST_DEFINE_OSPEED, 1,
-    [Define to 1 if you have ospeed, but it is not defined in termcap.h.])
-fi
-
 dnl Check if tgetent accepts NULL (and will allocate its own termcap buffer)
 dnl Some termcaps reportedly accept a zero buffer, but then dump core
 dnl in tgetstr().

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=3cadd47a71d0d3c78f88bde8042bab8905107152


commit 3cadd47a71d0d3c78f88bde8042bab8905107152
Author: Lyndon Nerenberg <address@hidden>
Date:   Sat Dec 24 16:38:47 2011 -0800

    Ignore OSPEED/ospeed in termcap. Nothing current should need this.

diff --git a/uip/termsbr.c b/uip/termsbr.c
index 92f7a0e..93e6dd6 100644
--- a/uip/termsbr.c
+++ b/uip/termsbr.c
@@ -34,19 +34,27 @@
 # define TXTSIZ BUFSIZ
 #endif
 
+#ifdef notdef_lyndon_posix
+
+/*
+       XXX No current termcap should need this.  If your compile barfs,
+       email details to address@hidden  This code will vanish soon ...
+*/
 /*
  * These variables are sometimes defined in,
  * and needed by the termcap library.
  */
-#ifdef HAVE_OSPEED
-# ifdef MUST_DEFINE_OSPEED
+# ifdef HAVE_OSPEED
+#  ifdef MUST_DEFINE_OSPEED
 extern short ospeed;
 extern char PC;
-# endif
-#else
+#  endif
+# else
 short ospeed;
 char PC;
-#endif
+# endif
+
+#endif notdef_lyndon_posix
 
 static long speedcode;
 

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=38eb01750ce11fabaccbb0850843d825f3557c7b


commit 38eb01750ce11fabaccbb0850843d825f3557c7b
Author: Ken Hornstein <address@hidden>
Date:   Tue Jan 3 21:12:11 2012 -0500

    No longer check for termio.h or termios.h

diff --git a/configure.in b/configure.in
index 2cd5940..cd3792c 100644
--- a/configure.in
+++ b/configure.in
@@ -467,7 +467,7 @@ AC_HEADER_TIME
 AC_HEADER_SYS_WAIT
 AC_HEADER_STAT
 AC_HEADER_TIOCGWINSZ
-AC_CHECK_HEADERS(errno.h fcntl.h crypt.h termcap.h termio.h termios.h \
+AC_CHECK_HEADERS(errno.h fcntl.h crypt.h termcap.h \
                  langinfo.h wchar.h wctype.h iconv.h netdb.h \
                  sys/param.h sys/time.h sys/stream.h arpa/ftp.h)
  

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=ed759f583c7c5b2487ee5317d3ad4bc791a1d249


commit ed759f583c7c5b2487ee5317d3ad4bc791a1d249
Author: Lyndon Nerenberg <address@hidden>
Date:   Sat Dec 24 16:15:22 2011 -0800

    Collapse termio/termios/sgtty terminal interface code down to
    the Posix termios interface.

diff --git a/sbr/discard.c b/sbr/discard.c
index dbc865c..dbe309d 100644
--- a/sbr/discard.c
+++ b/sbr/discard.c
@@ -9,15 +9,7 @@
 
 #include <h/mh.h>
 
-#ifdef HAVE_TERMIOS_H
-# include <termios.h>
-#else
-# ifdef HAVE_TERMIO_H
-#  include <termio.h>
-# else
-#  include <sgtty.h>
-# endif
-#endif
+#include <termios.h>
 
 #ifdef SCO_5_STDIO
 # define _ptr  __ptr
@@ -30,28 +22,10 @@
 void
 discard (FILE *io)
 {
-#ifndef HAVE_TERMIOS_H
-# ifdef HAVE_TERMIO_H
-    struct termio tio;
-# else
-    struct sgttyb tio;
-# endif
-#endif
-
     if (io == NULL)
        return;
 
-#ifdef HAVE_TERMIOS_H
     tcflush (fileno(io), TCOFLUSH);
-#else
-# ifdef HAVE_TERMIO_H
-    if (ioctl (fileno(io), TCGETA, &tio) != -1)
-       ioctl (fileno(io), TCSETA, &tio);
-# else
-    if (ioctl (fileno(io), TIOCGETP, (char *) &tio) != -1)
-       ioctl (fileno(io), TIOCSETP, (char *) &tio);
-# endif
-#endif
 
 #if defined(_FSTDIO) || defined(__DragonFly__)
     fpurge (io);
diff --git a/uip/msh.c b/uip/msh.c
index c2d4e1a..9e56ddd 100644
--- a/uip/msh.c
+++ b/uip/msh.c
@@ -22,15 +22,7 @@
 #include <h/mts.h>
 #include <h/utils.h>
 
-#ifdef HAVE_TERMIOS_H
-# include <termios.h>
-#else
-# ifdef HAVE_TERMIO_H
-#  include <termio.h>
-# else
-#  include <sgtty.h>
-# endif
-#endif
+#include <termios.h>
 
 #include <pwd.h>
 #include <setjmp.h>
diff --git a/uip/prompter.c b/uip/prompter.c
index 7c28aec..459fa97 100644
--- a/uip/prompter.c
+++ b/uip/prompter.c
@@ -14,15 +14,7 @@
 #include <signal.h>
 #include <setjmp.h>
 
-#ifdef HAVE_TERMIOS_H
-# include <termios.h>
-#else
-# ifdef HAVE_TERMIO_H
-#  include <termio.h>
-# else
-#  include <sgtty.h>
-# endif
-#endif
+#include <termios.h>
 
 #define        QUOTE '\\'
 
@@ -63,25 +55,10 @@ static struct swit switches[] = {
 };
 
 
-#ifdef HAVE_TERMIOS_H
 static struct termios tio;
-# define ERASE tio.c_cc[VERASE]
-# define KILL  tio.c_cc[VKILL]
-# define INTR  tio.c_cc[VINTR]
-#else
-# ifdef HAVE_TERMIO_H
-static struct termio tio;
-#  define ERASE tio.c_cc[VERASE]
-#  define KILL  tio.c_cc[VKILL]
-#  define INTR  tio.c_cc[VINTR]
-# else
-static struct sgttyb tio;
-static struct tchars tc;
-#  define ERASE tio.sg_erase
-#  define KILL  tio.sg_kill
-#  define INTR  tc.t_intrc
-# endif
-#endif
+#define ERASE tio.c_cc[VERASE]
+#define KILL  tio.c_cc[VKILL]
+#define INTR  tio.c_cc[VINTR]
 
 static int wtuser = 0;
 static int sigint = 0;
@@ -193,23 +170,10 @@ main (int argc, char **argv)
      * Are we changing the kill or erase character?
      */
     if (killp || erasep) {
-#ifdef HAVE_TERMIOS_H
        cc_t save_erase, save_kill;
-#else
-       int save_erase, save_kill;
-#endif
 
        /* get the current terminal attributes */
-#ifdef HAVE_TERMIOS_H
        tcgetattr(0, &tio);
-#else
-# ifdef HAVE_TERMIO_H
-       ioctl(0, TCGETA, &tio);
-# else
-       ioctl (0, TIOCGETP, (char *) &tio);
-       ioctl (0, TIOCGETC, (char *) &tc);
-# endif
-#endif
 
        /* save original kill, erase character for later */
        save_kill = KILL;
@@ -220,15 +184,7 @@ main (int argc, char **argv)
        ERASE = erasep ? chrcnv (erasep) : save_erase;
 
        /* set the new terminal attributes */
-#ifdef HAVE_TERMIOS_H
         tcsetattr(0, TCSADRAIN, &tio);
-#else
-# ifdef HAVE_TERMIO_H
-       ioctl(0, TCSETAW, &tio);
-# else
-       ioctl (0, TIOCSETN, (char *) &tio);
-# endif
-#endif
 
        /* print out new kill erase characters */
        chrdsp ("erase", ERASE);
@@ -283,15 +239,7 @@ main (int argc, char **argv)
                    if (i == -1) {
 abort:
                        if (killp || erasep) {
-#ifdef HAVE_TERMIOS_H
                            tcsetattr(0, TCSADRAIN, &tio);
-#else
-# ifdef HAVE_TERMIO
-                           ioctl (0, TCSETA, &tio);
-# else
-                           ioctl (0, TIOCSETN, (char *) &tio);
-# endif
-#endif
                        }
                        unlink (tmpfil);
                        done (1);
@@ -378,15 +326,7 @@ no_body:
     SIGNAL (SIGINT, SIG_IGN);
 
     if (killp || erasep) {
-#ifdef HAVE_TERMIOS_H
         tcsetattr(0, TCSADRAIN, &tio);
-#else
-# ifdef HAVE_TERMIO_H
-       ioctl (0, TCSETAW, &tio);
-# else
-       ioctl (0, TIOCSETN, (char *) &tio);
-# endif
-#endif
     }
 
     if ((fdi = open (tmpfil, O_RDONLY)) == NOTOK)
diff --git a/uip/termsbr.c b/uip/termsbr.c
index 740d021..92f7a0e 100644
--- a/uip/termsbr.c
+++ b/uip/termsbr.c
@@ -9,15 +9,7 @@
 
 #include <h/mh.h>
 
-#ifdef HAVE_TERMIOS_H
-# include <termios.h>
-#else
-# ifdef HAVE_TERMIO_H
-#  include <termio.h>
-# else
-#  include <sgtty.h>
-# endif
-#endif
+#include <termios.h>
 
 #ifdef HAVE_TERMCAP_H
 # include <termcap.h>
@@ -81,16 +73,7 @@ read_termcap(void)
     char termbuf[TXTSIZ];
 #endif
 
-#ifdef HAVE_TERMIOS_H
     struct termios tio;
-#else
-# ifdef HAVE_TERMIO_H
-    struct termio tio;
-# else
-    struct sgttyb tio;
-# endif
-#endif
-
     static int inited = 0;
 
     if (inited++)
@@ -110,15 +93,7 @@ read_termcap(void)
        return;
 #endif
 
-#ifdef HAVE_TERMIOS_H
     speedcode = cfgetospeed(&tio);
-#else
-# ifdef HAVE_TERMIO_H
-    speedcode = ioctl(fileno(stdout), TCGETA, &tio) != NOTOK ? tio.c_cflag & 
CBAUD : 0;
-# else
-    speedcode = ioctl(fileno(stdout), TIOCGETP, (char *) &tio) != NOTOK ? 
tio.sg_ospeed : 0;
-# endif
-#endif
 
     HC = tgetflag ("hc");
 

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=156785f9320f2e2ec7caa66e1fa7807a9e92b949


commit 156785f9320f2e2ec7caa66e1fa7807a9e92b949
Author: Ken Hornstein <address@hidden>
Date:   Tue Jan 3 21:06:45 2012 -0500

    Update configure file for removal of POSIX-mandated header files.

diff --git a/configure.in b/configure.in
index 07d7399..2cd5940 100644
--- a/configure.in
+++ b/configure.in
@@ -467,11 +467,9 @@ AC_HEADER_TIME
 AC_HEADER_SYS_WAIT
 AC_HEADER_STAT
 AC_HEADER_TIOCGWINSZ
-AC_CHECK_HEADERS(string.h memory.h stdlib.h unistd.h errno.h fcntl.h \
-                 limits.h crypt.h termcap.h termio.h termios.h locale.h \
+AC_CHECK_HEADERS(errno.h fcntl.h crypt.h termcap.h termio.h termios.h \
                  langinfo.h wchar.h wctype.h iconv.h netdb.h \
-                 sys/param.h sys/time.h sys/stream.h \
-                 arpa/inet.h arpa/ftp.h)
+                 sys/param.h sys/time.h sys/stream.h arpa/ftp.h)
  
 dnl
 dnl Checks for _IO_write_ptr. A Linuxism used by nmh on linux. We
@@ -495,7 +493,7 @@ dnl ---------------
 AC_FUNC_VFORK
 AC_CHECK_LIB(mkstemp,mkstemp)
 AC_CHECK_FUNCS(waitpid wait3 sigaction sigprocmask sigblock sigsetmask \
-               sighold sigrelse writev lstat uname tzset killpg mkstemp \
+               sighold sigrelse writev lstat uname tzset mkstemp \
                getutent nl_langinfo mbtowc wcwidth)
 
 dnl sigsetjmp may be a macro

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=d1b702b1220d45e441b2b9597a8cf58edb51a653


commit d1b702b1220d45e441b2b9597a8cf58edb51a653
Author: Lyndon Nerenberg <address@hidden>
Date:   Sat Dec 24 15:40:48 2011 -0800

    Eliminate '#ifdef HAVE_FOO' for Posix-mandated FOOs.

diff --git a/h/nmh.h b/h/nmh.h
index f1711d5..c354482 100644
--- a/h/nmh.h
+++ b/h/nmh.h
@@ -5,11 +5,7 @@
 
 #include <config.h>
 
-#ifdef HAVE_UNISTD_H
-# include <sys/types.h>
-# include <unistd.h>
-#endif
-
+#include <unistd.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <sys/stat.h>
@@ -31,34 +27,16 @@
 # endif
 #endif
 
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
+#include <stdlib.h>
 #include <stdarg.h>
-
-#if STDC_HEADERS || HAVE_STRING_H
-# include <string.h>
-/* An ANSI string.h and pre-ANSI memory.h might conflict.  */
-# if !STDC_HEADERS && HAVE_MEMORY_H
-#  include <memory.h>
-# endif /* not STDC_HEADERS and HAVE_MEMORY_H */
-#else   /* not STDC_HEADERS and not HAVE_STRING_H */
-# include <strings.h>
-/* memory.h and strings.h conflict on some systems.  */
-#endif /* not STDC_HEADERS and not HAVE_STRING_H */
+#include <string.h>
 
 #ifdef HAVE_SYS_PARAM_H
 # include <sys/param.h>
 #endif
 
-#ifdef HAVE_LOCALE_H
 # include <locale.h>
-#endif
-
-#ifdef HAVE_LIMITS_H
 # include <limits.h>
-#endif
 
 /*
  * symbolic constants for lseek and fseek
@@ -115,12 +93,6 @@
 #define bcpy(b1,b2,length)      memcmp (b1, b2, length)
 #define bzero(b,length)         memset (b, 0, length)
 
-#ifdef HAVE_KILLPG
-# define KILLPG(pgrp,sig) killpg(pgrp,sig);
-#else
-# define KILLPG(pgrp,sig) kill((-pgrp),sig);
-#endif
-
 /*
  * If your stat macros are broken,
  * we will just undefine them.
diff --git a/h/prototypes.h b/h/prototypes.h
index 1bc19d4..d88cf8e 100644
--- a/h/prototypes.h
+++ b/h/prototypes.h
@@ -131,14 +131,6 @@ char *write_charset_8bit (void);
 int get_returnpath (char *, int, char *, int);
 #endif
 
-/*
- * prototypes for compatibility functions in library
- */
-#ifndef HAVE_SNPRINTF_PROTOTYPE
-int snprintf (char *, size_t, const char *, ...);
-int vsnprintf (char *, size_t, const char *, va_list);
-#endif
-
 int mh_strcasecmp (const char *s1, const char *s2);
 int strncasecmp (const char *s1, const char *s2, size_t n);
 
diff --git a/sbr/client.c b/sbr/client.c
index c558536..763b2a4 100644
--- a/sbr/client.c
+++ b/sbr/client.c
@@ -14,10 +14,7 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netdb.h>
-
-#ifdef HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-#endif
+#include <arpa/inet.h>
 
 #define        TRUE         1
 #define        FALSE        0
diff --git a/sbr/lock_file.c b/sbr/lock_file.c
index 51576ea..0e14e8d 100644
--- a/sbr/lock_file.c
+++ b/sbr/lock_file.c
@@ -29,10 +29,7 @@
 #  include <time.h>
 # endif
 #endif
-
-#ifdef HAVE_ERRNO_H
-# include <errno.h>
-#endif
+#include <errno.h>
 
 #ifdef HAVE_FCNTL_H
 # include <fcntl.h>
diff --git a/uip/dropsbr.c b/uip/dropsbr.c
index 76bc00d..11ceba8 100644
--- a/uip/dropsbr.c
+++ b/uip/dropsbr.c
@@ -14,10 +14,7 @@
 #include <h/dropsbr.h>
 #include <h/mts.h>
 #include <h/tws.h>
-
-#ifdef HAVE_ERRNO_H
-# include <errno.h>
-#endif
+#include <errno.h>
 
 #ifdef NTOHLSWAP
 # include <netinet/in.h>
diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c
index 58b2978..d1204c7 100644
--- a/uip/mhlsbr.c
+++ b/uip/mhlsbr.c
@@ -1515,10 +1515,7 @@ face_format (struct mcomp *c1)
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netdb.h>
-
-#ifdef HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-#endif
+#include <arpa/inet.h>
 
 static int
 doface (struct mcomp *c1)
diff --git a/uip/rcvtty.c b/uip/rcvtty.c
index 8b04d61..219af22 100644
--- a/uip/rcvtty.c
+++ b/uip/rcvtty.c
@@ -263,7 +263,7 @@ message_fd (char **vec)
             * Ruthlessly kill the child and anything
             * else in its process group.
             */
-           KILLPG(child_id, SIGKILL);
+           killpg(child_id, SIGKILL);
        }
        close (fd);
        return header_fd ();
diff --git a/uip/slocal.c b/uip/slocal.c
index e6880fe..cf91737 100644
--- a/uip/slocal.c
+++ b/uip/slocal.c
@@ -1206,7 +1206,7 @@ usr_pipe (int fd, char *cmd, char *pgm, char **vec, int 
suppress)
                 * Ruthlessly kill the child and anything
                 * else in its process group.
                 */
-               KILLPG(child_id, SIGKILL);
+               killpg(child_id, SIGKILL);
                if (verbose)
                    verbose_printf (", timed-out; terminated\n");
                return -1;

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=a7c1fa07ded2209d535bcb37ff6f8605afb20605


commit a7c1fa07ded2209d535bcb37ff6f8605afb20605
Author: Ken Hornstein <address@hidden>
Date:   Tue Jan 3 20:27:45 2012 -0500

    No longer need to check for the existance of sys/utsname.h

diff --git a/configure.in b/configure.in
index 3bba22c..07d7399 100644
--- a/configure.in
+++ b/configure.in
@@ -470,7 +470,7 @@ AC_HEADER_TIOCGWINSZ
 AC_CHECK_HEADERS(string.h memory.h stdlib.h unistd.h errno.h fcntl.h \
                  limits.h crypt.h termcap.h termio.h termios.h locale.h \
                  langinfo.h wchar.h wctype.h iconv.h netdb.h \
-                 sys/param.h sys/time.h sys/utsname.h sys/stream.h \
+                 sys/param.h sys/time.h sys/stream.h \
                  arpa/inet.h arpa/ftp.h)
  
 dnl

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=b4973af5791d58baeb1eb742b3769fcd29f93ddd


commit b4973af5791d58baeb1eb742b3769fcd29f93ddd
Author: Lyndon Nerenberg <address@hidden>
Date:   Sat Dec 24 15:30:53 2011 -0800

    Deprecate uname() in favour of (Posix) gethostname().

diff --git a/sbr/mts.c b/sbr/mts.c
index 15f182c..37f6e23 100644
--- a/sbr/mts.c
+++ b/sbr/mts.c
@@ -20,10 +20,6 @@
 #include <sys/socket.h>
 #include <netdb.h>
 
-#ifdef HAVE_SYS_UTSNAME_H
-# include <sys/utsname.h>
-#endif
-
 #define        NOTOK   (-1)
 #define        OK        0
 
@@ -250,9 +246,6 @@ LocalName (void)
 {
     static char buffer[BUFSIZ] = "";
     struct addrinfo hints, *res;
-#ifdef HAVE_UNAME
-    struct utsname name;
-#endif
 
     /* check if we have cached the local name */
     if (buffer[0])
@@ -265,14 +258,8 @@ LocalName (void)
        strncpy (buffer, localname, sizeof(buffer));
     } else {
        memset(buffer, 0, sizeof(buffer));
-#ifdef HAVE_UNAME
-       /* first get our local name */
-       uname (&name);
-       strncpy (buffer, name.nodename, sizeof(buffer) - 1);
-#else
        /* first get our local name */
        gethostname (buffer, sizeof(buffer) - 1);
-#endif
        /* now fully qualify our name */
 
        memset(&hints, 0, sizeof(hints));
@@ -307,10 +294,6 @@ SystemName (void)
 {
     static char buffer[BUFSIZ] = "";
 
-#ifdef HAVE_UNAME
-    struct utsname name;
-#endif
-
     /* check if we have cached the system name */
     if (buffer[0])
        return buffer;
@@ -323,12 +306,7 @@ SystemName (void)
        return buffer;
     }
 
-#ifdef HAVE_UNAME
-    uname (&name);
-    strncpy (buffer, name.nodename, sizeof(buffer));
-#else
     gethostname (buffer, sizeof(buffer));
-#endif
 
     return buffer;
 }

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=a940963381421de5cd0354c6fd1491754b5d1f5c


commit a940963381421de5cd0354c6fd1491754b5d1f5c
Author: Ken Hornstein <address@hidden>
Date:   Tue Jan 3 20:20:26 2012 -0500

    Sigh.  I put the documentation about the -tls switch in the long 
description,
    but not in the command summary.

diff --git a/man/post.man b/man/post.man
index b6e395e..2bff3de 100644
--- a/man/post.man
+++ b/man/post.man
@@ -25,6 +25,7 @@ post \- deliver a message
 .IR mechanism ]
 .RB [ \-user
 .IR username ]
+.RB [ \-tls ]
 .I file
 .RB [ \-version ]
 .RB [ \-help ]
diff --git a/man/send.man b/man/send.man
index e75583e..ff191c4 100644
--- a/man/send.man
+++ b/man/send.man
@@ -37,6 +37,7 @@ send \- send a message
 .IR mechanism ]
 .RB [ \-user
 .IR username ]
+.RB [ \-tls ]
 .RB [ \-width
 .IR columns ]
 .RB [ file

-----------------------------------------------------------------------

Summary of changes:
 aclocal.m4       |   52 ---
 config/config.c  |    1 +
 configure.in     |   84 +----
 h/arpa_ftp.h     |  109 ++++++
 h/nmh.h          |  101 +-----
 h/prototypes.h   |   10 -
 man/post.man     |    1 +
 man/send.man     |    1 +
 sbr/Makefile.in  |   11 +-
 sbr/client.c     |    5 +-
 sbr/discard.c    |   28 +--
 sbr/lock_file.c  |   15 +-
 sbr/m_scratch.c  |   41 ---
 sbr/m_tmpfil.c   |   32 --
 sbr/memmove.c    |   11 -
 sbr/mts.c        |   22 --
 sbr/pidstatus.c  |    5 +-
 sbr/pidwait.c    |   17 -
 sbr/snprintf.c   | 1045 ------------------------------------------------------
 sbr/strdup.c     |   27 --
 sbr/strerror.c   |   19 -
 uip/dropsbr.c    |    5 +-
 uip/ftpsbr.c     |    4 +-
 uip/mhbuild.c    |    4 -
 uip/mhbuildsbr.c |    4 -
 uip/mhcachesbr.c |    4 -
 uip/mhlist.c     |    4 -
 uip/mhlsbr.c     |    5 +-
 uip/mhn.c        |    4 -
 uip/mhoutsbr.c   |    4 -
 uip/mhparse.c    |    4 -
 uip/mhshow.c     |    4 -
 uip/mhshowsbr.c  |   30 --
 uip/mhstore.c    |    4 -
 uip/mhtest.c     |    4 -
 uip/msh.c        |   10 +-
 uip/prompter.c   |   68 +----
 uip/rcvtty.c     |    8 +-
 uip/slocal.c     |    2 +-
 uip/spost.c      |   13 -
 uip/termsbr.c    |   45 +--
 uip/viamail.c    |    4 -
 42 files changed, 152 insertions(+), 1719 deletions(-)
 create mode 100644 h/arpa_ftp.h
 delete mode 100644 sbr/m_scratch.c
 delete mode 100644 sbr/m_tmpfil.c
 delete mode 100644 sbr/memmove.c
 delete mode 100644 sbr/snprintf.c
 delete mode 100644 sbr/strdup.c
 delete mode 100644 sbr/strerror.c


hooks/post-receive
-- 
The nmh Mail Handling System



reply via email to

[Prev in Thread] Current Thread [Next in Thread]