On Mon, 11 Jun 2012 00:42:57 -0400, Ken Hornstein writes: >I am pleased to announce the release of nmh 1.5. It is available for >download here:
...and i'm one day too late with these two small bug reports. * hurd doesn't have MAXPATHLEN as outlined here: http://www.gnu.org/software/hurd/hurd/porting/guidelines.html#PATH_MAX_tt_MAX_PATH_tt_MAXPATHL much of nmh is using PATH_MAX (which is set in nmh.h from MAXPATHLEN or an arbitrary local constant as fallback), but some sources don't and thus nmh doesn't build on hurd. the attached patch changes those files to also use PATH_MAX. * the other issue is that occasionally the post tests attempt to talk to fakesmtp before that has completed starting up. i've inserted an arbitrary 5 sec delay between starting up fakesmtp and talking to it to avoid that scenario.
#! /bin/sh /usr/share/dpatch/dpatch-run ## 02-maxpathlen.dpatch by <[email protected]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: hurd doesn't have MAXPATHLEN, but not all code uses PATH_MAX @DPATCH@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nmh-1.5~/uip/inc.c nmh-1.5/uip/inc.c --- nmh-1.5~/uip/inc.c 2012-06-11 14:06:19.000000000 +1000 +++ nmh-1.5/uip/inc.c 2012-06-12 20:03:44.034356510 +1000 @@ -202,7 +202,7 @@ struct msgs *mp = NULL; struct stat st, s1; FILE *aud = NULL; - char b[MAXPATHLEN + 1]; + char b[PATH_MAX + 1]; char *maildir_copy = NULL; /* copy of mail directory because the static gets overwritten */ int nmsgs, nbytes; diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nmh-1.5~/uip/sendsbr.c nmh-1.5/uip/sendsbr.c --- nmh-1.5~/uip/sendsbr.c 2012-06-04 05:37:11.000000000 +1000 +++ nmh-1.5/uip/sendsbr.c 2012-06-12 20:04:04.840227256 +1000 @@ -35,8 +35,8 @@ static jmp_buf env; -static char body_file_name[MAXPATHLEN + 1]; /* name of temporary file for body content */ -static char composition_file_name[MAXPATHLEN + 1]; /* name of mhbuild composition temporary file */ +static char body_file_name[PATH_MAX + 1]; /* name of temporary file for body content */ +static char composition_file_name[PATH_MAX + 1]; /* name of mhbuild composition temporary file */ static int field_size; /* size of header field buffer */ static char *field; /* header field buffer */ static FILE *draft_file; /* draft file pointer */ @@ -186,7 +186,7 @@ attach(char *attachment_header_field_name, char *draft_file_name, int attachformat) { - char buf[MAXPATHLEN + 6]; /* miscellaneous buffer */ + char buf[PATH_MAX + 6]; /* miscellaneous buffer */ int c; /* current character for body copy */ int has_attachment; /* draft has at least one attachment */ int has_body; /* draft has a message body */ @@ -386,7 +386,7 @@ { int binary; /* binary character found flag */ int c; /* current character */ - char cmd[MAXPATHLEN + 6]; /* file command buffer */ + char cmd[PATH_MAX + 6]; /* file command buffer */ char *content_type; /* mime content type */ FILE *fp; /* content and pipe file pointer */ struct node *np; /* context scan node pointer */ @@ -456,7 +456,7 @@ (void)fprintf(composition_file, "#%s; name=\"%s\"; x-unix-mode=0%.3ho", content_type, ((p = strrchr(file_name, '/')) == (char *)0) ? file_name : p + 1, (unsigned short)(st.st_mode & 0777)); - if (strlen(file_name) > MAXPATHLEN) { + if (strlen(file_name) > PATH_MAX) { clean_up_temporary_files(); adios((char *)0, "attachment file name `%s' too long.", file_name); } diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nmh-1.5~/uip/sortm.c nmh-1.5/uip/sortm.c --- nmh-1.5~/uip/sortm.c 2012-06-11 14:06:19.000000000 +1000 +++ nmh-1.5/uip/sortm.c 2012-06-12 20:04:09.675964796 +1000 @@ -492,7 +492,7 @@ { int nxt, old, new; char *newname, oldname[BUFSIZ]; - char newbuf[MAXPATHLEN + 1]; + char newbuf[PATH_MAX + 1]; for (;;) { nxt = mlist[msg] - smsgs; /* mlist[msg] is a ptr into smsgs */ @@ -530,7 +530,7 @@ int i, j, old, new; seqset_t tmpset; char f1[BUFSIZ], tmpfil[BUFSIZ]; - char newbuf[MAXPATHLEN + 1]; + char newbuf[PATH_MAX + 1]; struct smsg *sp; strncpy (tmpfil, m_name (mp->hghmsg + 1), sizeof(tmpfil)); diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nmh-1.5~/uip/whatnowsbr.c nmh-1.5/uip/whatnowsbr.c --- nmh-1.5~/uip/whatnowsbr.c 2012-06-11 14:06:19.000000000 +1000 +++ nmh-1.5/uip/whatnowsbr.c 2012-06-12 20:03:54.316798423 +1000 @@ -141,9 +141,9 @@ char **argp, **arguments; struct stat st; char *attach = NMH_ATTACH_HEADER;/* attachment header field name */ - char cwd[MAXPATHLEN + 1]; /* current working directory */ - char file[MAXPATHLEN + 1]; /* file name buffer */ - char shell[MAXPATHLEN + 1]; /* shell response buffer */ + char cwd[PATH_MAX + 1]; /* current working directory */ + char file[PATH_MAX + 1]; /* file name buffer */ + char shell[PATH_MAX + 1]; /* shell response buffer */ FILE *f; /* read pointer for bgnd proc */ char *l; /* set on -l to alist command */ int n; /* set on -n to alist command */
#! /bin/sh /usr/share/dpatch/dpatch-run ## 03-smtptest.dpatch by <[email protected]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: fakesmtp tool doesn't always start fast enough @DPATCH@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nmh-1.5-release~/test/post/test-post-common.sh nmh-1.5-release/test/post/test-post-common.sh --- nmh-1.5-release~/test/post/test-post-common.sh 2012-06-04 05:37:10.000000000 +1000 +++ nmh-1.5-release/test/post/test-post-common.sh 2012-06-12 20:27:55.134596720 +1000 @@ -26,7 +26,8 @@ test_post () { "${MH_OBJ_DIR}/test/fakesmtp" "$1" $localport & pid="$!" - + # the server doesn't always come up fast enough... + sleep 5 send -draft -server 127.0.0.1 -port $localport || exit 1 wait ${pid}
regards az
-- Alexander Zangerl + GnuPG Keys 0x42BD645D or 0x5B586291 + http://snafu.priv.at/ Where a calculator on the ENIAC is equipped with 18,000 vacuum tubes and weighs 30 tons, computers in the future may have only 1,000 vacuum tubes and weigh only 1 1/2 tons. -- Popular Mechanics, March 1949
signature.asc
Description: Digital Signature
_______________________________________________ Nmh-workers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/nmh-workers
