| 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 | #define __WINE_USE_MSVCRT
|
|---|
| 11 |
|
|---|
| 12 | #include "msvcrt/stdio.h" /* For FILENAME_MAX */
|
|---|
| 13 | #include "msvcrt/sys/types.h" /* For time_t */
|
|---|
| 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 | typedef unsigned long _fsize_t;
|
|---|
| 25 |
|
|---|
| 26 | struct _finddata_t
|
|---|
| 27 | {
|
|---|
| 28 | unsigned attrib;
|
|---|
| 29 | MSVCRT(time_t) time_create;
|
|---|
| 30 | MSVCRT(time_t) time_access;
|
|---|
| 31 | MSVCRT(time_t) time_write;
|
|---|
| 32 | _fsize_t size;
|
|---|
| 33 | char name[MSVCRT(FILENAME_MAX)];
|
|---|
| 34 | };
|
|---|
| 35 |
|
|---|
| 36 | struct _finddatai64_t
|
|---|
| 37 | {
|
|---|
| 38 | unsigned attrib;
|
|---|
| 39 | MSVCRT(time_t) time_create;
|
|---|
| 40 | MSVCRT(time_t) time_access;
|
|---|
| 41 | MSVCRT(time_t) time_write;
|
|---|
| 42 | __int64 size;
|
|---|
| 43 | char name[MSVCRT(FILENAME_MAX)];
|
|---|
| 44 | };
|
|---|
| 45 |
|
|---|
| 46 | struct _wfinddata_t {
|
|---|
| 47 | unsigned attrib;
|
|---|
| 48 | MSVCRT(time_t) time_create;
|
|---|
| 49 | MSVCRT(time_t) time_access;
|
|---|
| 50 | MSVCRT(time_t) time_write;
|
|---|
| 51 | _fsize_t size;
|
|---|
| 52 | WCHAR name[MSVCRT(FILENAME_MAX)];
|
|---|
| 53 | };
|
|---|
| 54 |
|
|---|
| 55 | struct _wfinddatai64_t {
|
|---|
| 56 | unsigned attrib;
|
|---|
| 57 | MSVCRT(time_t) time_create;
|
|---|
| 58 | MSVCRT(time_t) time_access;
|
|---|
| 59 | MSVCRT(time_t) time_write;
|
|---|
| 60 | __int64 size;
|
|---|
| 61 | WCHAR name[MSVCRT(FILENAME_MAX)];
|
|---|
| 62 | };
|
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 | #ifdef __cplusplus
|
|---|
| 66 | extern "C" {
|
|---|
| 67 | #endif
|
|---|
| 68 |
|
|---|
| 69 | int _access(const char*,int);
|
|---|
| 70 | int _chmod(const char*,int);
|
|---|
| 71 | int _chsize(int,long);
|
|---|
| 72 | int _close(int);
|
|---|
| 73 | int _commit(int);
|
|---|
| 74 | int _creat(const char*,int);
|
|---|
| 75 | int _dup(int);
|
|---|
| 76 | int _dup2(int,int);
|
|---|
| 77 | int _eof(int);
|
|---|
| 78 | __int64 _filelengthi64(int);
|
|---|
| 79 | long _filelength(int);
|
|---|
| 80 | int _findclose(long);
|
|---|
| 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);
|
|---|
| 86 | int _isatty(int);
|
|---|
| 87 | int _locking(int,int,long);
|
|---|
| 88 | long _lseek(int,long,int);
|
|---|
| 89 | __int64 _lseeki64(int,__int64,int);
|
|---|
| 90 | char* _mktemp(char*);
|
|---|
| 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,...);
|
|---|
| 97 | long _tell(int);
|
|---|
| 98 | __int64 _telli64(int);
|
|---|
| 99 | int _umask(int);
|
|---|
| 100 | int _unlink(const char*);
|
|---|
| 101 | int _write(int,const void*,unsigned int);
|
|---|
| 102 |
|
|---|
| 103 | int MSVCRT(remove)(const char*);
|
|---|
| 104 | int MSVCRT(rename)(const char*,const char*);
|
|---|
| 105 |
|
|---|
| 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*);
|
|---|
| 118 |
|
|---|
| 119 |
|
|---|
| 120 | #ifdef __cplusplus
|
|---|
| 121 | }
|
|---|
| 122 | #endif
|
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 | #ifndef USE_MSVCRT_PREFIX
|
|---|
| 126 | #define access _access
|
|---|
| 127 | #define chmod _chmod
|
|---|
| 128 | #define chsize _chsize
|
|---|
| 129 | #define close _close
|
|---|
| 130 | #define creat _creat
|
|---|
| 131 | #define dup _dup
|
|---|
| 132 | #define dup2 _dup2
|
|---|
| 133 | #define eof _eof
|
|---|
| 134 | #define filelength _filelength
|
|---|
| 135 | #define isatty _isatty
|
|---|
| 136 | #define locking _locking
|
|---|
| 137 | #define lseek _lseek
|
|---|
| 138 | #define mktemp _mktemp
|
|---|
| 139 | #define open _open
|
|---|
| 140 | #define read _read
|
|---|
| 141 | #define setmode _setmode
|
|---|
| 142 | #define sopen _sopen
|
|---|
| 143 | #define tell _tell
|
|---|
| 144 | #define umask _umask
|
|---|
| 145 | #define unlink _unlink
|
|---|
| 146 | #define write _write
|
|---|
| 147 | #endif /* USE_MSVCRT_PREFIX */
|
|---|
| 148 |
|
|---|
| 149 | #endif /* __WINE_IO_H */
|
|---|