Author: Alexander Zangerl  <az@debian.org>
Subject: hurd doesn't have MAXPATHLEN, but not all code uses PATH_MAX

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 */
