summaryrefslogtreecommitdiff
path: root/editors/xemacs-current/patches/patch-ak
blob: fb859c27e99a65165ec9316767691a2b9e56fa92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-ak,v 1.1 2007/06/30 17:59:03 joerg Exp $

--- src/dired.c.orig	2004-11-04 23:06:21.000000000 +0000
+++ src/dired.c
@@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA.  */
 /* Synched up with: FSF 19.30. */
 
 #include <config.h>
+#include <limits.h>
 #include "lisp.h"
 
 #include "buffer.h"
@@ -104,7 +105,11 @@ If FILES-ONLY is the symbol t, then only
   directory = Ffile_name_as_directory (directory);
   directorylen = XSTRING_LENGTH (directory);
 
+#ifdef NAME_MAX
+  statbuf = alloca_ibytes (directorylen + NAME_MAX + 1);
+#else
   statbuf = alloca_ibytes (directorylen + MAXNAMLEN + 1);
+#endif
   memcpy (statbuf, XSTRING_DATA (directory), directorylen);
   statbuf_tail = statbuf + directorylen;