2 * System I/O definitions.
4 * Derived from the mingw header written by Colin Peters.
5 * Modified for Wine use by Jon Griffiths and Francois Gouget.
6 * This file is in the public domain.
10 #define __WINE_USE_MSVCRT
12 #include "msvcrt/stdio.h" /* For FILENAME_MAX */
13 #include "msvcrt/sys/types.h" /* For time_t */
15 /* The following are also defined in dos.h */
16 #define _A_NORMAL 0x00000000
17 #define _A_RDONLY 0x00000001
18 #define _A_HIDDEN 0x00000002
19 #define _A_SYSTEM 0x00000004
20 #define _A_VOLID 0x00000008
21 #define _A_SUBDIR 0x00000010
22 #define _A_ARCH 0x00000020
24 typedef unsigned long _fsize_t
;
29 MSVCRT(time_t) time_create
;
30 MSVCRT(time_t) time_access
;
31 MSVCRT(time_t) time_write
;
33 char name
[MSVCRT(FILENAME_MAX
)];
39 MSVCRT(time_t) time_create
;
40 MSVCRT(time_t) time_access
;
41 MSVCRT(time_t) time_write
;
43 char name
[MSVCRT(FILENAME_MAX
)];
48 MSVCRT(time_t) time_create
;
49 MSVCRT(time_t) time_access
;
50 MSVCRT(time_t) time_write
;
52 WCHAR name
[MSVCRT(FILENAME_MAX
)];
55 struct _wfinddatai64_t
{
57 MSVCRT(time_t) time_create
;
58 MSVCRT(time_t) time_access
;
59 MSVCRT(time_t) time_write
;
61 WCHAR name
[MSVCRT(FILENAME_MAX
)];
69 int _access(const char*,int);
70 int _chmod(const char*,int);
71 int _chsize(int,long);
74 int _creat(const char*,int);
78 __int64
_filelengthi64(int);
79 long _filelength(int);
81 long _findfirst(const char*,struct _finddata_t
*);
82 long _findfirsti64(const char*, struct _finddatai64_t
*);
83 int _findnext(long,struct _finddata_t
*);
84 int _findnexti64(long, struct _finddatai64_t
*);
85 long _get_osfhandle(int);
87 int _locking(int,int,long);
88 long _lseek(int,long,int);
89 __int64
_lseeki64(int,__int64
,int);
91 int _open(const char*,int,...);
92 int _open_osfhandle(long,int);
93 int _pipe(int*,unsigned int,int);
94 int _read(int,void*,unsigned int);
95 int _setmode(int,int);
96 int _sopen(const char*,int,int,...);
98 __int64
_telli64(int);
100 int _unlink(const char*);
101 int _write(int,const void*,unsigned int);
103 int MSVCRT(remove
)(const char*);
104 int MSVCRT(rename
)(const char*,const char*);
106 int _waccess(const WCHAR
*,int);
107 int _wchmod(const WCHAR
*,int);
108 int _wcreat(const WCHAR
*,int);
109 long _wfindfirst(const WCHAR
*,struct _wfinddata_t
*);
110 long _wfindfirsti64(const WCHAR
*, struct _wfinddatai64_t
*);
111 int _wfindnext(long,struct _wfinddata_t
*);
112 int _wfindnexti64(long, struct _wfinddatai64_t
*);
113 WCHAR
* _wmktemp(WCHAR
*);
114 int _wopen(const WCHAR
*,int,...);
115 int _wrename(const WCHAR
*,const WCHAR
*);
116 int _wsopen(const WCHAR
*,int,int,...);
117 int _wunlink(const WCHAR
*);
125 #ifndef USE_MSVCRT_PREFIX
126 #define access _access
128 #define chsize _chsize
134 #define filelength _filelength
135 #define isatty _isatty
136 #define locking _locking
138 #define mktemp _mktemp
141 #define setmode _setmode
145 #define unlink _unlink
147 #endif /* USE_MSVCRT_PREFIX */
149 #endif /* __WINE_IO_H */