blob: 5291a64676995cbf0d32364fe60ba8c23ee41aa4 (
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
25
26
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 */
|