Codepage messages related translated & other stuff...
[midnight-commander.git] / src / fs.h
blob8f1a78f89c296b13e648f5b0da75e83f47e2903a
1 /* Include file to use opendir/closedir/readdir */
3 #ifndef __FS_H
4 #define __FS_H
5 #include <sys/types.h>
6 #ifdef HAVE_UNISTD_H
7 # include <unistd.h>
8 #endif
9 #ifndef HAS_NO_SYS_PARAM_H
10 #include <sys/param.h>
11 #endif
12 #include <sys/stat.h>
14 #ifndef MAXPATHLEN
15 # define MC_MAXPATHLEN 4096
16 #else
17 # define MC_MAXPATHLEN MAXPATHLEN
18 #endif
20 /* unistd.h defines _POSIX_VERSION on POSIX.1 systems. */
21 #if defined(HAVE_DIRENT_H) || defined(_POSIX_VERSION)
22 # ifdef NEEDS_LOCAL_DIRENT_H
23 # include "dirent.h"
24 # else
25 # include <dirent.h>
26 # endif
27 # define NLENGTH(dirent) (strlen ((dirent)->d_name))
28 # define DIRENT_LENGTH_COMPUTED 1
29 #else
30 # define dirent direct
31 # define NLENGTH(dirent) ((dirent)->d_namlen)
33 # ifdef HAVE_SYS_NDIR_H
34 # include <sys/ndir.h>
35 # endif /* HAVE_SYS_NDIR_H */
37 # ifdef HAVE_SYS_DIR_H
38 # include <sys/dir.h>
39 # endif /* HAVE_SYS_DIR_H */
41 # ifdef HAVE_NDIR_H
42 # include <ndir.h>
43 # endif /* HAVE_NDIR_H */
44 #endif /* not (HAVE_DIRENT_H or _POSIX_VERSION) */
46 #endif