00001 #ifndef _system_dir_h
00002 #define _system_dir_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #if HAVE_DIRENT_H
00026 # include <dirent.h>
00027 # define NAMLEN(dirent) strlen((dirent)->d_name)
00028 #else
00029 # define dirent direct
00030 # define NAMLEN(dirent) (dirent)->d_namlen
00031 # if HAVE_SYS_NDIR_H
00032 # include <sys/ndir.h>
00033 # endif
00034 # if HAVE_SYS_DIR_H
00035 # include <sys/dir.h>
00036 # endif
00037 # if HAVE_NDIR_H
00038 # include <ndir.h>
00039 # endif
00040 #endif
00041
00042 #ifndef HAVE_MKDIR_MODE
00043 #define mkdir(dir, mode) mkdir(dir)
00044 #endif
00045
00046
00047
00048
00049 #ifndef ISDOT
00050 #define ISDOT(path) ( \
00051 *((const char *)(path)) == '.' && \
00052 *(((const char *)(path)) + 1) == '\0' \
00053 )
00054 #endif
00055
00056 #ifndef ISDOTDOT
00057 #define ISDOTDOT(path) ( \
00058 *((const char *)(path)) == '.' && \
00059 *(((const char *)(path)) + 1) == '.' && \
00060 *(((const char *)(path)) + 2) == '\0' \
00061 )
00062 #endif
00063
00064 #endif