diff options
| author | kennytm <kennytm@gmail.com> | 2017-08-11 09:01:46 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2017-08-12 12:07:39 +0800 |
| commit | 3093bb85f94e6f3c4707674c8b70c28ecfbf3bf9 (patch) | |
| tree | ed40a3113cb2b64fd0796802af64c8ef661b6b6d /src/libstd/sys/windows | |
| parent | b4114ebe3a19d7d9bdacf700cc67bd2709eafe5b (diff) | |
| download | rust-3093bb85f94e6f3c4707674c8b70c28ecfbf3bf9.tar.gz rust-3093bb85f94e6f3c4707674c8b70c28ecfbf3bf9.zip | |
Fix error during cross-platform documentation.
Diffstat (limited to 'src/libstd/sys/windows')
| -rw-r--r-- | src/libstd/sys/windows/c.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs index 4785cefd6b4..ba54ca6ea18 100644 --- a/src/libstd/sys/windows/c.rs +++ b/src/libstd/sys/windows/c.rs @@ -301,7 +301,7 @@ pub const PIPE_READMODE_BYTE: DWORD = 0x00000000; pub const FD_SETSIZE: usize = 64; #[repr(C)] -#[cfg(target_arch = "x86")] +#[cfg(not(target_pointer_width = "64"))] pub struct WSADATA { pub wVersion: WORD, pub wHighVersion: WORD, @@ -312,7 +312,7 @@ pub struct WSADATA { pub lpVendorInfo: *mut u8, } #[repr(C)] -#[cfg(target_arch = "x86_64")] +#[cfg(target_pointer_width = "64")] pub struct WSADATA { pub wVersion: WORD, pub wHighVersion: WORD, @@ -768,6 +768,14 @@ pub struct FLOATING_SAVE_AREA { _Dummy: [u8; 512] // FIXME: Fill this out } +// FIXME(#43348): This structure is used for backtrace only, and a fake +// definition is provided here only to allow rustdoc to pass type-check. This +// will not appear in the final documentation. This should be also defined for +// other architectures supported by Windows such as ARM, and for historical +// interest, maybe MIPS and PowerPC as well. +#[cfg(all(dox, not(any(target_arch = "x86_64", target_arch = "x86"))))] +pub enum CONTEXT {} + #[repr(C)] pub struct SOCKADDR_STORAGE_LH { pub ss_family: ADDRESS_FAMILY, |
