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
39 /* Special named files are widely used in QNX6 */
46 # define MC_MAXPATHLEN 4096
48 # define MC_MAXPATHLEN MAXPATHLEN
51 /* unistd.h defines _POSIX_VERSION on POSIX.1 systems. */
54 # define NLENGTH(dirent) (strlen ((dirent)->d_name))
55 # define DIRENT_LENGTH_COMPUTED 1
56 #elif defined(_MSC_VER)
57 /* dirent provided by glib */
58 # define NLENGTH(dirent) (strlen ((dirent)->d_name))
59 # define DIRENT_LENGTH_COMPUTED 1
61 # define dirent direct
62 # define NLENGTH(dirent) ((dirent)->d_namlen)
64 # ifdef HAVE_SYS_NDIR_H
65 # include <sys/ndir.h>
66 # endif /* HAVE_SYS_NDIR_H */
68 # ifdef HAVE_SYS_DIR_H
70 # endif /* HAVE_SYS_DIR_H */
74 # endif /* HAVE_NDIR_H */
75 #endif /* not (HAVE_DIRENT_H or _POSIX_VERSION) */
78 compute_namelen (struct dirent
*dent
__attribute__ ((unused
)))
80 #ifdef DIRENT_LENGTH_COMPUTED
83 dent
->d_namlen
= strlen (dent
);