diff options
| author | klutzy <klutzytheklutzy@gmail.com> | 2013-08-12 15:27:46 +0900 |
|---|---|---|
| committer | klutzy <klutzytheklutzy@gmail.com> | 2013-08-26 22:15:45 +0900 |
| commit | 05b6a2f59c8efa0605db3f5d8f5ef554cb35ff74 (patch) | |
| tree | bee06074fc13f9987282722381c8c241b38ba377 /src/libstd/rt | |
| parent | 6aff4c67f607a38bc4d95e132fe40563e7422beb (diff) | |
| download | rust-05b6a2f59c8efa0605db3f5d8f5ef554cb35ff74.tar.gz rust-05b6a2f59c8efa0605db3f5d8f5ef554cb35ff74.zip | |
std: Add Win64 support
Some extern blobs are duplicated without "stdcall" abi, since Win64 does not use any calling convention. (Giving any abi to them causes llvm producing wrong bytecode.)
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/thread_local_storage.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libstd/rt/thread_local_storage.rs b/src/libstd/rt/thread_local_storage.rs index a9cd29c18c9..b2c2c670b55 100644 --- a/src/libstd/rt/thread_local_storage.rs +++ b/src/libstd/rt/thread_local_storage.rs @@ -86,7 +86,7 @@ pub unsafe fn get(key: Key) -> *mut c_void { TlsGetValue(key) } -#[cfg(windows)] +#[cfg(windows, target_arch = "x86")] #[abi = "stdcall"] extern "stdcall" { fn TlsAlloc() -> DWORD; @@ -94,6 +94,13 @@ extern "stdcall" { fn TlsGetValue(dwTlsIndex: DWORD) -> LPVOID; } +#[cfg(windows, target_arch = "x86_64")] +extern { + fn TlsAlloc() -> DWORD; + fn TlsSetValue(dwTlsIndex: DWORD, lpTlsvalue: LPVOID) -> BOOL; + fn TlsGetValue(dwTlsIndex: DWORD) -> LPVOID; +} + #[test] fn tls_smoke_test() { use cast::transmute; |
