| ... | @@ -147,6 +147,8 @@ typedef struct _ftsent { | ... | @@ -147,6 +147,8 @@ typedef struct _ftsent { |
| 147 | } FTSENT; | 147 | } FTSENT; |
| 148 | | 148 | |
| 149 | #ifdef __USE_LARGEFILE64 | 149 | #ifdef __USE_LARGEFILE64 |
| | 150 | // zig patch: 64bits variants appeared starting from glibc 2.23 |
| | 151 | # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 23) || __GLIBC__ > 2 |
| 150 | typedef struct _ftsent64 { | 152 | typedef struct _ftsent64 { |
| 151 | 	struct _ftsent64 *fts_cycle;	/* cycle node */ | 153 | 	struct _ftsent64 *fts_cycle;	/* cycle node */ |
| 152 | 	struct _ftsent64 *fts_parent;	/* parent directory */ | 154 | 	struct _ftsent64 *fts_parent;	/* parent directory */ |
| ... | @@ -175,9 +177,15 @@ typedef struct _ftsent64 { | ... | @@ -175,9 +177,15 @@ typedef struct _ftsent64 { |
| 175 | 	struct stat64 *fts_statp;	/* stat(2) information */ | 177 | 	struct stat64 *fts_statp;	/* stat(2) information */ |
| 176 | 	char fts_name[1];		/* file name */ | 178 | 	char fts_name[1];		/* file name */ |
| 177 | } FTSENT64; | 179 | } FTSENT64; |
| | 180 | # endif |
| 178 | #endif | 181 | #endif |
| 179 | | 182 | |
| 180 | __BEGIN_DECLS | 183 | __BEGIN_DECLS |
| | 184 | |
| | 185 | // zig patch: 64bits variants appeared starting from glibc 2.23 |
| | 186 | // before that version, we can't declare nor redirect to them |
| | 187 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 23) || __GLIBC__ > 2 |
| | 188 | |
| 181 | #ifndef __USE_FILE_OFFSET64 | 189 | #ifndef __USE_FILE_OFFSET64 |
| 182 | FTSENT	*fts_children (FTS *, int); | 190 | FTSENT	*fts_children (FTS *, int); |
| 183 | int	 fts_close (FTS *); | 191 | int	 fts_close (FTS *); |
| ... | @@ -216,6 +224,19 @@ int	 __REDIRECT_NTH (fts_set, (FTS *, FTSENT *, int), | ... | @@ -216,6 +224,19 @@ int	 __REDIRECT_NTH (fts_set, (FTS *, FTSENT *, int), |
| 216 | # endif | 224 | # endif |
| 217 | # endif | 225 | # endif |
| 218 | #endif | 226 | #endif |
| | 227 | #else /* (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 23) || __GLIBC__ > 2 */ |
| | 228 | FTSENT	*fts_children (FTS *, int); |
| | 229 | int	 fts_close (FTS *); |
| | 230 | FTS	*fts_open (char * const *, int, |
| | 231 | 		 int (*)(const FTSENT **, const FTSENT **)); |
| | 232 | FTSENT	*fts_read (FTS *); |
| | 233 | int	 fts_set (FTS *, FTSENT *, int) __THROW; |
| | 234 | #endif |
| | 235 | |
| | 236 | // zig patch: 64bits time variants appeared starting from glibc 2.34 |
| | 237 | // before that version, there is nothing to declare |
| | 238 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || __GLIBC__ > 2 |
| | 239 | |
| 219 | #ifdef __USE_LARGEFILE64 | 240 | #ifdef __USE_LARGEFILE64 |
| 220 | # ifndef __USE_TIME64_REDIRECTS | 241 | # ifndef __USE_TIME64_REDIRECTS |
| 221 | FTSENT64 *fts64_children (FTS64 *, int); | 242 | FTSENT64 *fts64_children (FTS64 *, int); |
| ... | @@ -243,6 +264,8 @@ int	 __REDIRECT_NTH (fts64_set, (FTS64 *, FTSENT64 *, int), | ... | @@ -243,6 +264,8 @@ int	 __REDIRECT_NTH (fts64_set, (FTS64 *, FTSENT64 *, int), |
| 243 | # endif | 264 | # endif |
| 244 | # endif | 265 | # endif |
| 245 | #endif | 266 | #endif |
| | 267 | |
| | 268 | #endif /* (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || __GLIBC__ > 2 */ |
| 246 | __END_DECLS | 269 | __END_DECLS |
| 247 | | 270 | |
| 248 | #endif /* fts.h */ | | |
| \ No newline at end of file |
| | 271 | #endif /* fts.h */ |