summaryrefslogtreecommitdiffstats
path: root/bin/ed/ed.h
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-05-29 18:03:14 +0000
committerimp <imp@FreeBSD.org>2001-05-29 18:03:14 +0000
commit6d5c9e2a159911e48f405cbdbd6eaeb8fb1aa421 (patch)
treea7285d6ceab135cd35a2477ee8b4752f5ad7c3ad /bin/ed/ed.h
parent6709d5cb0cba6c2b7897b943a8a49cb42034ab88 (diff)
downloadFreeBSD-src-6d5c9e2a159911e48f405cbdbd6eaeb8fb1aa421.zip
FreeBSD-src-6d5c9e2a159911e48f405cbdbd6eaeb8fb1aa421.tar.gz
Use PATH_MAX rather than MAXPATHLEN. Also fix a possible off by one
error caused by the -1 being on the wrong side of the comparison. This would not cause an overflow, as near as I can tell, because we truncate later anyway. We'd just fail to get a diagnostic for 1024 and 1025 byte file names.
Diffstat (limited to 'bin/ed/ed.h')
-rw-r--r--bin/ed/ed.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/bin/ed/ed.h b/bin/ed/ed.h
index d313a84..34cd276 100644
--- a/bin/ed/ed.h
+++ b/bin/ed/ed.h
@@ -28,11 +28,9 @@
* $FreeBSD$
*/
-#include <sys/param.h> /* for MAXPATHLEN */
+#include <sys/param.h>
#include <errno.h>
-#if defined(sun) || defined(__NetBSD__)
-# include <limits.h>
-#endif
+#include <limits.h>
#include <regex.h>
#include <signal.h>
#include <stdio.h>
@@ -44,10 +42,6 @@
#define EMOD (-3)
#define FATAL (-4)
-#ifndef MAXPATHLEN
-# define MAXPATHLEN 255 /* _POSIX_PATH_MAX */
-#endif
-
#define MINBUFSZ 512 /* minimum buffer size - must be > 0 */
#define SE_MAX 30 /* max subexpressions in a regular expression */
#ifdef INT_MAX
OpenPOWER on IntegriCloud