2 * \brief Header: fs compatibility definitions
5 /* Include file to use opendir/closedir/readdir */
10 #include <sys/types.h>
15 /*** typedefs(not structures) and defined constants **********************************************/
18 #define HAVE_S_ISREG 1
20 #define HAVE_S_ISREG 0
25 #define HAVE_S_ISDIR 1
27 #define HAVE_S_ISDIR 0
31 /* Replacement for permission bits missing in sys/stat.h */
33 #define HAVE_S_ISLNK 1
35 #define HAVE_S_ISLNK 0
40 #define HAVE_S_ISSOCK 1
42 #define HAVE_S_ISSOCK 0
47 #define HAVE_S_ISFIFO 1
49 #define HAVE_S_ISFIFO 0
54 #define HAVE_S_ISCHR 1
56 #define HAVE_S_ISCHR 0
61 #define HAVE_S_ISBLK 1
63 #define HAVE_S_ISBLK 0
67 /* Door is something that only exists on Solaris */
69 #define HAVE_S_ISDOOR 1
71 #define HAVE_S_ISDOOR 0
75 /* Special named files are widely used in QNX6 */
77 #define HAVE_S_ISNAM 1
79 #define HAVE_S_ISNAM 0
85 #define PATH_MAX _POSIX_PATH_MAX
88 #define PATH_MAX MAXPATHLEN
96 #define MC_MAXPATHLEN 4096
98 #define MC_MAXPATHLEN MAXPATHLEN
101 /* unistd.h defines _POSIX_VERSION on POSIX.1 systems. */
102 #define NLENGTH(dirent) (strlen ((dirent)->d_name))
104 /* DragonFlyBSD doesn't provide MAXNAMLEN macro */
106 #define MAXNAMLEN NAME_MAX
109 #define MC_MAXFILENAMELEN MAXNAMLEN
111 #define DIR_IS_DOT(x) ((x)[0] == '.' && (x)[1] == '\0')
112 #define DIR_IS_DOTDOT(x) ((x)[0] == '.' && (x)[1] == '.' && (x)[2] == '\0')
114 /*** enums ***************************************************************************************/
116 /*** structures declarations (and typedefs of structures)*****************************************/
118 /*** global variables defined in .c file *********************************************************/
120 /*** declarations of public functions ************************************************************/
122 /*** inline functions ****************************************************************************/