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 **********************************************/
17 /* Replacement for permission bits missing in sys/stat.h */
38 /* Door is something that only exists on Solaris */
43 /* Special named files are widely used in QNX6 */
50 #define PATH_MAX _POSIX_PATH_MAX
53 #define PATH_MAX MAXPATHLEN
61 #define MC_MAXPATHLEN 4096
63 #define MC_MAXPATHLEN MAXPATHLEN
66 /* unistd.h defines _POSIX_VERSION on POSIX.1 systems. */
67 #define NLENGTH(dirent) (strlen ((dirent)->d_name))
68 #define DIRENT_LENGTH_COMPUTED 1
70 /* DragonFlyBSD doesn't provide MAXNAMLEN macro */
72 #define MAXNAMLEN NAME_MAX
75 #define MC_MAXFILENAMELEN MAXNAMLEN
77 #define DIR_IS_DOT(x) ((x)[0] == '.' && (x)[1] == '\0')
78 #define DIR_IS_DOTDOT(x) ((x)[0] == '.' && (x)[1] == '.' && (x)[2] == '\0')
80 /*** enums ***************************************************************************************/
82 /*** structures declarations (and typedefs of structures)*****************************************/
84 /*** global variables defined in .c file *********************************************************/
86 /*** declarations of public functions ************************************************************/
88 /*** inline functions ****************************************************************************/
91 compute_namelen (struct dirent
*dent
__attribute__ ((unused
)))
93 #ifdef DIRENT_LENGTH_COMPUTED
97 dent
->d_namlen
= strlen (dent
);