comparison src/dired.c @ 109585:4504e82595bb

Replace tests for SYSV_SYSTEM_DIR with HAVE_DIRENT_H, set via autoconf * configure.in: Check for dirent.h * dired.c, sysdep.c: test HAVE_DIRENT_H instead of SYSV_SYSTEM_DIR * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/msdos.h, s/usg5-4.h: don't define SYSV_SYSTEM_DIR * sed2v2.inp (HAVE_DIRENT_H): Edit to 1
author Jan D <jan.h.d@swipnet.se>
date Thu, 29 Jul 2010 22:01:08 +0200
parents 228a5fa4eda0
children c4c8e4a16194
comparison
equal deleted inserted replaced
109584:63e95c4f28f0 109585:4504e82595bb
46 Solaris 2.1 host and is in a native Solaris 2.1 filesystem. 46 Solaris 2.1 host and is in a native Solaris 2.1 filesystem.
47 47
48 Since applying strlen to the name always works, we'll just do that. */ 48 Since applying strlen to the name always works, we'll just do that. */
49 #define NAMLEN(p) strlen (p->d_name) 49 #define NAMLEN(p) strlen (p->d_name)
50 50
51 #ifdef SYSV_SYSTEM_DIR 51 #ifdef HAVE_DIRENT_H
52 52
53 #include <dirent.h> 53 #include <dirent.h>
54 #define DIRENTRY struct dirent 54 #define DIRENTRY struct dirent
55 55
56 #else /* not SYSV_SYSTEM_DIR */ 56 #else /* not HAVE_DIRENT_H */
57 57
58 #ifdef MSDOS
59 #include <dirent.h>
60 #else
61 #include <sys/dir.h> 58 #include <sys/dir.h>
62 #endif
63
64 #include <sys/stat.h> 59 #include <sys/stat.h>
65 60
66 #ifndef MSDOS
67 #define DIRENTRY struct direct 61 #define DIRENTRY struct direct
68 62
69 extern DIR *opendir (char *); 63 extern DIR *opendir (char *);
70 extern struct direct *readdir (DIR *); 64 extern struct direct *readdir (DIR *);
71 65
72 #endif /* not MSDOS */ 66 #endif /* HAVE_DIRENT_H */
73 #endif /* not SYSV_SYSTEM_DIR */
74 67
75 /* Some versions of Cygwin don't have d_ino in `struct dirent'. */ 68 /* Some versions of Cygwin don't have d_ino in `struct dirent'. */
76 #if defined(MSDOS) || defined(__CYGWIN__) 69 #if defined(MSDOS) || defined(__CYGWIN__)
77 #define DIRENTRY_NONEMPTY(p) ((p)->d_name[0] != 0) 70 #define DIRENTRY_NONEMPTY(p) ((p)->d_name[0] != 0)
78 #else 71 #else