Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1580)

Side by Side Diff: src/pkg/syscall/ztypes_mingw_386.go

Issue 770041: code review 770041: syscall: implementing some mingw syscalls required by o... (Closed)
Patch Set: code review 770041: syscall: implementing some mingw syscalls required by o... Created 14 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/syscall/zsyscall_mingw_386.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // godefs -gsyscall -f-m32 types_linux.c 1 // godefs -gsyscall -f-m32 types_linux.c
2 2
3 // MACHINE GENERATED - DO NOT EDIT. 3 // MACHINE GENERATED - DO NOT EDIT.
4 4
5 package syscall 5 package syscall
6 6
7 // TODO(brainman): autogenerate types in ztypes_mingw_386.go 7 // TODO(brainman): autogenerate types in ztypes_mingw_386.go
8 8
9 //import "unsafe" 9 //import "unsafe"
10 10
11 // Constants 11 // Constants
12 const ( 12 const (
13 sizeofPtr = 0x4 13 sizeofPtr = 0x4
14 sizeofShort = 0x2 14 sizeofShort = 0x2
15 sizeofInt = 0x4 15 sizeofInt = 0x4
16 sizeofLong = 0x4 16 sizeofLong = 0x4
17 sizeofLongLong = 0x8 17 sizeofLongLong = 0x8
18 PathMax = 0x1000 18 PathMax = 0x1000
19 SizeofSockaddrInet4 = 0x10 19 SizeofSockaddrInet4 = 0x10
20 SizeofSockaddrInet6 = 0x1c 20 SizeofSockaddrInet6 = 0x1c
21 SizeofSockaddrAny = 0x70 21 SizeofSockaddrAny = 0x70
22 SizeofSockaddrUnix = 0x6e 22 SizeofSockaddrUnix = 0x6e
23 SizeofLinger = 0x8 23 SizeofLinger = 0x8
24 SizeofMsghdr = 0x1c 24 SizeofMsghdr = 0x1c
25 SizeofCmsghdr = 0xc 25 SizeofCmsghdr = 0xc
26 ) 26 )
27 27
28 const ( 28 const (
29 // Invented values to support what package os expects.
30 O_RDONLY = 0x00000
31 O_WRONLY = 0x00001
32 O_RDWR = 0x00002
33 O_CREAT = 0x00040
34 O_EXCL = 0x00080
35 O_NOCTTY = 0x00100
36 O_TRUNC = 0x00200
37 O_NONBLOCK = 0x00800
38 O_APPEND = 0x00400
39 O_SYNC = 0x01000
40 O_ASYNC = 0x02000
41 O_CLOEXEC = 0x80000
42 )
43
44 const (
45 GENERIC_READ = 0x80000000
46 GENERIC_WRITE = 0x40000000
47 GENERIC_EXECUTE = 0x20000000
48 GENERIC_ALL = 0x10000000
49
50 FILE_SHARE_READ = 0x00000001
51 FILE_SHARE_WRITE = 0x00000002
52 FILE_SHARE_DELETE = 0x00000004
53 FILE_ATTRIBUTE_READONLY = 0x00000001
54 FILE_ATTRIBUTE_HIDDEN = 0x00000002
55 FILE_ATTRIBUTE_SYSTEM = 0x00000004
56 FILE_ATTRIBUTE_DIRECTORY = 0x00000010
57 FILE_ATTRIBUTE_ARCHIVE = 0x00000020
58 FILE_ATTRIBUTE_NORMAL = 0x00000080
59
60 CREATE_NEW = 1
61 CREATE_ALWAYS = 2
62 OPEN_EXISTING = 3
63 OPEN_ALWAYS = 4
64 TRUNCATE_EXISTING = 5
65
66 STD_INPUT_HANDLE = -10
67 STD_OUTPUT_HANDLE = -11
68 STD_ERROR_HANDLE = -12
69
70 FILE_BEGIN = 0
71 FILE_CURRENT = 1
72 FILE_END = 2
73
29 FORMAT_MESSAGE_ALLOCATE_BUFFER = 256 74 FORMAT_MESSAGE_ALLOCATE_BUFFER = 256
30 FORMAT_MESSAGE_IGNORE_INSERTS = 512 75 FORMAT_MESSAGE_IGNORE_INSERTS = 512
31 FORMAT_MESSAGE_FROM_STRING = 1024 76 FORMAT_MESSAGE_FROM_STRING = 1024
32 FORMAT_MESSAGE_FROM_HMODULE = 2048 77 FORMAT_MESSAGE_FROM_HMODULE = 2048
33 FORMAT_MESSAGE_FROM_SYSTEM = 4096 78 FORMAT_MESSAGE_FROM_SYSTEM = 4096
34 FORMAT_MESSAGE_ARGUMENT_ARRAY = 8192 79 FORMAT_MESSAGE_ARGUMENT_ARRAY = 8192
35 FORMAT_MESSAGE_MAX_WIDTH_MASK = 255 80 FORMAT_MESSAGE_MAX_WIDTH_MASK = 255
36 ) 81 )
37 82
38 // Types 83 // Types
39 84
40 type _C_short int16 85 type _C_short int16
41 86
42 type _C_int int32 87 type _C_int int32
43 88
44 type _C_long int32 89 type _C_long int32
45 90
46 type _C_long_long int64 91 type _C_long_long int64
47 92
48 type Timeval struct { 93 type Timeval struct {
49 Sec int32 94 Sec int32
50 Usec int32 95 Usec int32
51 } 96 }
97
98 type Overlapped struct {
99 Internal uint32
100 InternalHigh uint32
101 Offset uint32
102 OffsetHigh uint32
103 HEvent *byte
104 }
105
106 // TODO(brainman): fix all needed for os
107
108 const (
109 PROT_READ = 0x1
110 PROT_WRITE = 0x2
111 MAP_SHARED = 0x1
112 SYS_FORK = 0
113 SYS_PTRACE = 0
114 SYS_CHDIR = 0
115 SYS_DUP2 = 0
116 SYS_FCNTL = 0
117 SYS_EXECVE = 0
118 F_GETFD = 0x1
119 F_SETFD = 0x2
120 F_GETFL = 0x3
121 F_SETFL = 0x4
122 FD_CLOEXEC = 0
123 S_IFMT = 0x1f000
124 S_IFIFO = 0x1000
125 S_IFCHR = 0x2000
126 S_IFDIR = 0x4000
127 S_IFBLK = 0x6000
128 S_IFREG = 0x8000
129 S_IFLNK = 0xa000
130 S_IFSOCK = 0xc000
131 S_ISUID = 0x800
132 S_ISGID = 0x400
133 S_ISVTX = 0x200
134 S_IRUSR = 0x100
135 S_IWUSR = 0x80
136 S_IXUSR = 0x40
137 )
138
139 type Stat_t struct {
140 Dev int64
141 Ino uint32
142 Mode uint32
143 Nlink uint32
144 Uid uint32
145 Gid uint32
146 __padding int32
147 Rdev int64
148 Size int32
149 Blksize int32
150 Blocks int32
151 Atime int32
152 Mtime int32
153 Ctime int32
154 }
155
156 type Dirent struct {
157 Ino uint32
158 Off int32
159 Reclen uint16
160 Name [256]int8
161 Pad0 [2]byte
162 }
OLDNEW
« no previous file with comments | « src/pkg/syscall/zsyscall_mingw_386.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b