VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/io.h@ 28475

Last change on this file since 28475 was 28475, checked in by vboxsync, 15 years ago

crOpenGL: update to wine 1.1.43

  • Property svn:eol-style set to native
File size: 6.1 KB
Line 
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
9/*
10 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
11 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
12 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
13 * a choice of LGPL license versions is made available with the language indicating
14 * that LGPLv2 or any later version may be used, or where a choice of which version
15 * of the LGPL is applied is otherwise unspecified.
16 */
17
18#ifndef __WINE_IO_H
19#define __WINE_IO_H
20
21#include <crtdefs.h>
22
23#include <pshpack8.h>
24
25/* The following are also defined in dos.h */
26#define _A_NORMAL 0x00000000
27#define _A_RDONLY 0x00000001
28#define _A_HIDDEN 0x00000002
29#define _A_SYSTEM 0x00000004
30#define _A_VOLID 0x00000008
31#define _A_SUBDIR 0x00000010
32#define _A_ARCH 0x00000020
33
34#ifndef _FSIZE_T_DEFINED
35typedef __msvcrt_ulong _fsize_t;
36#define _FSIZE_T_DEFINED
37#endif
38
39#ifndef _FINDDATA_T_DEFINED
40#define _FINDDATA_T_DEFINED
41struct _finddata_t
42{
43 unsigned attrib;
44 time_t time_create;
45 time_t time_access;
46 time_t time_write;
47 _fsize_t size;
48 char name[260];
49};
50
51struct _finddatai64_t
52{
53 unsigned attrib;
54 time_t time_create;
55 time_t time_access;
56 time_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*);
101int __cdecl _findnext(intptr_t,struct _finddata_t*);
102int __cdecl _findnexti64(intptr_t, struct _finddatai64_t*);
103intptr_t __cdecl _get_osfhandle(int);
104int __cdecl _isatty(int);
105int __cdecl _locking(int,int,__msvcrt_long);
106__msvcrt_long __cdecl _lseek(int,__msvcrt_long,int);
107__int64 __cdecl _lseeki64(int,__int64,int);
108char* __cdecl _mktemp(char*);
109int __cdecl _open(const char*,int,...);
110int __cdecl _open_osfhandle(intptr_t,int);
111int __cdecl _pipe(int*,unsigned int,int);
112int __cdecl _read(int,void*,unsigned int);
113int __cdecl _setmode(int,int);
114int __cdecl _sopen(const char*,int,int,...);
115__msvcrt_long __cdecl _tell(int);
116__int64 __cdecl _telli64(int);
117int __cdecl _umask(int);
118int __cdecl _unlink(const char*);
119int __cdecl _write(int,const void*,unsigned int);
120
121int __cdecl remove(const char*);
122int __cdecl rename(const char*,const char*);
123
124#ifndef _WIO_DEFINED
125#define _WIO_DEFINED
126int __cdecl _waccess(const wchar_t*,int);
127int __cdecl _wchmod(const wchar_t*,int);
128int __cdecl _wcreat(const wchar_t*,int);
129intptr_t __cdecl _wfindfirst(const wchar_t*,struct _wfinddata_t*);
130intptr_t __cdecl _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
131int __cdecl _wfindnext(intptr_t,struct _wfinddata_t*);
132int __cdecl _wfindnexti64(intptr_t, struct _wfinddatai64_t*);
133wchar_t * __cdecl _wmktemp(wchar_t*);
134int __cdecl _wopen(const wchar_t*,int,...);
135int __cdecl _wrename(const wchar_t*,const wchar_t*);
136int __cdecl _wsopen(const wchar_t*,int,int,...);
137int __cdecl _wunlink(const wchar_t*);
138#endif /* _WIO_DEFINED */
139
140#ifdef __cplusplus
141}
142#endif
143
144
145static inline int access(const char* path, int mode) { return _access(path, mode); }
146static inline int chmod(const char* path, int mode) { return _chmod(path, mode); }
147static inline int chsize(int fd, __msvcrt_long size) { return _chsize(fd, size); }
148static inline int close(int fd) { return _close(fd); }
149static inline int creat(const char* path, int mode) { return _creat(path, mode); }
150static inline int dup(int od) { return _dup(od); }
151static inline int dup2(int od, int nd) { return _dup2(od, nd); }
152static inline int eof(int fd) { return _eof(fd); }
153static inline __msvcrt_long filelength(int fd) { return _filelength(fd); }
154static inline int isatty(int fd) { return _isatty(fd); }
155static inline int locking(int fd, int mode, __msvcrt_long size) { return _locking(fd, mode, size); }
156static inline __msvcrt_long lseek(int fd, __msvcrt_long off, int where) { return _lseek(fd, off, where); }
157static inline char* mktemp(char* pat) { return _mktemp(pat); }
158static inline int read(int fd, void* buf, unsigned int size) { return _read(fd, buf, size); }
159static inline int setmode(int fd, int mode) { return _setmode(fd, mode); }
160static inline __msvcrt_long tell(int fd) { return _tell(fd); }
161#ifndef _UMASK_DEFINED
162static inline int umask(int fd) { return _umask(fd); }
163#define _UMASK_DEFINED
164#endif
165#ifndef _UNLINK_DEFINED
166static inline int unlink(const char* path) { return _unlink(path); }
167#define _UNLINK_DEFINED
168#endif
169static inline int write(int fd, const void* buf, unsigned int size) { return _write(fd, buf, size); }
170
171#if defined(__GNUC__) && (__GNUC__ < 4)
172extern int __cdecl open(const char*,int,...) __attribute__((alias("_open")));
173extern int __cdecl sopen(const char*,int,int,...) __attribute__((alias("_sopen")));
174#else
175#define open _open
176#define sopen _sopen
177#endif /* __GNUC__ */
178
179#include <poppack.h>
180
181#endif /* __WINE_IO_H */
Note: See TracBrowser for help on using the repository browser.

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