1 /* Include file to use opendir/closedir/readdir */
13 /* Replacement for permission bits missing in sys/stat.h */
19 # define S_ISSOCK(x) 0
23 # define S_ISFIFO(x) 0
34 /* Door is something that only exists on Solaris */
36 # define S_ISDOOR(x) 0
42 # define MC_MAXPATHLEN 4096
44 # define MC_MAXPATHLEN MAXPATHLEN
47 /* unistd.h defines _POSIX_VERSION on POSIX.1 systems. */
50 # define NLENGTH(dirent) (strlen ((dirent)->d_name))
51 # define DIRENT_LENGTH_COMPUTED 1
52 #elif defined(_MSC_VER)
53 /* dirent provided by glib */
54 # define NLENGTH(dirent) (strlen ((dirent)->d_name))
55 # define DIRENT_LENGTH_COMPUTED 1
57 # define dirent direct
58 # define NLENGTH(dirent) ((dirent)->d_namlen)
60 # ifdef HAVE_SYS_NDIR_H
61 # include <sys/ndir.h>
62 # endif /* HAVE_SYS_NDIR_H */
64 # ifdef HAVE_SYS_DIR_H
66 # endif /* HAVE_SYS_DIR_H */
70 # endif /* HAVE_NDIR_H */
71 #endif /* not (HAVE_DIRENT_H or _POSIX_VERSION) */
74 compute_namelen (struct dirent
*dent
__attribute__ ((unused
)))
76 #ifdef DIRENT_LENGTH_COMPUTED
79 dent
->d_namlen
= strlen (dent
);