VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/shaderlib/wine/include/msvcrt/io.h

最後變更 在這個檔案是 53201,由 vboxsync 提交於 10 年 前

Devices/Main: vmsvga updates

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 6.0 KB
 
1/*
2 * System I/O definitions.
3 *
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.
7 */
8#ifndef __WINE_IO_H
9#define __WINE_IO_H
10
11#include <crtdefs.h>
12
13#include <pshpack8.h>
14
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
23
24#ifndef _FSIZE_T_DEFINED
25typedef __msvcrt_ulong _fsize_t;
26#define _FSIZE_T_DEFINED
27#endif
28
29#ifndef _FINDDATA_T_DEFINED
30#define _FINDDATA_T_DEFINED
31struct _finddata_t
32{
33 unsigned attrib;
34 time_t time_create;
35 time_t time_access;
36 time_t time_write;
37 _fsize_t size;
38 char name[260];
39};
40
41struct _finddatai64_t
42{
43 unsigned attrib;
44 time_t time_create;
45 time_t time_access;
46 time_t time_write;
47 __int64 DECLSPEC_ALIGN(8) size;
48 char name[260];
49};
50
51struct _finddata64_t
52{
53 unsigned attrib;
54 __time64_t time_create;
55 __time64_t time_access;
56 __time64_t time_write;
57 __int64 DECLSPEC_ALIGN(8) size;
58 char name[260];
59};
60#endif /* _FINDDATA_T_DEFINED */
61
62#ifndef _WFINDDATA_T_DEFINED
63#define _WFINDDATA_T_DEFINED
64struct _wfinddata_t {
65 unsigned attrib;
66 time_t time_create;
67 time_t time_access;
68 time_t time_write;
69 _fsize_t size;
70 wchar_t name[260];
71};
72
73struct _wfinddatai64_t {
74 unsigned attrib;
75 time_t time_create;
76 time_t time_access;
77 time_t time_write;
78 __int64 DECLSPEC_ALIGN(8) size;
79 wchar_t name[260];
80};
81#endif /* _WFINDDATA_T_DEFINED */
82
83#ifdef __cplusplus
84extern "C" {
85#endif
86
87int __cdecl _access(const char*,int);
88int __cdecl _chmod(const char*,int);
89int __cdecl _chsize(int,__msvcrt_ulong);
90int __cdecl _close(int);
91int __cdecl _commit(int);
92int __cdecl _creat(const char*,int);
93int __cdecl _dup(int);
94int __cdecl _dup2(int,int);
95int __cdecl _eof(int);
96__int64 __cdecl _filelengthi64(int);
97__msvcrt_long __cdecl _filelength(int);
98int __cdecl _findclose(intptr_t);
99intptr_t __cdecl _findfirst(const char*,struct _finddata_t*);
100intptr_t __cdecl _findfirsti64(const char*, struct _finddatai64_t*);
101intptr_t __cdecl _findfirst64(const char*, struct _finddata64_t*);
102int __cdecl _findnext(intptr_t,struct _finddata_t*);
103int __cdecl _findnexti64(intptr_t, struct _finddatai64_t*);
104int __cdecl _findnext64(intptr_t, struct _finddata64_t*);
105intptr_t __cdecl _get_osfhandle(int);
106int __cdecl _isatty(int);
107int __cdecl _locking(int,int,__msvcrt_long);
108__msvcrt_long __cdecl _lseek(int,__msvcrt_long,int);
109__int64 __cdecl _lseeki64(int,__int64,int);
110char* __cdecl _mktemp(char*);
111int __cdecl _mktemp_s(char*,size_t);
112int __cdecl _open(const char*,int,...);
113int __cdecl _open_osfhandle(intptr_t,int);
114int __cdecl _pipe(int*,unsigned int,int);
115int __cdecl _read(int,void*,unsigned int);
116int __cdecl _setmode(int,int);
117int __cdecl _sopen(const char*,int,int,...);
118__msvcrt_long __cdecl _tell(int);
119__int64 __cdecl _telli64(int);
120int __cdecl _umask(int);
121int __cdecl _unlink(const char*);
122int __cdecl _write(int,const void*,unsigned int);
123
124int __cdecl remove(const char*);
125int __cdecl rename(const char*,const char*);
126
127#ifndef _WIO_DEFINED
128#define _WIO_DEFINED
129int __cdecl _waccess(const wchar_t*,int);
130int __cdecl _wchmod(const wchar_t*,int);
131int __cdecl _wcreat(const wchar_t*,int);
132intptr_t __cdecl _wfindfirst(const wchar_t*,struct _wfinddata_t*);
133intptr_t __cdecl _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
134int __cdecl _wfindnext(intptr_t,struct _wfinddata_t*);
135int __cdecl _wfindnexti64(intptr_t, struct _wfinddatai64_t*);
136wchar_t * __cdecl _wmktemp(wchar_t*);
137int __cdecl _wopen(const wchar_t*,int,...);
138int __cdecl _wrename(const wchar_t*,const wchar_t*);
139int __cdecl _wsopen(const wchar_t*,int,int,...);
140int __cdecl _wunlink(const wchar_t*);
141#endif /* _WIO_DEFINED */
142
143#ifdef __cplusplus
144}
145#endif
146
147
148static inline int access(const char* path, int mode) { return _access(path, mode); }
149static inline int chmod(const char* path, int mode) { return _chmod(path, mode); }
150static inline int chsize(int fd, __msvcrt_long size) { return _chsize(fd, size); }
151static inline int close(int fd) { return _close(fd); }
152static inline int creat(const char* path, int mode) { return _creat(path, mode); }
153static inline int dup(int od) { return _dup(od); }
154static inline int dup2(int od, int nd) { return _dup2(od, nd); }
155static inline int eof(int fd) { return _eof(fd); }
156static inline __msvcrt_long filelength(int fd) { return _filelength(fd); }
157static inline int isatty(int fd) { return _isatty(fd); }
158static inline int locking(int fd, int mode, __msvcrt_long size) { return _locking(fd, mode, size); }
159static inline __msvcrt_long lseek(int fd, __msvcrt_long off, int where) { return _lseek(fd, off, where); }
160static inline char* mktemp(char* pat) { return _mktemp(pat); }
161static inline int read(int fd, void* buf, unsigned int size) { return _read(fd, buf, size); }
162static inline int setmode(int fd, int mode) { return _setmode(fd, mode); }
163static inline __msvcrt_long tell(int fd) { return _tell(fd); }
164#ifndef _UMASK_DEFINED
165static inline int umask(int fd) { return _umask(fd); }
166#define _UMASK_DEFINED
167#endif
168#ifndef _UNLINK_DEFINED
169static inline int unlink(const char* path) { return _unlink(path); }
170#define _UNLINK_DEFINED
171#endif
172static inline int write(int fd, const void* buf, unsigned int size) { return _write(fd, buf, size); }
173
174#if defined(__GNUC__) && (__GNUC__ < 4)
175extern int __cdecl open(const char*,int,...) __attribute__((alias("_open")));
176extern int __cdecl sopen(const char*,int,int,...) __attribute__((alias("_sopen")));
177#else
178#define open _open
179#define sopen _sopen
180#endif /* __GNUC__ */
181
182#include <poppack.h>
183
184#endif /* __WINE_IO_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette