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. ae6d25b39b09560916481983b30d3b09ccf9390e
Date: Mon, 09 Jan 2012 20:53:12 +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  ae6d25b39b09560916481983b30d3b09ccf9390e (commit)
       via  c2191f6961409263271aaeb0f9685e10492389a8 (commit)
       via  9827ca52b9f69d29f3bc3c74a8ca95e14ee226ff (commit)
       via  c33891a4d5265bdbbbadae72ab6d8d92589636ca (commit)
      from  a2469f5ecbca3a179251ac9b777b561bc5245d4c (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=ae6d25b39b09560916481983b30d3b09ccf9390e


commit ae6d25b39b09560916481983b30d3b09ccf9390e
Merge: c2191f6 a2469f5
Author: Ken Hornstein <address@hidden>
Date:   Mon Jan 9 15:52:34 2012 -0500

    Merge branch 'master' of git.sv.nongnu.org:/srv/git/nmh


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


commit c2191f6961409263271aaeb0f9685e10492389a8
Author: Ken Hornstein <address@hidden>
Date:   Mon Jan 9 15:51:57 2012 -0500

    Remove OS-specific defines.  As part of it, remove scary longjmp() inside
    signal handlers that was part of the code under #ifdef BSD42.

diff --git a/configure.ac b/configure.ac
index 0df49ba..43a1029 100644
--- a/configure.ac
+++ b/configure.ac
@@ -767,59 +767,6 @@ SIGNAL_H=$nmh_cv_path_signal_h
 AC_SUBST(SIGNAL_H)dnl
 
 dnl ----------------
-dnl OS SPECIFIC DEFINES
-dnl ----------------
-AH_TEMPLATE(SYS5, [Defined for Solaris 2.x, Irix, OSF/1, HP-UX, AIX, SCO5; 
only used in vmh.c which is not built.])
-AH_TEMPLATE(SVR4, [Defined for Solaris 2.x, Irix, OSF/1, HP-UX, AIX; only used 
in vmh.c which is not built.])
-AH_TEMPLATE(BSD44, [Defined for SunOS 4, FreeBSD, NetBSD, OpenBSD, BSD/OS, Mac 
OS X/Rhapsody; only used in vmh.c which is not built.])
-AH_TEMPLATE(BSD42, [Defined for SunOS 4, FreeBSD, NetBSD, OpenBSD, BSD/OS, Mac 
OS X/Rhapsody -- does PicoBSD have uname?])
-AH_TEMPLATE(SCO_5_STDIO, [Defined for SCO5.])
-
-case "$target_os" in
-
-  solaris2*)
-    AC_DEFINE(SYS5)
-    AC_DEFINE(SVR4)
-    ;;
-  irix*)
-    AC_DEFINE(SYS5)
-    AC_DEFINE(SVR4)
-    ;;
-  osf*)
-    AC_DEFINE(SYS5)
-    AC_DEFINE(SVR4)
-    ;;
-  aix*)
-    AC_DEFINE(SYS5)
-    AC_DEFINE(SVR4)
-    ;;
-  sunos4*)
-    AC_DEFINE(BSD42)
-    ;;
-  freebsd*)  
-    AC_DEFINE(BSD42)
-    AC_DEFINE(BSD44)
-    ;;
-  netbsd*)
-    AC_DEFINE(BSD42)
-    AC_DEFINE(BSD44)
-    ;;
-  openbsd*)
-    AC_DEFINE(BSD42)
-    AC_DEFINE(BSD44)
-    ;;
-  bsd/os*)
-    AC_DEFINE(BSD42)
-    AC_DEFINE(BSD44)
-    ;;
-  sco5*)
-    AC_DEFINE(SYS5)
-    AC_DEFINE(SCO_5_STDIO)
-    ;;
-esac
-
-
-dnl ----------------
 dnl OUTPUT MAKEFILES
 dnl ----------------
 AC_CONFIG_FILES(Makefile config/Makefile h/Makefile sbr/Makefile uip/Makefile \
diff --git a/h/msh.h b/h/msh.h
index 201c7ec..fb80f23 100644
--- a/h/msh.h
+++ b/h/msh.h
@@ -75,11 +75,6 @@ extern int interrupted;              /* SIGINT detected  */
 extern int broken_pipe;                /* SIGPIPE detected */
 extern int told_to_quit;       /* SIGQUIT detected */
 
-#ifdef BSD42
-extern int should_intr;                /* signal handler should interrupt call 
*/
-extern jmp_buf sigenv;         /* the environment pointer */
-#endif
-
 /*
  * prototypes
  */
diff --git a/sbr/discard.c b/sbr/discard.c
index dbe309d..a1efa48 100644
--- a/sbr/discard.c
+++ b/sbr/discard.c
@@ -11,13 +11,6 @@
 
 #include <termios.h>
 
-#ifdef SCO_5_STDIO
-# define _ptr  __ptr
-# define _cnt  __cnt
-# define _base __base
-# define _filbuf(fp)  ((fp)->__cnt = 0, __filbuf(fp))
-#endif
-
 
 void
 discard (FILE *io)
diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c
index f31b9c4..585df64 100644
--- a/sbr/m_getfld.c
+++ b/sbr/m_getfld.c
@@ -190,14 +190,6 @@ static int (*eom_action)(int) = NULL;
 # define DEFINED__FILBUF_TO_SOMETHING_SPECIFIC
 #endif
 
-#ifdef SCO_5_STDIO
-# define _ptr  __ptr
-# define _cnt  __cnt
-# define _base __base
-# define _filbuf(fp)  ((fp)->__cnt = 0, __filbuf(fp))
-# define DEFINED__FILBUF_TO_SOMETHING_SPECIFIC
-#endif
-
 #ifndef DEFINED__FILBUF_TO_SOMETHING_SPECIFIC
 extern int  _filbuf(FILE*);
 #endif
diff --git a/sbr/mts.c b/sbr/mts.c
index 37f6e23..71836e4 100644
--- a/sbr/mts.c
+++ b/sbr/mts.c
@@ -370,7 +370,6 @@ getuserinfo (void)
        field, like phone number.  Also, if mmailid masquerading is turned on 
due
        to "mmailid" appearing on the "masquerade:" line of mts.conf, stop if we
        hit a '<' (which should precede any ','s). */
-#ifndef BSD42
     if (mmailid_masquerading)
        /* Stop at ',' or '<'. */
        for (cp = fullname; *np != '\0' && *np != ',' && *np != '<';
@@ -385,46 +384,6 @@ getuserinfo (void)
        for (cp = fullname; *np != '\0' && *np != ',';
             *cp++ = *np++)
            continue;
-#else /* BSD42 */
-    /* On BSD(-derived) systems, the system utilities that deal with the GECOS
-       field (finger, mail, sendmail, etc.) translate any '&' character in it 
to
-       the login name, with the first letter capitalized.  So, for instance,
-       fingering a user "bob" with the GECOS field "& Jones" would reveal him 
to
-       be "In real life: Bob Jones".  Surprisingly, though, the OS doesn't do
-       the translation for you, so we have to do it manually here. */
-    if (mmailid_masquerading)
-       /* Stop at ',' or '<'. */
-       for (cp = fullname;
-            *np != '\0' && *np != ',' && *np != '<';) {
-           if (*np == '&')     {       /* blech! */
-               strcpy (cp, pw->pw_name);
-               *cp = toupper(*cp);
-               while (*cp)
-                   cp++;
-               np++;
-           } else {
-               *cp++ = *np++;
-           }
-       }
-    else
-       /* Allow '<' as a legal character of the user's name.  This code is
-          basically a duplicate of the code above the "else" -- we don't
-          collapse it down to one copy and put the mmailid_masquerading check
-          inside the loop with "(x ? y : z)" because that's inefficient and the
-          value'll never change while it's in there. */
-       for (cp = fullname;
-            *np != '\0' && *np != ',';) {
-           if (*np == '&')     {       /* blech! */
-               strcpy (cp, pw->pw_name);
-               *cp = toupper(*cp);
-               while (*cp)
-                   cp++;
-               np++;
-           } else {
-               *cp++ = *np++;
-           }
-       }
-#endif /* BSD42 */
     *cp = '\0';
 
     if (mmailid_masquerading) {
diff --git a/uip/mhcachesbr.c b/uip/mhcachesbr.c
index 79d6bda..807cf60 100644
--- a/uip/mhcachesbr.c
+++ b/uip/mhcachesbr.c
@@ -312,11 +312,7 @@ find_cache_aux (int writing, char *directory, char *id,
     static int partno, pid;
     static time_t clock = 0;
 
-#ifdef BSD42
-    usemap = strchr (id, '/') ? 1 : 0;
-#else
     usemap = 1;
-#endif
 
     if (debugsw)
        fprintf (stderr, "find_cache_aux %s usemap=%d\n", directory, usemap);
diff --git a/uip/msh.c b/uip/msh.c
index 07110fd..3a5cc97 100644
--- a/uip/msh.c
+++ b/uip/msh.c
@@ -150,11 +150,6 @@ int interrupted;           /* SIGINT detected  */
 int broken_pipe;               /* SIGPIPE detected */
 int told_to_quit;              /* SIGQUIT detected */
 
-#ifdef BSD42
-int should_intr;               /* signal handler should interrupt call */
-jmp_buf sigenv;                        /* the environment pointer              
*/
-#endif
-
 /*
  * prototypes
  */
@@ -336,9 +331,6 @@ main (int argc, char **argv)
        ioctl (pfd, FIOCLEX, NULL);
 #endif /* FIOCLEX */
 
-#ifdef BSD42
-    should_intr = 0;
-#endif /* BSD42 */
     istat = SIGNAL2 (SIGINT, intrser);
     qstat = SIGNAL2 (SIGQUIT, quitser);
 
@@ -1054,11 +1046,9 @@ display_info (int scansw)
     if (sp == NULL) {
        if ((sd = dup (fileno (stdout))) == NOTOK)
            padios ("standard output", "unable to dup");
-#ifndef BSD42                  /* XXX */
 #ifdef FIOCLEX
        ioctl (sd, FIOCLEX, NULL);
 #endif /* FIOCLEX */
-#endif /* not BSD42 */
        if ((sp = fdopen (sd, "w")) == NULL)
            padios ("standard output", "unable to fdopen");
     }
@@ -1216,33 +1206,11 @@ getargs (char *prompt, struct swit *sw, struct Cmd 
*cmdp)
     told_to_quit = 0;
     for (;;) {
        interrupted = 0;
-#ifdef BSD42
-       switch (setjmp (sigenv)) {
-           case OK:
-               should_intr = 1;
-               break;
-
-           default:
-               should_intr = 0;
-               if (interrupted && !told_to_quit) {
-                   putchar ('\n');
-                   continue;
-               }
-               if (ppid > 0)
-#ifdef SIGEMT
-                   kill (ppid, SIGEMT);
-#else
-                   kill (ppid, SIGTERM);
-#endif
-               return EOF;
-       }
-#endif /* BSD42 */
        if (interactive) {
            printf ("%s", prompt);
            fflush (stdout);
        }
        for (cp = buffer; (i = getchar ()) != '\n';) {
-#ifndef BSD42
            if (interrupted && !told_to_quit) {
                buffer[0] = '\0';
                putchar ('\n');
@@ -1257,10 +1225,6 @@ getargs (char *prompt, struct swit *sw, struct Cmd *cmdp)
 #endif
                return EOF;
            }
-#else /* BSD42 */
-           if (i == EOF)
-               longjmp (sigenv, DONE);
-#endif /* BSD42 */
            if (cp < &buffer[sizeof buffer - 2])
                *cp++ = i;
        }
@@ -1288,9 +1252,6 @@ getargs (char *prompt, struct swit *sw, struct Cmd *cmdp)
                        cmdp->args[0]);
                continue;
            default: 
-#ifdef BSD42
-               should_intr = 0;
-#endif /* BSD42 */
                return i;
        }
     }
@@ -1623,11 +1584,6 @@ intrser (int i)
 {
     discard (stdout);
     interrupted++;
-
-#ifdef BSD42
-    if (should_intr)
-       longjmp (sigenv, NOTOK);
-#endif
 }
 
 
@@ -1638,11 +1594,6 @@ pipeser (int i)
        fprintf (stderr, "broken pipe\n");
     told_to_quit++;
     interrupted++;
-
-#ifdef BSD42
-    if (should_intr)
-       longjmp (sigenv, NOTOK);
-#endif
 }
 
 
@@ -1651,11 +1602,6 @@ quitser (int i)
 {
     told_to_quit++;
     interrupted++;
-
-#ifdef BSD42
-    if (should_intr)
-       longjmp (sigenv, NOTOK);
-#endif
 }
 
 
diff --git a/uip/mshcmds.c b/uip/mshcmds.c
index 3bd4db3..64957e8 100644
--- a/uip/mshcmds.c
+++ b/uip/mshcmds.c
@@ -2406,19 +2406,7 @@ ask (int msgnum)
     fflush (stdout);
     buf[0] = 0;
 
-#ifndef        BSD42
     read (fileno (stdout), buf, sizeof buf);
-#else /* BSD42 */
-    switch (setjmp (sigenv)) {
-       case OK: 
-           should_intr = 1;
-           read (fileno (stdout), buf, sizeof buf);/* fall... */
-
-       default: 
-           should_intr = 0;
-           break;
-    }
-#endif /* BSD42 */
 
     if (strchr(buf, '\n') == NULL)
        putchar ('\n');
diff --git a/uip/scansbr.c b/uip/scansbr.c
index 0d12c34..ae347e8 100644
--- a/uip/scansbr.c
+++ b/uip/scansbr.c
@@ -19,13 +19,6 @@
 # define _cnt _w                /* Wretch */
 #endif
 
-#ifdef SCO_5_STDIO
-# define _ptr  __ptr
-# define _cnt  __cnt
-# define _base __base
-# define _filbuf(fp)  ((fp)->__cnt = 0, __filbuf(fp))
-#endif
-
 #define MAXSCANL 256           /* longest possible scan line */
 
 /*

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


commit 9827ca52b9f69d29f3bc3c74a8ca95e14ee226ff
Author: Ken Hornstein <address@hidden>
Date:   Mon Jan 9 14:43:35 2012 -0500

    Clean up time handling; always assume we have tzset() and that the right
    prototypes are in time.h (both are valid in POSIX).

diff --git a/configure.ac b/configure.ac
index 5ff1829..0df49ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -462,7 +462,6 @@ esac
 AC_SUBST(OURDEFS)
 
 AC_HEADER_STDC
-AC_HEADER_TIME
 AC_HEADER_TIOCGWINSZ
 AC_CHECK_HEADERS(errno.h fcntl.h crypt.h termcap.h \
                  langinfo.h wchar.h wctype.h iconv.h netdb.h \
@@ -487,7 +486,7 @@ 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 getutent nl_langinfo)
 
 dnl Check for multibyte character set support
 if test "x$ac_cv_header_wchar_h" = "xyes" -a "x$ac_cv_header_wctype_h" = 
"xyes" \
@@ -744,18 +743,7 @@ dnl ----------------
 dnl CHECK STRUCTURES
 dnl ----------------
 
-AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,,
-  [#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef TM_IN_SYS_TIME
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif])
-
+AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include <time.h>])
 AC_CHECK_MEMBERS(struct utmp.ut_type,,,[#include <utmp.h>])
 
 AC_STRUCT_DIRENT_D_TYPE
diff --git a/sbr/dtime.c b/sbr/dtime.c
index 2e978d7..5d5375d 100644
--- a/sbr/dtime.c
+++ b/sbr/dtime.c
@@ -10,23 +10,9 @@
 #include <h/mh.h>   /* for snprintf() */
 #include <h/nmh.h>
 #include <h/tws.h>
+#include <time.h>
 
-#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) && !defined(HAVE_TZSET)
-# include <sys/timeb.h>
-#endif
-
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
-#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) && defined(HAVE_TZSET)
+#if !defined(HAVE_STRUCT_TM_TM_GMTOFF)
 extern int daylight;
 extern long timezone;
 extern char *tzname[];
@@ -140,10 +126,6 @@ dlocaltime (time_t *clock)
     static struct tws tw;
     struct tm *tm;
 
-#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) && !defined(HAVE_TZSET)
-    struct timeb tb;
-#endif
-
     if (!clock)
        return NULL;
 
@@ -172,13 +154,8 @@ dlocaltime (time_t *clock)
     if (tm->tm_isdst)                  /* if DST is in effect */
        tw.tw_zone -= 60;               /* reset to normal offset */
 #else
-# ifdef HAVE_TZSET
     tzset();
     tw.tw_zone = -(timezone / 60);
-# else
-    ftime (&tb);
-    tw.tw_zone = -tb.timezone;
-# endif
 #endif
 
     tw.tw_flags &= ~TW_SDAY;
@@ -368,14 +345,8 @@ dtimezone (int offset, int flags)
     }
 
     if (!(flags & TW_ZONE) && mins == 0) {
-#if defined(HAVE_TZSET) && defined(HAVE_TZNAME)
        tzset();
        return ((flags & TW_DST) ? tzname[1] : tzname[0]);
-#else
-       for (z = zones; z->std; z++)
-           if (z->shift == hours)
-               return (z->dst && (flags & TW_DST) ? z->dst : z->std);
-#endif
     }
 
 #ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST

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


commit c33891a4d5265bdbbbadae72ab6d8d92589636ca
Author: Ken Hornstein <address@hidden>
Date:   Mon Jan 9 14:07:37 2012 -0500

    Garbage collect autoconf support for checking for the header file for 
initgroups
    and snprintf() prototypes.

diff --git a/configure.ac b/configure.ac
index 2a56e97..5ff1829 100644
--- a/configure.ac
+++ b/configure.ac
@@ -489,28 +489,6 @@ dnl CHECK FUNCTIONS
 dnl ---------------
 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
-dnl any system header.  
-dnl
-dnl On Solaris 2.[456], the declaration is in <grp.h>.  On HP-UX 9-11 and
-dnl (reportedly) FreeBSD 3.[23], it's in <unistd.h>.  Any other locations we
-dnl need to check?
-AH_TEMPLATE(INITGROUPS_HEADER, [Define to the header containing the 
declaration of `initgroups'.])
-AC_EGREP_HEADER(initgroups, grp.h, AC_DEFINE(INITGROUPS_HEADER, <grp.h>),
-                AC_EGREP_HEADER(initgroups, unistd.h, 
-                                AC_DEFINE(INITGROUPS_HEADER, <unistd.h>)))
-
-dnl On AIX 4.1, snprintf() is defined in libc.a but there's no prototype in
-dnl <stdio.h> or elsewhere.  Apparently it's not officially supported (though 
it
-dnl seems to work perfectly and IBM apparently uses it in internal code).
-dnl Anyhow, if we omit our own snprintf() and vsnprintf() prototypes when we
-dnl HAVE_SNPRINTF, we get a billion warnings at compile time.  Use the C
-dnl preprocessor to preprocess stdio.h and make sure that there's actually a 
-dnl prototype. 
-AC_EGREP_HEADER(snprintf, stdio.h, AC_DEFINE(HAVE_SNPRINTF_PROTOTYPE,1,
-  [Define to 1 if <stdio.h> has a prototype for snprintf().]))
-
 dnl Check for multibyte character set support
 if test "x$ac_cv_header_wchar_h" = "xyes" -a "x$ac_cv_header_wctype_h" = 
"xyes" \
     -a "x$ac_cv_func_wcwidth" = "xyes" -a "x$ac_cv_func_mbtowc" = "xyes"; then
diff --git a/uip/slocal.c b/uip/slocal.c
index 54960f3..13d0511 100644
--- a/uip/slocal.c
+++ b/uip/slocal.c
@@ -34,16 +34,6 @@
 #include <sys/ioctl.h>
 #include <fcntl.h>
 
-#ifdef INITGROUPS_HEADER
-#include INITGROUPS_HEADER
-#else
-/* On AIX 4.1, initgroups() is defined and even documented (giving the 
parameter
-   types as char* and int), but doesn't have a prototype in any of the system
-   header files.  AIX 4.3, SunOS 4.1.3, and ULTRIX 4.2A have the same
-   problem. */
-extern int  initgroups(char*, int);
-#endif
-
 /* This define is needed for Berkeley db v2 and above to
  * make the header file expose the 'historical' ndbm APIs.
  * We define it unconditionally because this is simple and

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

Summary of changes:
 configure.ac     |   91 +----------------------------------------------------
 h/msh.h          |    5 ---
 sbr/discard.c    |    7 ----
 sbr/dtime.c      |   33 +------------------
 sbr/m_getfld.c   |    8 -----
 sbr/mts.c        |   41 ------------------------
 uip/mhcachesbr.c |    4 --
 uip/msh.c        |   54 --------------------------------
 uip/mshcmds.c    |   12 -------
 uip/scansbr.c    |    7 ----
 uip/slocal.c     |   10 ------
 11 files changed, 4 insertions(+), 268 deletions(-)


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



reply via email to

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