1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 //! C definitions used by libnative that don't belong in liblibc
14 #![cfg_attr(test, allow(dead_code))]
15 #![unstable(issue = "0", feature = "windows_c")]
17 use os
::raw
::{c_int, c_uint, c_ulong, c_long, c_longlong, c_ushort,}
;
18 use os
::raw
::{c_char, c_ulonglong}
;
19 use libc
::{wchar_t, size_t, c_void}
;
24 #[cfg(target_arch = "x86_64")]
25 struct u64x2(u64, u64);
27 pub use self::FILE_INFO_BY_HANDLE_CLASS
::*;
28 pub use self::EXCEPTION_DISPOSITION
::*;
30 pub type DWORD
= c_ulong
;
31 pub type HANDLE
= LPVOID
;
32 pub type HINSTANCE
= HANDLE
;
33 pub type HMODULE
= HINSTANCE
;
34 pub type BOOL
= c_int
;
36 pub type BOOLEAN
= BYTE
;
37 pub type GROUP
= c_uint
;
38 pub type LONG_PTR
= isize;
39 pub type LARGE_INTEGER
= c_longlong
;
40 pub type LONG
= c_long
;
41 pub type UINT
= c_uint
;
43 pub type USHORT
= c_ushort
;
44 pub type SIZE_T
= usize;
46 pub type CHAR
= c_char
;
47 pub type HCRYPTPROV
= LONG_PTR
;
48 pub type ULONG_PTR
= c_ulonglong
;
49 pub type ULONG
= c_ulong
;
50 #[cfg(target_arch = "x86_64")]
51 pub type ULONGLONG
= u64;
52 #[cfg(target_arch = "x86_64")]
53 pub type DWORDLONG
= ULONGLONG
;
55 pub type LPBOOL
= *mut BOOL
;
56 pub type LPBYTE
= *mut BYTE
;
57 pub type LPBY_HANDLE_FILE_INFORMATION
= *mut BY_HANDLE_FILE_INFORMATION
;
58 pub type LPCSTR
= *const CHAR
;
59 pub type LPCVOID
= *const c_void
;
60 pub type LPCWSTR
= *const WCHAR
;
61 pub type LPDWORD
= *mut DWORD
;
62 pub type LPHANDLE
= *mut HANDLE
;
63 pub type LPOVERLAPPED
= *mut OVERLAPPED
;
64 pub type LPPROCESS_INFORMATION
= *mut PROCESS_INFORMATION
;
65 pub type LPSECURITY_ATTRIBUTES
= *mut SECURITY_ATTRIBUTES
;
66 pub type LPSTARTUPINFO
= *mut STARTUPINFO
;
67 pub type LPVOID
= *mut c_void
;
68 pub type LPWCH
= *mut WCHAR
;
69 pub type LPWIN32_FIND_DATAW
= *mut WIN32_FIND_DATAW
;
70 pub type LPWSADATA
= *mut WSADATA
;
71 pub type LPWSAPROTOCOL_INFO
= *mut WSAPROTOCOL_INFO
;
72 pub type LPSTR
= *mut CHAR
;
73 pub type LPWSTR
= *mut WCHAR
;
74 pub type LPFILETIME
= *mut FILETIME
;
76 pub type PCONDITION_VARIABLE
= *mut CONDITION_VARIABLE
;
77 pub type PLARGE_INTEGER
= *mut c_longlong
;
78 pub type PSRWLOCK
= *mut SRWLOCK
;
80 pub type SOCKET
= ::os
::windows
::raw
::SOCKET
;
81 pub type socklen_t
= c_int
;
82 pub type ADDRESS_FAMILY
= USHORT
;
84 pub const TRUE
: BOOL
= 1;
85 pub const FALSE
: BOOL
= 0;
87 pub const FILE_ATTRIBUTE_READONLY
: DWORD
= 0x1;
88 pub const FILE_ATTRIBUTE_DIRECTORY
: DWORD
= 0x10;
89 pub const FILE_ATTRIBUTE_REPARSE_POINT
: DWORD
= 0x400;
91 pub const FILE_SHARE_DELETE
: DWORD
= 0x4;
92 pub const FILE_SHARE_READ
: DWORD
= 0x1;
93 pub const FILE_SHARE_WRITE
: DWORD
= 0x2;
95 pub const CREATE_ALWAYS
: DWORD
= 2;
96 pub const CREATE_NEW
: DWORD
= 1;
97 pub const OPEN_ALWAYS
: DWORD
= 4;
98 pub const OPEN_EXISTING
: DWORD
= 3;
99 pub const TRUNCATE_EXISTING
: DWORD
= 5;
101 pub const FILE_WRITE_DATA
: DWORD
= 0x00000002;
102 pub const FILE_APPEND_DATA
: DWORD
= 0x00000004;
103 pub const FILE_WRITE_EA
: DWORD
= 0x00000010;
104 pub const FILE_WRITE_ATTRIBUTES
: DWORD
= 0x00000100;
105 pub const READ_CONTROL
: DWORD
= 0x00020000;
106 pub const SYNCHRONIZE
: DWORD
= 0x00100000;
107 pub const GENERIC_READ
: DWORD
= 0x80000000;
108 pub const GENERIC_WRITE
: DWORD
= 0x40000000;
109 pub const STANDARD_RIGHTS_WRITE
: DWORD
= READ_CONTROL
;
110 pub const FILE_GENERIC_WRITE
: DWORD
= STANDARD_RIGHTS_WRITE
| FILE_WRITE_DATA
|
111 FILE_WRITE_ATTRIBUTES
|
116 pub const FILE_FLAG_OPEN_REPARSE_POINT
: DWORD
= 0x00200000;
117 pub const FILE_FLAG_BACKUP_SEMANTICS
: DWORD
= 0x02000000;
118 pub const SECURITY_SQOS_PRESENT
: DWORD
= 0x00100000;
120 pub const FIONBIO
: c_ulong
= 0x8004667e;
124 pub struct WIN32_FIND_DATAW
{
125 pub dwFileAttributes
: DWORD
,
126 pub ftCreationTime
: FILETIME
,
127 pub ftLastAccessTime
: FILETIME
,
128 pub ftLastWriteTime
: FILETIME
,
129 pub nFileSizeHigh
: DWORD
,
130 pub nFileSizeLow
: DWORD
,
131 pub dwReserved0
: DWORD
,
132 pub dwReserved1
: DWORD
,
133 pub cFileName
: [wchar_t
; 260], // #define MAX_PATH 260
134 pub cAlternateFileName
: [wchar_t
; 14],
136 impl Clone
for WIN32_FIND_DATAW
{
137 fn clone(&self) -> Self { *self }
140 pub const WSA_FLAG_OVERLAPPED
: DWORD
= 0x01;
142 pub const WSADESCRIPTION_LEN
: usize = 256;
143 pub const WSASYS_STATUS_LEN
: usize = 128;
144 pub const WSAPROTOCOL_LEN
: DWORD
= 255;
145 pub const INVALID_SOCKET
: SOCKET
= !0;
147 pub const WSAEACCES
: c_int
= 10013;
148 pub const WSAEINVAL
: c_int
= 10022;
149 pub const WSAEWOULDBLOCK
: c_int
= 10035;
150 pub const WSAEADDRINUSE
: c_int
= 10048;
151 pub const WSAEADDRNOTAVAIL
: c_int
= 10049;
152 pub const WSAECONNABORTED
: c_int
= 10053;
153 pub const WSAECONNRESET
: c_int
= 10054;
154 pub const WSAENOTCONN
: c_int
= 10057;
155 pub const WSAESHUTDOWN
: c_int
= 10058;
156 pub const WSAETIMEDOUT
: c_int
= 10060;
157 pub const WSAECONNREFUSED
: c_int
= 10061;
159 pub const MAX_PROTOCOL_CHAIN
: DWORD
= 7;
161 pub const TOKEN_READ
: DWORD
= 0x20008;
162 pub const MAXIMUM_REPARSE_DATA_BUFFER_SIZE
: usize = 16 * 1024;
163 pub const FSCTL_GET_REPARSE_POINT
: DWORD
= 0x900a8;
164 pub const IO_REPARSE_TAG_SYMLINK
: DWORD
= 0xa000000c;
165 pub const IO_REPARSE_TAG_MOUNT_POINT
: DWORD
= 0xa0000003;
166 pub const SYMLINK_FLAG_RELATIVE
: DWORD
= 0x00000001;
167 pub const FSCTL_SET_REPARSE_POINT
: DWORD
= 0x900a4;
169 pub const SYMBOLIC_LINK_FLAG_DIRECTORY
: DWORD
= 0x1;
170 pub const SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE
: DWORD
= 0x2;
172 // Note that these are not actually HANDLEs, just values to pass to GetStdHandle
173 pub const STD_INPUT_HANDLE
: DWORD
= -10i32 as DWORD
;
174 pub const STD_OUTPUT_HANDLE
: DWORD
= -11i32 as DWORD
;
175 pub const STD_ERROR_HANDLE
: DWORD
= -12i32 as DWORD
;
177 pub const HANDLE_FLAG_INHERIT
: DWORD
= 0x00000001;
179 pub const PROGRESS_CONTINUE
: DWORD
= 0;
181 pub const ERROR_FILE_NOT_FOUND
: DWORD
= 2;
182 pub const ERROR_PATH_NOT_FOUND
: DWORD
= 3;
183 pub const ERROR_ACCESS_DENIED
: DWORD
= 5;
184 pub const ERROR_INVALID_HANDLE
: DWORD
= 6;
185 pub const ERROR_NO_MORE_FILES
: DWORD
= 18;
186 pub const ERROR_HANDLE_EOF
: DWORD
= 38;
187 pub const ERROR_FILE_EXISTS
: DWORD
= 80;
188 pub const ERROR_INVALID_PARAMETER
: DWORD
= 87;
189 pub const ERROR_BROKEN_PIPE
: DWORD
= 109;
190 pub const ERROR_CALL_NOT_IMPLEMENTED
: DWORD
= 120;
191 pub const ERROR_INSUFFICIENT_BUFFER
: DWORD
= 122;
192 pub const ERROR_ALREADY_EXISTS
: DWORD
= 183;
193 pub const ERROR_NO_DATA
: DWORD
= 232;
194 pub const ERROR_ENVVAR_NOT_FOUND
: DWORD
= 203;
195 pub const ERROR_OPERATION_ABORTED
: DWORD
= 995;
196 pub const ERROR_IO_PENDING
: DWORD
= 997;
197 pub const ERROR_TIMEOUT
: DWORD
= 0x5B4;
199 pub const INVALID_HANDLE_VALUE
: HANDLE
= !0 as HANDLE
;
201 pub const FORMAT_MESSAGE_FROM_SYSTEM
: DWORD
= 0x00001000;
202 pub const FORMAT_MESSAGE_IGNORE_INSERTS
: DWORD
= 0x00000200;
204 pub const TLS_OUT_OF_INDEXES
: DWORD
= 0xFFFFFFFF;
206 pub const DLL_THREAD_DETACH
: DWORD
= 3;
207 pub const DLL_PROCESS_DETACH
: DWORD
= 0;
209 pub const INFINITE
: DWORD
= !0;
211 pub const DUPLICATE_SAME_ACCESS
: DWORD
= 0x00000002;
213 pub const CONDITION_VARIABLE_INIT
: CONDITION_VARIABLE
= CONDITION_VARIABLE
{
214 ptr
: ptr
::null_mut(),
216 pub const SRWLOCK_INIT
: SRWLOCK
= SRWLOCK { ptr: ptr::null_mut() }
;
218 pub const DETACHED_PROCESS
: DWORD
= 0x00000008;
219 pub const CREATE_NEW_PROCESS_GROUP
: DWORD
= 0x00000200;
220 pub const CREATE_UNICODE_ENVIRONMENT
: DWORD
= 0x00000400;
221 pub const STARTF_USESTDHANDLES
: DWORD
= 0x00000100;
223 pub const AF_INET
: c_int
= 2;
224 pub const AF_INET6
: c_int
= 23;
225 pub const SD_BOTH
: c_int
= 2;
226 pub const SD_RECEIVE
: c_int
= 0;
227 pub const SD_SEND
: c_int
= 1;
228 pub const SOCK_DGRAM
: c_int
= 2;
229 pub const SOCK_STREAM
: c_int
= 1;
230 pub const SOL_SOCKET
: c_int
= 0xffff;
231 pub const SO_RCVTIMEO
: c_int
= 0x1006;
232 pub const SO_SNDTIMEO
: c_int
= 0x1005;
233 pub const SO_REUSEADDR
: c_int
= 0x0004;
234 pub const IPPROTO_IP
: c_int
= 0;
235 pub const IPPROTO_TCP
: c_int
= 6;
236 pub const IPPROTO_IPV6
: c_int
= 41;
237 pub const TCP_NODELAY
: c_int
= 0x0001;
238 pub const IP_TTL
: c_int
= 4;
239 pub const IPV6_V6ONLY
: c_int
= 27;
240 pub const SO_ERROR
: c_int
= 0x1007;
241 pub const SO_BROADCAST
: c_int
= 0x0020;
242 pub const IP_MULTICAST_LOOP
: c_int
= 11;
243 pub const IPV6_MULTICAST_LOOP
: c_int
= 11;
244 pub const IP_MULTICAST_TTL
: c_int
= 10;
245 pub const IP_ADD_MEMBERSHIP
: c_int
= 12;
246 pub const IP_DROP_MEMBERSHIP
: c_int
= 13;
247 pub const IPV6_ADD_MEMBERSHIP
: c_int
= 12;
248 pub const IPV6_DROP_MEMBERSHIP
: c_int
= 13;
249 pub const MSG_PEEK
: c_int
= 0x2;
253 pub imr_multiaddr
: in_addr
,
254 pub imr_interface
: in_addr
,
258 pub struct ipv6_mreq
{
259 pub ipv6mr_multiaddr
: in6_addr
,
260 pub ipv6mr_interface
: c_uint
,
263 pub const VOLUME_NAME_DOS
: DWORD
= 0x0;
264 pub const MOVEFILE_REPLACE_EXISTING
: DWORD
= 1;
266 pub const FILE_BEGIN
: DWORD
= 0;
267 pub const FILE_CURRENT
: DWORD
= 1;
268 pub const FILE_END
: DWORD
= 2;
270 pub const WAIT_OBJECT_0
: DWORD
= 0x00000000;
271 pub const WAIT_TIMEOUT
: DWORD
= 258;
273 #[cfg(target_env = "msvc")]
274 pub const MAX_SYM_NAME
: usize = 2000;
275 #[cfg(target_arch = "x86")]
276 pub const IMAGE_FILE_MACHINE_I386
: DWORD
= 0x014c;
277 #[cfg(target_arch = "x86_64")]
278 pub const IMAGE_FILE_MACHINE_AMD64
: DWORD
= 0x8664;
280 pub const PROV_RSA_FULL
: DWORD
= 1;
281 pub const CRYPT_SILENT
: DWORD
= 64;
282 pub const CRYPT_VERIFYCONTEXT
: DWORD
= 0xF0000000;
284 pub const EXCEPTION_CONTINUE_SEARCH
: LONG
= 0;
285 pub const EXCEPTION_STACK_OVERFLOW
: DWORD
= 0xc00000fd;
286 pub const EXCEPTION_MAXIMUM_PARAMETERS
: usize = 15;
288 pub const PIPE_ACCESS_INBOUND
: DWORD
= 0x00000001;
289 pub const PIPE_ACCESS_OUTBOUND
: DWORD
= 0x00000002;
290 pub const FILE_FLAG_FIRST_PIPE_INSTANCE
: DWORD
= 0x00080000;
291 pub const FILE_FLAG_OVERLAPPED
: DWORD
= 0x40000000;
292 pub const PIPE_WAIT
: DWORD
= 0x00000000;
293 pub const PIPE_TYPE_BYTE
: DWORD
= 0x00000000;
294 pub const PIPE_REJECT_REMOTE_CLIENTS
: DWORD
= 0x00000008;
295 pub const PIPE_READMODE_BYTE
: DWORD
= 0x00000000;
298 #[cfg(target_arch = "x86")]
301 pub wHighVersion
: WORD
,
302 pub szDescription
: [u8; WSADESCRIPTION_LEN
+ 1],
303 pub szSystemStatus
: [u8; WSASYS_STATUS_LEN
+ 1],
304 pub iMaxSockets
: u16,
306 pub lpVendorInfo
: *mut u8,
309 #[cfg(target_arch = "x86_64")]
312 pub wHighVersion
: WORD
,
313 pub iMaxSockets
: u16,
315 pub lpVendorInfo
: *mut u8,
316 pub szDescription
: [u8; WSADESCRIPTION_LEN
+ 1],
317 pub szSystemStatus
: [u8; WSASYS_STATUS_LEN
+ 1],
321 pub struct WSAPROTOCOL_INFO
{
322 pub dwServiceFlags1
: DWORD
,
323 pub dwServiceFlags2
: DWORD
,
324 pub dwServiceFlags3
: DWORD
,
325 pub dwServiceFlags4
: DWORD
,
326 pub dwProviderFlags
: DWORD
,
327 pub ProviderId
: GUID
,
328 pub dwCatalogEntryId
: DWORD
,
329 pub ProtocolChain
: WSAPROTOCOLCHAIN
,
331 pub iAddressFamily
: c_int
,
332 pub iMaxSockAddr
: c_int
,
333 pub iMinSockAddr
: c_int
,
334 pub iSocketType
: c_int
,
335 pub iProtocol
: c_int
,
336 pub iProtocolMaxOffset
: c_int
,
337 pub iNetworkByteOrder
: c_int
,
338 pub iSecurityScheme
: c_int
,
339 pub dwMessageSize
: DWORD
,
340 pub dwProviderReserved
: DWORD
,
341 pub szProtocol
: [u16; (WSAPROTOCOL_LEN
as usize) + 1],
345 #[derive(Copy, Clone)]
346 pub struct WIN32_FILE_ATTRIBUTE_DATA
{
347 pub dwFileAttributes
: DWORD
,
348 pub ftCreationTime
: FILETIME
,
349 pub ftLastAccessTime
: FILETIME
,
350 pub ftLastWriteTime
: FILETIME
,
351 pub nFileSizeHigh
: DWORD
,
352 pub nFileSizeLow
: DWORD
,
356 pub struct BY_HANDLE_FILE_INFORMATION
{
357 pub dwFileAttributes
: DWORD
,
358 pub ftCreationTime
: FILETIME
,
359 pub ftLastAccessTime
: FILETIME
,
360 pub ftLastWriteTime
: FILETIME
,
361 pub dwVolumeSerialNumber
: DWORD
,
362 pub nFileSizeHigh
: DWORD
,
363 pub nFileSizeLow
: DWORD
,
364 pub nNumberOfLinks
: DWORD
,
365 pub nFileIndexHigh
: DWORD
,
366 pub nFileIndexLow
: DWORD
,
370 #[allow(dead_code)] // we only use some variants
371 pub enum FILE_INFO_BY_HANDLE_CLASS
{
373 FileStandardInfo
= 1,
376 FileDispositionInfo
= 4,
377 FileAllocationInfo
= 5,
378 FileEndOfFileInfo
= 6,
380 FileCompressionInfo
= 8,
381 FileAttributeTagInfo
= 9,
382 FileIdBothDirectoryInfo
= 10, // 0xA
383 FileIdBothDirectoryRestartInfo
= 11, // 0xB
384 FileIoPriorityHintInfo
= 12, // 0xC
385 FileRemoteProtocolInfo
= 13, // 0xD
386 FileFullDirectoryInfo
= 14, // 0xE
387 FileFullDirectoryRestartInfo
= 15, // 0xF
388 FileStorageInfo
= 16, // 0x10
389 FileAlignmentInfo
= 17, // 0x11
390 FileIdInfo
= 18, // 0x12
391 FileIdExtdDirectoryInfo
= 19, // 0x13
392 FileIdExtdDirectoryRestartInfo
= 20, // 0x14
393 MaximumFileInfoByHandlesClass
397 pub struct FILE_BASIC_INFO
{
398 pub CreationTime
: LARGE_INTEGER
,
399 pub LastAccessTime
: LARGE_INTEGER
,
400 pub LastWriteTime
: LARGE_INTEGER
,
401 pub ChangeTime
: LARGE_INTEGER
,
402 pub FileAttributes
: DWORD
,
406 pub struct FILE_END_OF_FILE_INFO
{
407 pub EndOfFile
: LARGE_INTEGER
,
411 pub struct REPARSE_DATA_BUFFER
{
412 pub ReparseTag
: c_uint
,
413 pub ReparseDataLength
: c_ushort
,
414 pub Reserved
: c_ushort
,
419 pub struct SYMBOLIC_LINK_REPARSE_BUFFER
{
420 pub SubstituteNameOffset
: c_ushort
,
421 pub SubstituteNameLength
: c_ushort
,
422 pub PrintNameOffset
: c_ushort
,
423 pub PrintNameLength
: c_ushort
,
425 pub PathBuffer
: WCHAR
,
429 pub struct MOUNT_POINT_REPARSE_BUFFER
{
430 pub SubstituteNameOffset
: c_ushort
,
431 pub SubstituteNameLength
: c_ushort
,
432 pub PrintNameOffset
: c_ushort
,
433 pub PrintNameLength
: c_ushort
,
434 pub PathBuffer
: WCHAR
,
437 pub type LPPROGRESS_ROUTINE
= ::option
::Option
<unsafe extern "system" fn(
438 TotalFileSize
: LARGE_INTEGER
,
439 TotalBytesTransferred
: LARGE_INTEGER
,
440 StreamSize
: LARGE_INTEGER
,
441 StreamBytesTransferred
: LARGE_INTEGER
,
442 dwStreamNumber
: DWORD
,
443 dwCallbackReason
: DWORD
,
445 hDestinationFile
: HANDLE
,
450 pub struct CONDITION_VARIABLE { pub ptr: LPVOID }
452 pub struct SRWLOCK { pub ptr: LPVOID }
454 pub struct CRITICAL_SECTION
{
455 CriticalSectionDebug
: LPVOID
,
457 RecursionCount
: LONG
,
458 OwningThread
: HANDLE
,
459 LockSemaphore
: HANDLE
,
464 pub struct REPARSE_MOUNTPOINT_DATA_BUFFER
{
465 pub ReparseTag
: DWORD
,
466 pub ReparseDataLength
: DWORD
,
468 pub ReparseTargetLength
: WORD
,
469 pub ReparseTargetMaximumLength
: WORD
,
471 pub ReparseTarget
: WCHAR
,
475 pub struct EXCEPTION_RECORD
{
476 pub ExceptionCode
: DWORD
,
477 pub ExceptionFlags
: DWORD
,
478 pub ExceptionRecord
: *mut EXCEPTION_RECORD
,
479 pub ExceptionAddress
: LPVOID
,
480 pub NumberParameters
: DWORD
,
481 pub ExceptionInformation
: [LPVOID
; EXCEPTION_MAXIMUM_PARAMETERS
]
485 pub struct EXCEPTION_POINTERS
{
486 pub ExceptionRecord
: *mut EXCEPTION_RECORD
,
487 pub ContextRecord
: *mut CONTEXT
,
490 pub type PVECTORED_EXCEPTION_HANDLER
= extern "system"
491 fn(ExceptionInfo
: *mut EXCEPTION_POINTERS
) -> LONG
;
498 pub Data4
: [BYTE
; 8],
502 pub struct WSAPROTOCOLCHAIN
{
504 pub ChainEntries
: [DWORD
; MAX_PROTOCOL_CHAIN
as usize],
508 pub struct SECURITY_ATTRIBUTES
{
510 pub lpSecurityDescriptor
: LPVOID
,
511 pub bInheritHandle
: BOOL
,
515 pub struct PROCESS_INFORMATION
{
516 pub hProcess
: HANDLE
,
518 pub dwProcessId
: DWORD
,
519 pub dwThreadId
: DWORD
,
523 pub struct STARTUPINFO
{
525 pub lpReserved
: LPWSTR
,
526 pub lpDesktop
: LPWSTR
,
532 pub dwXCountChars
: DWORD
,
533 pub dwYCountCharts
: DWORD
,
534 pub dwFillAttribute
: DWORD
,
536 pub wShowWindow
: WORD
,
537 pub cbReserved2
: WORD
,
538 pub lpReserved2
: LPBYTE
,
539 pub hStdInput
: HANDLE
,
540 pub hStdOutput
: HANDLE
,
541 pub hStdError
: HANDLE
,
545 pub struct SOCKADDR
{
546 pub sa_family
: ADDRESS_FAMILY
,
547 pub sa_data
: [CHAR
; 14],
551 #[derive(Copy, Clone)]
552 pub struct FILETIME
{
553 pub dwLowDateTime
: DWORD
,
554 pub dwHighDateTime
: DWORD
,
558 pub struct OVERLAPPED
{
559 pub Internal
: *mut c_ulong
,
560 pub InternalHigh
: *mut c_ulong
,
562 pub OffsetHigh
: DWORD
,
567 #[cfg(target_env = "msvc")]
568 pub struct SYMBOL_INFO
{
569 pub SizeOfStruct
: c_ulong
,
570 pub TypeIndex
: c_ulong
,
571 pub Reserved
: [u64; 2],
578 pub Register
: c_ulong
,
581 pub NameLen
: c_ulong
,
582 pub MaxNameLen
: c_ulong
,
583 // note that windows has this as 1, but it basically just means that
584 // the name is inline at the end of the struct. For us, we just bump
585 // the struct size up to MAX_SYM_NAME.
586 pub Name
: [c_char
; MAX_SYM_NAME
],
590 #[cfg(target_env = "msvc")]
591 pub struct IMAGEHLP_LINE64
{
592 pub SizeOfStruct
: u32,
593 pub Key
: *const c_void
,
595 pub Filename
: *const c_char
,
600 #[allow(dead_code)] // we only use some variants
601 pub enum ADDRESS_MODE
{
609 pub struct ADDRESS64
{
612 pub Mode
: ADDRESS_MODE
,
616 pub struct STACKFRAME64
{
617 pub AddrPC
: ADDRESS64
,
618 pub AddrReturn
: ADDRESS64
,
619 pub AddrFrame
: ADDRESS64
,
620 pub AddrStack
: ADDRESS64
,
621 pub AddrBStore
: ADDRESS64
,
622 pub FuncTableEntry
: *mut c_void
,
623 pub Params
: [u64; 4],
626 pub Reserved
: [u64; 3],
627 pub KdHelp
: KDHELP64
,
631 pub struct KDHELP64
{
633 pub ThCallbackStack
: DWORD
,
634 pub ThCallbackBStore
: DWORD
,
635 pub NextCallback
: DWORD
,
636 pub FramePointer
: DWORD
,
637 pub KiCallUserMode
: u64,
638 pub KeUserCallbackDispatcher
: u64,
639 pub SystemRangeStart
: u64,
640 pub KiUserExceptionDispatcher
: u64,
643 pub Reserved
: [u64; 5],
646 #[cfg(target_arch = "x86")]
649 pub ContextFlags
: DWORD
,
656 pub FloatSave
: FLOATING_SAVE_AREA
,
673 pub ExtendedRegisters
: [u8; 512],
676 #[cfg(target_arch = "x86")]
678 pub struct FLOATING_SAVE_AREA
{
679 pub ControlWord
: DWORD
,
680 pub StatusWord
: DWORD
,
682 pub ErrorOffset
: DWORD
,
683 pub ErrorSelector
: DWORD
,
684 pub DataOffset
: DWORD
,
685 pub DataSelector
: DWORD
,
686 pub RegisterArea
: [u8; 80],
687 pub Cr0NpxState
: DWORD
,
690 #[cfg(target_arch = "x86_64")]
693 _align_hack
: [u64x2
; 0], // FIXME align on 16-byte
694 pub P1Home
: DWORDLONG
,
695 pub P2Home
: DWORDLONG
,
696 pub P3Home
: DWORDLONG
,
697 pub P4Home
: DWORDLONG
,
698 pub P5Home
: DWORDLONG
,
699 pub P6Home
: DWORDLONG
,
701 pub ContextFlags
: DWORD
,
738 pub FltSave
: FLOATING_SAVE_AREA
,
740 pub VectorRegister
: [M128A
; 26],
741 pub VectorControl
: DWORDLONG
,
743 pub DebugControl
: DWORDLONG
,
744 pub LastBranchToRip
: DWORDLONG
,
745 pub LastBranchFromRip
: DWORDLONG
,
746 pub LastExceptionToRip
: DWORDLONG
,
747 pub LastExceptionFromRip
: DWORDLONG
,
750 #[cfg(target_arch = "x86_64")]
753 _align_hack
: [u64x2
; 0], // FIXME align on 16-byte
754 pub Low
: c_ulonglong
,
758 #[cfg(target_arch = "x86_64")]
760 pub struct FLOATING_SAVE_AREA
{
761 _align_hack
: [u64x2
; 0], // FIXME align on 16-byte
762 _Dummy
: [u8; 512] // FIXME: Fill this out
766 pub struct SOCKADDR_STORAGE_LH
{
767 pub ss_family
: ADDRESS_FAMILY
,
768 pub __ss_pad1
: [CHAR
; 6],
770 pub __ss_pad2
: [CHAR
; 112],
774 pub struct ADDRINFOA
{
776 pub ai_family
: c_int
,
777 pub ai_socktype
: c_int
,
778 pub ai_protocol
: c_int
,
779 pub ai_addrlen
: size_t
,
780 pub ai_canonname
: *mut c_char
,
781 pub ai_addr
: *mut SOCKADDR
,
782 pub ai_next
: *mut ADDRINFOA
,
786 #[derive(Copy, Clone)]
787 pub struct sockaddr_in
{
788 pub sin_family
: ADDRESS_FAMILY
,
789 pub sin_port
: USHORT
,
790 pub sin_addr
: in_addr
,
791 pub sin_zero
: [CHAR
; 8],
795 #[derive(Copy, Clone)]
796 pub struct sockaddr_in6
{
797 pub sin6_family
: ADDRESS_FAMILY
,
798 pub sin6_port
: USHORT
,
799 pub sin6_flowinfo
: c_ulong
,
800 pub sin6_addr
: in6_addr
,
801 pub sin6_scope_id
: c_ulong
,
805 #[derive(Copy, Clone)]
811 #[derive(Copy, Clone)]
812 pub struct in6_addr
{
813 pub s6_addr
: [u8; 16],
817 #[derive(Copy, Clone)]
818 #[allow(dead_code)] // we only use some variants
819 pub enum EXCEPTION_DISPOSITION
{
820 ExceptionContinueExecution
,
821 ExceptionContinueSearch
,
822 ExceptionNestedException
,
823 ExceptionCollidedUnwind
827 #[derive(Copy, Clone)]
828 pub struct CONSOLE_READCONSOLE_CONTROL
{
830 pub nInitialChars
: ULONG
,
831 pub dwCtrlWakeupMask
: ULONG
,
832 pub dwControlKeyState
: ULONG
,
834 pub type PCONSOLE_READCONSOLE_CONTROL
= *mut CONSOLE_READCONSOLE_CONTROL
;
837 pub fn WSAStartup(wVersionRequested
: WORD
,
838 lpWSAData
: LPWSADATA
) -> c_int
;
839 pub fn WSACleanup() -> c_int
;
840 pub fn WSAGetLastError() -> c_int
;
841 pub fn WSADuplicateSocketW(s
: SOCKET
,
843 lpProtocolInfo
: LPWSAPROTOCOL_INFO
)
845 pub fn GetCurrentProcessId() -> DWORD
;
846 pub fn WSASocketW(af
: c_int
,
849 lpProtocolInfo
: LPWSAPROTOCOL_INFO
,
851 dwFlags
: DWORD
) -> SOCKET
;
852 pub fn ioctlsocket(s
: SOCKET
, cmd
: c_long
, argp
: *mut c_ulong
) -> c_int
;
853 pub fn InitializeCriticalSection(CriticalSection
: *mut CRITICAL_SECTION
);
854 pub fn EnterCriticalSection(CriticalSection
: *mut CRITICAL_SECTION
);
855 pub fn TryEnterCriticalSection(CriticalSection
: *mut CRITICAL_SECTION
) -> BOOLEAN
;
856 pub fn LeaveCriticalSection(CriticalSection
: *mut CRITICAL_SECTION
);
857 pub fn DeleteCriticalSection(CriticalSection
: *mut CRITICAL_SECTION
);
859 pub fn ReadConsoleW(hConsoleInput
: HANDLE
,
861 nNumberOfCharsToRead
: DWORD
,
862 lpNumberOfCharsRead
: LPDWORD
,
863 pInputControl
: PCONSOLE_READCONSOLE_CONTROL
) -> BOOL
;
865 pub fn WriteConsoleW(hConsoleOutput
: HANDLE
,
867 nNumberOfCharsToWrite
: DWORD
,
868 lpNumberOfCharsWritten
: LPDWORD
,
869 lpReserved
: LPVOID
) -> BOOL
;
871 pub fn GetConsoleMode(hConsoleHandle
: HANDLE
,
872 lpMode
: LPDWORD
) -> BOOL
;
873 pub fn RemoveDirectoryW(lpPathName
: LPCWSTR
) -> BOOL
;
874 pub fn SetFileAttributesW(lpFileName
: LPCWSTR
,
875 dwFileAttributes
: DWORD
) -> BOOL
;
876 pub fn GetFileInformationByHandle(hFile
: HANDLE
,
877 lpFileInformation
: LPBY_HANDLE_FILE_INFORMATION
)
880 pub fn SetLastError(dwErrCode
: DWORD
);
881 pub fn GetCommandLineW() -> *mut LPCWSTR
;
882 pub fn LocalFree(ptr
: *mut c_void
);
883 pub fn CommandLineToArgvW(lpCmdLine
: *mut LPCWSTR
,
884 pNumArgs
: *mut c_int
) -> *mut *mut u16;
885 pub fn GetTempPathW(nBufferLength
: DWORD
,
886 lpBuffer
: LPCWSTR
) -> DWORD
;
887 pub fn OpenProcessToken(ProcessHandle
: HANDLE
,
888 DesiredAccess
: DWORD
,
889 TokenHandle
: *mut HANDLE
) -> BOOL
;
890 pub fn GetCurrentProcess() -> HANDLE
;
891 pub fn GetCurrentThread() -> HANDLE
;
892 pub fn GetStdHandle(which
: DWORD
) -> HANDLE
;
893 pub fn ExitProcess(uExitCode
: c_uint
) -> !;
894 pub fn DeviceIoControl(hDevice
: HANDLE
,
895 dwIoControlCode
: DWORD
,
897 nInBufferSize
: DWORD
,
899 nOutBufferSize
: DWORD
,
900 lpBytesReturned
: LPDWORD
,
901 lpOverlapped
: LPOVERLAPPED
) -> BOOL
;
902 pub fn CreateThread(lpThreadAttributes
: LPSECURITY_ATTRIBUTES
,
904 lpStartAddress
: extern "system" fn(*mut c_void
)
907 dwCreationFlags
: DWORD
,
908 lpThreadId
: LPDWORD
) -> HANDLE
;
909 pub fn WaitForSingleObject(hHandle
: HANDLE
,
910 dwMilliseconds
: DWORD
) -> DWORD
;
911 pub fn SwitchToThread() -> BOOL
;
912 pub fn Sleep(dwMilliseconds
: DWORD
);
913 pub fn GetProcessId(handle
: HANDLE
) -> DWORD
;
914 pub fn GetUserProfileDirectoryW(hToken
: HANDLE
,
915 lpProfileDir
: LPWSTR
,
916 lpcchSize
: *mut DWORD
) -> BOOL
;
917 pub fn SetHandleInformation(hObject
: HANDLE
,
919 dwFlags
: DWORD
) -> BOOL
;
920 pub fn CopyFileExW(lpExistingFileName
: LPCWSTR
,
921 lpNewFileName
: LPCWSTR
,
922 lpProgressRoutine
: LPPROGRESS_ROUTINE
,
925 dwCopyFlags
: DWORD
) -> BOOL
;
926 pub fn AddVectoredExceptionHandler(FirstHandler
: ULONG
,
927 VectoredHandler
: PVECTORED_EXCEPTION_HANDLER
)
929 pub fn FormatMessageW(flags
: DWORD
,
937 pub fn TlsAlloc() -> DWORD
;
938 pub fn TlsFree(dwTlsIndex
: DWORD
) -> BOOL
;
939 pub fn TlsGetValue(dwTlsIndex
: DWORD
) -> LPVOID
;
940 pub fn TlsSetValue(dwTlsIndex
: DWORD
, lpTlsvalue
: LPVOID
) -> BOOL
;
941 pub fn GetLastError() -> DWORD
;
942 pub fn QueryPerformanceFrequency(lpFrequency
: *mut LARGE_INTEGER
) -> BOOL
;
943 pub fn QueryPerformanceCounter(lpPerformanceCount
: *mut LARGE_INTEGER
)
945 pub fn GetExitCodeProcess(hProcess
: HANDLE
, lpExitCode
: LPDWORD
) -> BOOL
;
946 pub fn TerminateProcess(hProcess
: HANDLE
, uExitCode
: UINT
) -> BOOL
;
947 pub fn CreateProcessW(lpApplicationName
: LPCWSTR
,
948 lpCommandLine
: LPWSTR
,
949 lpProcessAttributes
: LPSECURITY_ATTRIBUTES
,
950 lpThreadAttributes
: LPSECURITY_ATTRIBUTES
,
951 bInheritHandles
: BOOL
,
952 dwCreationFlags
: DWORD
,
953 lpEnvironment
: LPVOID
,
954 lpCurrentDirectory
: LPCWSTR
,
955 lpStartupInfo
: LPSTARTUPINFO
,
956 lpProcessInformation
: LPPROCESS_INFORMATION
)
958 pub fn GetEnvironmentVariableW(n
: LPCWSTR
, v
: LPWSTR
, nsize
: DWORD
) -> DWORD
;
959 pub fn SetEnvironmentVariableW(n
: LPCWSTR
, v
: LPCWSTR
) -> BOOL
;
960 pub fn GetEnvironmentStringsW() -> LPWCH
;
961 pub fn FreeEnvironmentStringsW(env_ptr
: LPWCH
) -> BOOL
;
962 pub fn GetModuleFileNameW(hModule
: HMODULE
,
966 pub fn CreateDirectoryW(lpPathName
: LPCWSTR
,
967 lpSecurityAttributes
: LPSECURITY_ATTRIBUTES
)
969 pub fn DeleteFileW(lpPathName
: LPCWSTR
) -> BOOL
;
970 pub fn GetCurrentDirectoryW(nBufferLength
: DWORD
, lpBuffer
: LPWSTR
) -> DWORD
;
971 pub fn SetCurrentDirectoryW(lpPathName
: LPCWSTR
) -> BOOL
;
972 pub fn WideCharToMultiByte(CodePage
: UINT
,
974 lpWideCharStr
: LPCWSTR
,
976 lpMultiByteStr
: LPSTR
,
978 lpDefaultChar
: LPCSTR
,
979 lpUsedDefaultChar
: LPBOOL
) -> c_int
;
981 pub fn closesocket(socket
: SOCKET
) -> c_int
;
982 pub fn recv(socket
: SOCKET
, buf
: *mut c_void
, len
: c_int
,
983 flags
: c_int
) -> c_int
;
984 pub fn send(socket
: SOCKET
, buf
: *const c_void
, len
: c_int
,
985 flags
: c_int
) -> c_int
;
986 pub fn recvfrom(socket
: SOCKET
,
993 pub fn sendto(socket
: SOCKET
,
997 addr
: *const SOCKADDR
,
1000 pub fn shutdown(socket
: SOCKET
, how
: c_int
) -> c_int
;
1001 pub fn accept(socket
: SOCKET
,
1002 address
: *mut SOCKADDR
,
1003 address_len
: *mut c_int
)
1005 pub fn DuplicateHandle(hSourceProcessHandle
: HANDLE
,
1006 hSourceHandle
: HANDLE
,
1007 hTargetProcessHandle
: HANDLE
,
1008 lpTargetHandle
: LPHANDLE
,
1009 dwDesiredAccess
: DWORD
,
1010 bInheritHandle
: BOOL
,
1013 pub fn ReadFile(hFile
: HANDLE
,
1015 nNumberOfBytesToRead
: DWORD
,
1016 lpNumberOfBytesRead
: LPDWORD
,
1017 lpOverlapped
: LPOVERLAPPED
)
1019 pub fn WriteFile(hFile
: HANDLE
,
1021 nNumberOfBytesToWrite
: DWORD
,
1022 lpNumberOfBytesWritten
: LPDWORD
,
1023 lpOverlapped
: LPOVERLAPPED
)
1025 pub fn CloseHandle(hObject
: HANDLE
) -> BOOL
;
1026 pub fn CreateHardLinkW(lpSymlinkFileName
: LPCWSTR
,
1027 lpTargetFileName
: LPCWSTR
,
1028 lpSecurityAttributes
: LPSECURITY_ATTRIBUTES
)
1030 pub fn MoveFileExW(lpExistingFileName
: LPCWSTR
,
1031 lpNewFileName
: LPCWSTR
,
1034 pub fn SetFilePointerEx(hFile
: HANDLE
,
1035 liDistanceToMove
: LARGE_INTEGER
,
1036 lpNewFilePointer
: PLARGE_INTEGER
,
1037 dwMoveMethod
: DWORD
)
1039 pub fn FlushFileBuffers(hFile
: HANDLE
) -> BOOL
;
1040 pub fn CreateFileW(lpFileName
: LPCWSTR
,
1041 dwDesiredAccess
: DWORD
,
1043 lpSecurityAttributes
: LPSECURITY_ATTRIBUTES
,
1044 dwCreationDisposition
: DWORD
,
1045 dwFlagsAndAttributes
: DWORD
,
1046 hTemplateFile
: HANDLE
)
1049 pub fn FindFirstFileW(fileName
: LPCWSTR
,
1050 findFileData
: LPWIN32_FIND_DATAW
)
1052 pub fn FindNextFileW(findFile
: HANDLE
, findFileData
: LPWIN32_FIND_DATAW
)
1054 pub fn FindClose(findFile
: HANDLE
) -> BOOL
;
1055 pub fn RtlCaptureContext(ctx
: *mut CONTEXT
);
1056 pub fn getsockopt(s
: SOCKET
,
1059 optval
: *mut c_char
,
1062 pub fn setsockopt(s
: SOCKET
,
1065 optval
: *const c_void
,
1068 pub fn getsockname(socket
: SOCKET
,
1069 address
: *mut SOCKADDR
,
1070 address_len
: *mut c_int
)
1072 pub fn getpeername(socket
: SOCKET
,
1073 address
: *mut SOCKADDR
,
1074 address_len
: *mut c_int
)
1076 pub fn bind(socket
: SOCKET
, address
: *const SOCKADDR
,
1077 address_len
: socklen_t
) -> c_int
;
1078 pub fn listen(socket
: SOCKET
, backlog
: c_int
) -> c_int
;
1079 pub fn connect(socket
: SOCKET
, address
: *const SOCKADDR
, len
: c_int
)
1081 pub fn getaddrinfo(node
: *const c_char
, service
: *const c_char
,
1082 hints
: *const ADDRINFOA
,
1083 res
: *mut *mut ADDRINFOA
) -> c_int
;
1084 pub fn freeaddrinfo(res
: *mut ADDRINFOA
);
1086 pub fn LoadLibraryW(name
: LPCWSTR
) -> HMODULE
;
1087 pub fn FreeLibrary(handle
: HMODULE
) -> BOOL
;
1088 pub fn GetProcAddress(handle
: HMODULE
,
1089 name
: LPCSTR
) -> *mut c_void
;
1090 pub fn GetModuleHandleW(lpModuleName
: LPCWSTR
) -> HMODULE
;
1091 pub fn CryptAcquireContextA(phProv
: *mut HCRYPTPROV
,
1092 pszContainer
: LPCSTR
,
1093 pszProvider
: LPCSTR
,
1095 dwFlags
: DWORD
) -> BOOL
;
1096 pub fn CryptGenRandom(hProv
: HCRYPTPROV
,
1098 pbBuffer
: *mut BYTE
) -> BOOL
;
1099 pub fn CryptReleaseContext(hProv
: HCRYPTPROV
, dwFlags
: DWORD
) -> BOOL
;
1101 pub fn GetSystemTimeAsFileTime(lpSystemTimeAsFileTime
: LPFILETIME
);
1103 pub fn CreateEventW(lpEventAttributes
: LPSECURITY_ATTRIBUTES
,
1105 bInitialState
: BOOL
,
1106 lpName
: LPCWSTR
) -> HANDLE
;
1107 pub fn WaitForMultipleObjects(nCount
: DWORD
,
1108 lpHandles
: *const HANDLE
,
1110 dwMilliseconds
: DWORD
) -> DWORD
;
1111 pub fn CreateNamedPipeW(lpName
: LPCWSTR
,
1114 nMaxInstances
: DWORD
,
1115 nOutBufferSize
: DWORD
,
1116 nInBufferSize
: DWORD
,
1117 nDefaultTimeOut
: DWORD
,
1118 lpSecurityAttributes
: LPSECURITY_ATTRIBUTES
)
1120 pub fn CancelIo(handle
: HANDLE
) -> BOOL
;
1121 pub fn GetOverlappedResult(hFile
: HANDLE
,
1122 lpOverlapped
: LPOVERLAPPED
,
1123 lpNumberOfBytesTransferred
: LPDWORD
,
1124 bWait
: BOOL
) -> BOOL
;
1127 // Functions that aren't available on Windows XP, but we still use them and just
1128 // provide some form of a fallback implementation.
1132 pub fn CreateSymbolicLinkW(_lpSymlinkFileName
: LPCWSTR
,
1133 _lpTargetFileName
: LPCWSTR
,
1134 _dwFlags
: DWORD
) -> BOOLEAN
{
1135 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
as DWORD
); 0
1137 pub fn GetFinalPathNameByHandleW(_hFile
: HANDLE
,
1138 _lpszFilePath
: LPCWSTR
,
1139 _cchFilePath
: DWORD
,
1140 _dwFlags
: DWORD
) -> DWORD
{
1141 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
as DWORD
); 0
1143 pub fn SetThreadStackGuarantee(_size
: *mut c_ulong
) -> BOOL
{
1144 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
as DWORD
); 0
1146 pub fn SetFileInformationByHandle(_hFile
: HANDLE
,
1147 _FileInformationClass
: FILE_INFO_BY_HANDLE_CLASS
,
1148 _lpFileInformation
: LPVOID
,
1149 _dwBufferSize
: DWORD
) -> BOOL
{
1150 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
as DWORD
); 0
1152 pub fn SleepConditionVariableSRW(ConditionVariable
: PCONDITION_VARIABLE
,
1154 dwMilliseconds
: DWORD
,
1155 Flags
: ULONG
) -> BOOL
{
1156 panic
!("condition variables not available")
1158 pub fn WakeConditionVariable(ConditionVariable
: PCONDITION_VARIABLE
)
1160 panic
!("condition variables not available")
1162 pub fn WakeAllConditionVariable(ConditionVariable
: PCONDITION_VARIABLE
)
1164 panic
!("condition variables not available")
1166 pub fn AcquireSRWLockExclusive(SRWLock
: PSRWLOCK
) -> () {
1167 panic
!("rwlocks not available")
1169 pub fn AcquireSRWLockShared(SRWLock
: PSRWLOCK
) -> () {
1170 panic
!("rwlocks not available")
1172 pub fn ReleaseSRWLockExclusive(SRWLock
: PSRWLOCK
) -> () {
1173 panic
!("rwlocks not available")
1175 pub fn ReleaseSRWLockShared(SRWLock
: PSRWLOCK
) -> () {
1176 panic
!("rwlocks not available")
1178 pub fn TryAcquireSRWLockExclusive(SRWLock
: PSRWLOCK
) -> BOOLEAN
{
1179 panic
!("rwlocks not available")
1181 pub fn TryAcquireSRWLockShared(SRWLock
: PSRWLOCK
) -> BOOLEAN
{
1182 panic
!("rwlocks not available")
1186 #[cfg(target_env = "gnu")]
1190 pub const PROCESS_QUERY_INFORMATION
: DWORD
= 0x0400;
1192 pub const CP_ACP
: UINT
= 0;
1194 pub const WC_NO_BEST_FIT_CHARS
: DWORD
= 0x00000400;
1197 pub fn OpenProcess(dwDesiredAccess
: DWORD
,
1198 bInheritHandle
: BOOL
,
1199 dwProcessId
: DWORD
) -> HANDLE
;
1205 pub fn QueryFullProcessImageNameW(_hProcess
: HANDLE
,
1208 _lpdwSize
: LPDWORD
) -> BOOL
{
1209 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
as DWORD
); 0
1214 #[cfg(target_env = "gnu")]
1215 pub use self::gnu
::*;