summaryrefslogtreecommitdiff
path: root/usr.bin/mail
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mail')
-rw-r--r--usr.bin/mail/aux.c6
-rw-r--r--usr.bin/mail/def.h8
-rw-r--r--usr.bin/mail/main.c4
-rw-r--r--usr.bin/mail/popen.c4
4 files changed, 11 insertions, 11 deletions
diff --git a/usr.bin/mail/aux.c b/usr.bin/mail/aux.c
index 3c6e961f59f..31a6d9b7643 100644
--- a/usr.bin/mail/aux.c
+++ b/usr.bin/mail/aux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aux.c,v 1.26 2014/01/17 18:42:30 okan Exp $ */
+/* $OpenBSD: aux.c,v 1.27 2015/01/16 06:40:09 deraadt Exp $ */
/* $NetBSD: aux.c,v 1.5 1997/05/13 06:15:52 mikel Exp $ */
/*
@@ -260,7 +260,7 @@ struct sstack {
FILE *s_file; /* File we were in. */
int s_cond; /* Saved state of conditionals */
int s_loading; /* Loading .mailrc, etc. */
-} sstack[NOFILE];
+} sstack[OPEN_MAX];
/*
* Pushdown current input file and switch to a new one.
@@ -280,7 +280,7 @@ source(void *v)
warn("%s", cp);
return(1);
}
- if (ssp >= NOFILE - 1) {
+ if (ssp >= OPEN_MAX - 1) {
puts("Too much \"sourcing\" going on.");
(void)Fclose(fi);
return(1);
diff --git a/usr.bin/mail/def.h b/usr.bin/mail/def.h
index 322be15ad85..17bdaf54eb5 100644
--- a/usr.bin/mail/def.h
+++ b/usr.bin/mail/def.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: def.h,v 1.13 2003/06/25 15:13:32 millert Exp $ */
+/* $OpenBSD: def.h,v 1.14 2015/01/16 06:40:09 deraadt Exp $ */
/* $NetBSD: def.h,v 1.9 1996/12/28 07:11:00 tls Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*
* @(#)def.h 8.4 (Berkeley) 4/20/95
- * $OpenBSD: def.h,v 1.13 2003/06/25 15:13:32 millert Exp $
+ * $OpenBSD: def.h,v 1.14 2015/01/16 06:40:09 deraadt Exp $
*/
/*
@@ -42,7 +42,6 @@
#ifndef MAIL_DEF_H
#define MAIL_DEF_H
-#include <sys/param.h>
#include <sys/stat.h>
#include <sys/time.h>
@@ -54,6 +53,7 @@
#include <string.h>
#include <termios.h>
#include <unistd.h>
+#include <limits.h>
#include <vis.h>
#include "pathnames.h"
@@ -61,7 +61,7 @@
#define ESCAPE '~' /* Default escape for sending */
#define NMLSIZE 1024 /* max names in a message list */
-#define PATHSIZE MAXPATHLEN /* Size of pathnames throughout */
+#define PATHSIZE PATH_MAX /* Size of pathnames throughout */
#define HSHSIZE 59 /* Hash size for aliases and vars */
#define LINESIZE BUFSIZ /* max readable line width */
#define STRINGSIZE ((unsigned) 128)/* Dynamic allocation units */
diff --git a/usr.bin/mail/main.c b/usr.bin/mail/main.c
index d7faa687972..2dfde98ef28 100644
--- a/usr.bin/mail/main.c
+++ b/usr.bin/mail/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.26 2014/12/16 18:37:17 millert Exp $ */
+/* $OpenBSD: main.c,v 1.27 2015/01/16 06:40:09 deraadt Exp $ */
/* $NetBSD: main.c,v 1.7 1997/05/13 06:15:57 mikel Exp $ */
/*
@@ -84,7 +84,7 @@ main(int argc, char **argv)
/*
* Next argument is person to pretend to be.
*/
- if (strlen(optarg) >= MAXLOGNAME)
+ if (strlen(optarg) >= LOGIN_NAME_MAX)
errx(1, "username `%s' too long", optarg);
unsetenv("MAIL");
myname = optarg;
diff --git a/usr.bin/mail/popen.c b/usr.bin/mail/popen.c
index 5a1cd561ef1..2ce59fe2e8d 100644
--- a/usr.bin/mail/popen.c
+++ b/usr.bin/mail/popen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: popen.c,v 1.36 2013/04/29 00:28:23 okan Exp $ */
+/* $OpenBSD: popen.c,v 1.37 2015/01/16 06:40:09 deraadt Exp $ */
/* $NetBSD: popen.c,v 1.6 1997/05/13 06:48:42 mikel Exp $ */
/*
@@ -434,7 +434,7 @@ handle_spool_locks(int action)
lockfp = NULL;
} else if (action == 1) {
char *cmd;
- char buf[sizeof(_PATH_LOCKSPOOL) + MAXLOGNAME + 1];
+ char buf[sizeof(_PATH_LOCKSPOOL) + LOGIN_NAME_MAX + 1];
/* XXX - lockspool requires root for user arg, we do not */
if (uflag) {