summaryrefslogtreecommitdiff
path: root/editors/mg/patches/patch-ah
diff options
context:
space:
mode:
Diffstat (limited to 'editors/mg/patches/patch-ah')
-rw-r--r--editors/mg/patches/patch-ah27
1 files changed, 27 insertions, 0 deletions
diff --git a/editors/mg/patches/patch-ah b/editors/mg/patches/patch-ah
new file mode 100644
index 00000000000..5291a646769
--- /dev/null
+++ b/editors/mg/patches/patch-ah
@@ -0,0 +1,27 @@
+$NetBSD: patch-ah,v 1.1 2009/03/11 19:24:41 hasso Exp $
+
+--- fileio.c.orig 2009-03-11 19:57:37 +0200
++++ fileio.c 2009-03-11 19:58:36 +0200
+@@ -15,6 +15,10 @@
+ #define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
+ #endif
+
++#ifndef NAME_MAX
++#define NAME_MAX MAXNAMLEN
++#endif
++
+ #include <sys/time.h>
+ #include <sys/resource.h>
+ #include <sys/wait.h>
+@@ -545,11 +549,7 @@ make_file_list(char *buf)
+ * SV files are fairly short. For BSD, something more general would
+ * be required.
+ */
+-#ifdef __CYGWIN__ /* Cygwin uses NAME_MAX for dirents */
+ if (preflen > NFILEN - NAME_MAX)
+-#else
+- if (preflen > NFILEN - MAXNAMLEN)
+-#endif
+ return (NULL);
+
+ /* loop over the specified directory, making up the list of files */