Showing with 1,897 additions and 9,619 deletions.
  1. +3 −0 .gitmodules
  2. +3 −0 mk/crates.mk
  3. +2 −1 mk/tests.mk
  4. +2 −1 src/etc/tidy.py
  5. +1 −0 src/liballoc_jemalloc/lib.rs
  6. +8 −1 src/liballoc_system/lib.rs
  7. +1 −0 src/libflate/lib.rs
  8. +1 −0 src/liblibc
  9. +0 −7,184 src/liblibc/lib.rs
  10. +14 −9 src/librustc/util/common.rs
  11. +2 −0 src/librustc_llvm/lib.rs
  12. +9 −2 src/librustc_trans/back/msvc/registry.rs
  13. +29 −51 src/librustdoc/flock.rs
  14. +22 −42 src/libstd/dynamic_lib.rs
  15. +2 −3 src/libstd/io/stdio.rs
  16. +16 −14 src/libstd/lib.rs
  17. +17 −17 src/libstd/net/addr.rs
  18. +36 −28 src/libstd/net/ip.rs
  19. +8 −29 src/libstd/rand/os.rs
  20. +1 −1 src/libstd/sync/condvar.rs
  21. +63 −86 src/libstd/sys/common/net.rs
  22. +6 −37 src/libstd/sys/common/unwind/seh.rs
  23. +34 −106 src/libstd/sys/common/unwind/seh64_gnu.rs
  24. +0 −452 src/libstd/sys/unix/c.rs
  25. +10 −11 src/libstd/sys/unix/condvar.rs
  26. +3 −4 src/libstd/sys/unix/fd.rs
  27. +9 −9 src/libstd/sys/unix/fs.rs
  28. +2 −4 src/libstd/sys/unix/mod.rs
  29. +21 −21 src/libstd/sys/unix/mutex.rs
  30. +42 −17 src/libstd/sys/unix/net.rs
  31. +12 −10 src/libstd/sys/unix/os.rs
  32. +22 −23 src/libstd/sys/unix/process.rs
  33. +9 −10 src/libstd/sys/unix/rwlock.rs
  34. +23 −7 src/libstd/sys/unix/stack_overflow.rs
  35. +0 −374 src/libstd/sys/unix/sync.rs
  36. +38 −105 src/libstd/sys/unix/thread.rs
  37. +8 −37 src/libstd/sys/unix/thread_local.rs
  38. +4 −13 src/libstd/sys/unix/time.rs
  39. +42 −255 src/libstd/sys/windows/backtrace.rs
  40. +1,000 −287 src/libstd/sys/windows/c.rs
  41. +3 −8 src/libstd/sys/windows/compat.rs
  42. +2 −4 src/libstd/sys/windows/condvar.rs
  43. +2 −1 src/libstd/sys/windows/ext/io.rs
  44. +80 −83 src/libstd/sys/windows/fs.rs
  45. +17 −18 src/libstd/sys/windows/handle.rs
  46. +31 −30 src/libstd/sys/windows/mod.rs
  47. +45 −27 src/libstd/sys/windows/net.rs
  48. +31 −54 src/libstd/sys/windows/os.rs
  49. +3 −4 src/libstd/sys/windows/pipe.rs
  50. +5 −4 src/libstd/sys/windows/printing/gnu.rs
  51. +18 −17 src/libstd/sys/windows/printing/msvc.rs
  52. +31 −37 src/libstd/sys/windows/process.rs
  53. +2 −3 src/libstd/sys/windows/stack_overflow.rs
  54. +5 −6 src/libstd/sys/windows/stdio.rs
  55. +4 −5 src/libstd/sys/windows/thread.rs
  56. +16 −27 src/libstd/sys/windows/thread_local.rs
  57. +8 −7 src/libstd/sys/windows/time.rs
  58. +8 −5 src/libsyntax/diagnostic.rs
  59. +13 −8 src/libterm/win.rs
  60. +26 −5 src/libtest/lib.rs
  61. +6 −5 src/test/run-pass/issue-13259-windows-tcb-trash.rs
  62. +7 −3 src/test/run-pass/rfc-1014-2.rs
  63. +8 −4 src/test/run-pass/rfc-1014.rs
  64. +1 −3 src/test/run-pass/wait-forked-but-failed-child.rs
@@ -14,3 +14,6 @@
[submodule "src/rust-installer"]
path = src/rust-installer
url = https://github.com/rust-lang/rust-installer
[submodule "src/liblibc"]
path = src/liblibc
url = https://github.com/rust-lang/libc
@@ -174,3 +174,6 @@ $(foreach crate,$(TOOLS),$(eval $(call RUST_TOOL,$(crate))))
ifdef CFG_DISABLE_ELF_TLS
RUSTFLAGS_std := --cfg no_elf_tls
endif

CRATEFILE_libc := $(SREL)src/liblibc/src/lib.rs
RUSTFLAGS_libc := --cfg stdbuild
@@ -22,7 +22,7 @@ $(eval $(call RUST_CRATE,coretest))
DEPS_collectionstest :=
$(eval $(call RUST_CRATE,collectionstest))

TEST_TARGET_CRATES = $(filter-out core rustc_unicode alloc_system \
TEST_TARGET_CRATES = $(filter-out core rustc_unicode alloc_system libc \
alloc_jemalloc,$(TARGET_CRATES)) \
collectionstest coretest
TEST_DOC_CRATES = $(DOC_CRATES)
@@ -283,6 +283,7 @@ tidy-binaries:
| grep '^$(S)src/compiler-rt' -v \
| grep '^$(S)src/libbacktrace' -v \
| grep '^$(S)src/rust-installer' -v \
| grep '^$(S)src/liblibc' -v \
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py

.PHONY: tidy-errors
@@ -108,7 +108,8 @@ def interesting_file(f):
'src/rustllvm',
'src/rt/valgrind',
'src/rt/msvc',
'src/rust-installer'
'src/rust-installer',
'src/liblibc',
}

if any(d in dirpath for d in skippable_dirs):
@@ -14,6 +14,7 @@
#![staged_api]
#![no_std]
#![cfg_attr(not(stage0), allocator)]
#![cfg_attr(stage0, allow(improper_ctypes))]
#![unstable(feature = "alloc_jemalloc",
reason = "this library is unlikely to be stabilized in its current \
form or name",
@@ -14,6 +14,7 @@
#![staged_api]
#![no_std]
#![cfg_attr(not(stage0), allocator)]
#![cfg_attr(stage0, allow(improper_ctypes))]
#![unstable(feature = "alloc_system",
reason = "this library is unlikely to be stabilized in its current \
form or name",
@@ -141,10 +142,16 @@ mod imp {
}

#[cfg(windows)]
#[allow(bad_style)]
mod imp {
use libc::{BOOL, DWORD, HANDLE, LPVOID, SIZE_T};
use MIN_ALIGN;

type LPVOID = *mut u8;
type HANDLE = LPVOID;
type SIZE_T = usize;
type DWORD = u32;
type BOOL = i32;

extern "system" {
fn GetProcessHeap() -> HANDLE;
fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID;
@@ -29,6 +29,7 @@
#![feature(staged_api)]
#![feature(unique)]
#![cfg_attr(test, feature(rustc_private, rand, vec_push_all))]
#![cfg_attr(stage0, allow(improper_ctypes))]

#[cfg(test)]
#[macro_use]
Submodule liblibc added at 5f9811