Include dirent.h with doublequotes so that it is searched from this same
[platform/upstream/glib.git] / build / win32 / dirent / dirent.h
1 /*\r
2  * DIRENT.H (formerly DIRLIB.H)\r
3  * This file has no copyright assigned and is placed in the Public Domain.\r
4  * This file is a part of the mingw-runtime package.\r
5  * No warranty is given; refer to the file DISCLAIMER within the package.\r
6  *\r
7  */\r
8 #ifndef _DIRENT_H_\r
9 #define _DIRENT_H_\r
10 \r
11 #include <stdio.h>\r
12 #include <io.h>\r
13 \r
14 #ifndef RC_INVOKED\r
15 \r
16 #ifdef __cplusplus\r
17 extern "C" {\r
18 #endif\r
19 \r
20 struct dirent\r
21 {\r
22         long            d_ino;          /* Always zero. */\r
23         unsigned short  d_reclen;       /* Always zero. */\r
24         unsigned short  d_namlen;       /* Length of name in d_name. */\r
25         char            d_name[FILENAME_MAX]; /* File name. */\r
26 };\r
27 \r
28 /*\r
29  * This is an internal data structure. Good programmers will not use it\r
30  * except as an argument to one of the functions below.\r
31  * dd_stat field is now int (was short in older versions).\r
32  */\r
33 typedef struct\r
34 {\r
35         /* disk transfer area for this dir */\r
36         struct _finddata_t      dd_dta;\r
37 \r
38         /* dirent struct to return from dir (NOTE: this makes this thread\r
39          * safe as long as only one thread uses a particular DIR struct at\r
40          * a time) */\r
41         struct dirent           dd_dir;\r
42 \r
43         /* _findnext handle */\r
44         long                    dd_handle;\r
45 \r
46         /*\r
47          * Status of search:\r
48          *   0 = not started yet (next entry to read is first entry)\r
49          *  -1 = off the end\r
50          *   positive = 0 based index of next entry\r
51          */\r
52         int                     dd_stat;\r
53 \r
54         /* given path for dir with search pattern (struct is extended) */\r
55         char                    dd_name[1];\r
56 } DIR;\r
57 \r
58 DIR* __cdecl opendir (const char*);\r
59 struct dirent* __cdecl readdir (DIR*);\r
60 int __cdecl closedir (DIR*);\r
61 void __cdecl rewinddir (DIR*);\r
62 long __cdecl telldir (DIR*);\r
63 void __cdecl seekdir (DIR*, long);\r
64 \r
65 \r
66 /* wide char versions */\r
67 \r
68 struct _wdirent\r
69 {\r
70         long            d_ino;          /* Always zero. */\r
71         unsigned short  d_reclen;       /* Always zero. */\r
72         unsigned short  d_namlen;       /* Length of name in d_name. */\r
73         wchar_t         d_name[FILENAME_MAX]; /* File name. */\r
74 };\r
75 \r
76 /*\r
77  * This is an internal data structure. Good programmers will not use it\r
78  * except as an argument to one of the functions below.\r
79  */\r
80 typedef struct\r
81 {\r
82         /* disk transfer area for this dir */\r
83         struct _wfinddata_t     dd_dta;\r
84 \r
85         /* dirent struct to return from dir (NOTE: this makes this thread\r
86          * safe as long as only one thread uses a particular DIR struct at\r
87          * a time) */\r
88         struct _wdirent         dd_dir;\r
89 \r
90         /* _findnext handle */\r
91         long                    dd_handle;\r
92 \r
93         /*\r
94          * Status of search:\r
95          *   0 = not started yet (next entry to read is first entry)\r
96          *  -1 = off the end\r
97          *   positive = 0 based index of next entry\r
98          */\r
99         int                     dd_stat;\r
100 \r
101         /* given path for dir with search pattern (struct is extended) */\r
102         wchar_t                 dd_name[1];\r
103 } _WDIR;\r
104 \r
105 \r
106 \r
107 _WDIR* __cdecl _wopendir (const wchar_t*);\r
108 struct _wdirent*  __cdecl _wreaddir (_WDIR*);\r
109 int __cdecl _wclosedir (_WDIR*);\r
110 void __cdecl _wrewinddir (_WDIR*);\r
111 long __cdecl _wtelldir (_WDIR*);\r
112 void __cdecl _wseekdir (_WDIR*, long);\r
113 \r
114 \r
115 #ifdef  __cplusplus\r
116 }\r
117 #endif\r
118 \r
119 #endif  /* Not RC_INVOKED */\r
120 \r
121 #endif  /* Not _DIRENT_H_ */\r