source: EcnlProtoTool/trunk/musl-1.1.12/include/_dirent.h@ 279

Last change on this file since 279 was 279, checked in by coas-nagasima, 7 years ago

ファイルを追加、更新。

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-chdr
File size: 1.8 KB
Line 
1#ifndef _DIRENT_H
2#define _DIRENT_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8/*#include <features.h>
9
10#define __NEED_ino_t
11#define __NEED_off_t
12#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
13#define __NEED_size_t
14#endif
15
16#include <bits/alltypes.h>*/
17#define MAXPATHLEN 256
18int chroot(const char *);
19
20typedef struct __dirstream DIR;
21
22struct dirent
23{
24 ino_t d_ino;
25 off_t d_off;
26 unsigned short d_reclen;
27 unsigned char d_type;
28 char d_name[256];
29};
30
31#define d_fileno d_ino
32
33int closedir(DIR *);
34DIR *fdopendir(int);
35DIR *opendir(const char *);
36struct dirent *readdir(DIR *);
37int readdir_r(DIR *__restrict, struct dirent *__restrict, struct dirent **__restrict);
38void rewinddir(DIR *);
39void seekdir(DIR *, long);
40long telldir(DIR *);
41int dirfd(DIR *);
42
43int alphasort(const struct dirent **, const struct dirent **);
44int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **));
45
46#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
47#define DT_UNKNOWN 0
48#define DT_FIFO 1
49#define DT_CHR 2
50#define DT_DIR 4
51#define DT_BLK 6
52#define DT_REG 8
53#define DT_LNK 10
54#define DT_SOCK 12
55#define DT_WHT 14
56#define IFTODT(x) ((x)>>12 & 017)
57#define DTTOIF(x) ((x)<<12)
58int getdents(int, struct dirent *, size_t);
59#endif
60
61#ifdef _GNU_SOURCE
62int versionsort(const struct dirent **, const struct dirent **);
63#endif
64
65#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
66#define dirent64 dirent
67#define readdir64 readdir
68#define readdir64_r readdir_r
69#define scandir64 scandir
70#define alphasort64 alphasort
71#define versionsort64 versionsort
72#define off64_t off_t
73#define ino64_t ino_t
74#define getdents64 getdents
75#endif
76
77#ifdef __cplusplus
78}
79#endif
80
81#endif
Note: See TracBrowser for help on using the repository browser.