00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _GL_DIRENT_H
00020
00021 #if __GNUC__ >= 3
00022 @PRAGMA_SYSTEM_HEADER@
00023 #endif
00024 @PRAGMA_COLUMNS@
00025
00026
00027 #@INCLUDE_NEXT@ @NEXT_DIRENT_H@
00028
00029 #ifndef _GL_DIRENT_H
00030 #define _GL_DIRENT_H
00031
00032
00033 #include <sys/types.h>
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 #if @REPLACE_CLOSEDIR@
00045 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00046 # define closedir rpl_closedir
00047 # endif
00048 _GL_FUNCDECL_RPL (closedir, int, (DIR *) _GL_ARG_NONNULL ((1)));
00049 _GL_CXXALIAS_RPL (closedir, int, (DIR *));
00050 #else
00051 _GL_CXXALIAS_SYS (closedir, int, (DIR *));
00052 #endif
00053 _GL_CXXALIASWARN (closedir);
00054
00055 #if @GNULIB_DIRFD@
00056
00057
00058 # if @REPLACE_DIRFD@
00059 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00060 # undef dirfd
00061 # define dirfd rpl_dirfd
00062 # endif
00063 _GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
00064 _GL_CXXALIAS_RPL (dirfd, int, (DIR *));
00065 # else
00066 # if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd
00067
00068
00069 static inline int (dirfd) (DIR *dp) { return dirfd (dp); }
00070 # undef dirfd
00071 # endif
00072 # if !(@HAVE_DECL_DIRFD@ || defined dirfd)
00073 _GL_FUNCDECL_SYS (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
00074 # endif
00075 _GL_CXXALIAS_SYS (dirfd, int, (DIR *));
00076 # endif
00077 _GL_CXXALIASWARN (dirfd);
00078 #elif defined GNULIB_POSIXCHECK
00079 # undef dirfd
00080 # if HAVE_RAW_DECL_DIRFD
00081 _GL_WARN_ON_USE (dirfd, "dirfd is unportable - "
00082 "use gnulib module dirfd for portability");
00083 # endif
00084 #endif
00085
00086 #if @GNULIB_FDOPENDIR@
00087
00088
00089
00090
00091
00092 # if @REPLACE_FDOPENDIR@
00093 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00094 # undef fdopendir
00095 # define fdopendir rpl_fdopendir
00096 # endif
00097 _GL_FUNCDECL_RPL (fdopendir, DIR *, (int fd));
00098 _GL_CXXALIAS_RPL (fdopendir, DIR *, (int fd));
00099 # else
00100 # if !@HAVE_FDOPENDIR@ || !@HAVE_DECL_FDOPENDIR@
00101 _GL_FUNCDECL_SYS (fdopendir, DIR *, (int fd));
00102 # endif
00103 _GL_CXXALIAS_SYS (fdopendir, DIR *, (int fd));
00104 # endif
00105 _GL_CXXALIASWARN (fdopendir);
00106 #elif defined GNULIB_POSIXCHECK
00107 # undef fdopendir
00108 # if HAVE_RAW_DECL_FDOPENDIR
00109 _GL_WARN_ON_USE (fdopendir, "fdopendir is unportable - "
00110 "use gnulib module fdopendir for portability");
00111 # endif
00112 #endif
00113
00114 #if @REPLACE_OPENDIR@
00115 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00116 # define opendir rpl_opendir
00117 # endif
00118 _GL_FUNCDECL_RPL (opendir, DIR *, (const char *) _GL_ARG_NONNULL ((1)));
00119 _GL_CXXALIAS_RPL (opendir, DIR *, (const char *));
00120 #else
00121 _GL_CXXALIAS_SYS (opendir, DIR *, (const char *));
00122 #endif
00123 _GL_CXXALIASWARN (opendir);
00124
00125 #if @GNULIB_SCANDIR@
00126
00127
00128
00129
00130 # if !@HAVE_SCANDIR@
00131 _GL_FUNCDECL_SYS (scandir, int,
00132 (const char *dir, struct dirent ***namelist,
00133 int (*filter) (const struct dirent *),
00134 int (*cmp) (const struct dirent **, const struct dirent **))
00135 _GL_ARG_NONNULL ((1, 2, 4)));
00136 # endif
00137
00138
00139 _GL_CXXALIAS_SYS_CAST (scandir, int,
00140 (const char *dir, struct dirent ***namelist,
00141 int (*filter) (const struct dirent *),
00142 int (*cmp) (const struct dirent **, const struct dirent **)));
00143 _GL_CXXALIASWARN (scandir);
00144 #elif defined GNULIB_POSIXCHECK
00145 # undef scandir
00146 # if HAVE_RAW_DECL_SCANDIR
00147 _GL_WARN_ON_USE (scandir, "scandir is unportable - "
00148 "use gnulib module scandir for portability");
00149 # endif
00150 #endif
00151
00152 #if @GNULIB_ALPHASORT@
00153
00154 # if !@HAVE_ALPHASORT@
00155 _GL_FUNCDECL_SYS (alphasort, int,
00156 (const struct dirent **, const struct dirent **)
00157 _GL_ARG_NONNULL ((1, 2)));
00158 # endif
00159
00160
00161 _GL_CXXALIAS_SYS_CAST (alphasort, int,
00162 (const struct dirent **, const struct dirent **));
00163 _GL_CXXALIASWARN (alphasort);
00164 #elif defined GNULIB_POSIXCHECK
00165 # undef alphasort
00166 # if HAVE_RAW_DECL_ALPHASORT
00167 _GL_WARN_ON_USE (alphasort, "alphasort is unportable - "
00168 "use gnulib module alphasort for portability");
00169 # endif
00170 #endif
00171
00172
00173 #endif
00174 #endif