Jeremy Soller
74dc845c2d
Merge branch 'master' into redox
2016-11-03 08:52:48 -06:00
Brian Anderson
ee71dc5476
Document sys_common and sys
2016-11-01 17:08:24 +00:00
Brian Anderson
ca30691813
std: Move sys_common to libstd/sys_common
...
Make the directory structure reflect the module structure. I've always
found the existing structure confusing.
2016-11-01 17:08:24 +00:00
Brian Anderson
f3a709dc52
std: Move platform-specific out of sys_common::util
2016-11-01 17:08:24 +00:00
Brian Anderson
219c018894
std: Move platform-specific code out of libstd/lib.rs
2016-11-01 17:08:24 +00:00
Brian Anderson
6d54cd4b2c
std: Move a plattform-specific constant to sys::stdio
2016-11-01 17:08:24 +00:00
Brian Anderson
568840707c
std: Move elf TLS to sys::fast_thread_local
2016-11-01 17:08:24 +00:00
Jeremy Soller
123d08b3d3
Merge branch 'master' of https://github.com/rust-lang/rust into redox
2016-10-31 09:40:24 -06:00
Jeremy Soller
c77979b419
Fix for thread locals
2016-10-30 18:35:19 -06:00
Jeremy Soller
4edcddfb61
Implement TLS scoped keys, compiler builtins
2016-10-30 16:14:47 -06:00
Jeremy Soller
37bfef023d
Implement thread
2016-10-30 09:36:04 -06:00
Jeremy Soller
ea6f5aa1b1
Implement rand and args, cleanup other modules
2016-10-29 21:46:49 -06:00
Jeremy Soller
b1b35dd1f2
Implement env, reentrant mutex, and partially implement scoped thread locals. Better error messages for unsupported features
2016-10-29 21:15:32 -06:00
bors
17e9d9ae82
Auto merge of #37385 - raphlinus:fuchsia_random, r=alexcrichton
...
Add support for kernel randomness for Fuchsia
Wire up cprng syscall as provider for rand::os::OsRng on Fuchsia.
2016-10-28 21:31:26 -07:00
Jeremy Soller
a5de9bb591
Remove unsafe libc layer
2016-10-28 14:17:34 -06:00
Jeremy Soller
8b09e01fef
Add redox system
2016-10-27 20:57:49 -06:00
Raph Levien
592d7bfb3a
Add support for kernel randomness for Fuchsia
...
Wire up cprng syscall as provider for rand::os::OsRng on Fuchsia.
2016-10-24 16:48:45 -07:00
Raph Levien
69d7884a1d
Fix tidy warning
...
Prefer FIXME to TODO
2016-10-22 07:08:07 -07:00
Raph Levien
773a5f59e9
Fix missing DirEntryExt::ino
...
The DirEntryExt::ino() implementation was omitted from the first
iteration of this patch, because a dependency needed to be
configured. The fix is straightforward enough.
2016-10-22 07:08:07 -07:00
Raph Levien
76bac5d33e
Add Fuchsia support
...
Adds support for the x86_64-unknown-fuchsia target, which covers the
Fuchsia operating system.
2016-10-22 07:08:06 -07:00
David Henningsson
e4ed345b2c
impl Debug for ReadDir
...
It is good practice to implement Debug for public types, and
indicating what directory you're reading seems useful.
Signed-off-by: David Henningsson <diwic@ubuntu.com>
2016-10-16 20:42:55 +02:00
bors
e1b67776db
Auto merge of #35704 - tbu-:pr_pread_pwrite, r=alexcrichton
...
Implement `read_offset` and `write_offset`
These functions allow to read from and write to a file from multiple
threads without changing the per-file cursor, avoiding the race between
the seek and the read.
2016-10-14 19:33:04 -07:00
Tobias Bucher
15549935f8
Android: Fix unused-imports warning
2016-10-14 23:02:47 +02:00
Tobias Bucher
94aa08b66c
Only use Android fallback for {ftruncate,pread,pwrite} on 32 bit
2016-10-14 14:19:41 +02:00
Alex Crichton
9d70ff384f
Rollup merge of #36995 - nrc:stable, r=@nikomatsakis
...
stabilise ?, attributes on stmts, deprecate Reflect
r? @nikomatsakis
2016-10-12 14:07:55 -07:00
Tobias Bucher
744aecf793
Remove unnecessary unsafe block
2016-10-12 13:06:55 +02:00
Nick Cameron
14c62f91b7
Deprecate Reflect
...
[tracking issue](https://github.com/rust-lang/rust/issues/27749 )
2016-10-12 08:40:22 +13:00
Tobias Bucher
2eda01ee43
Fix Android compilation io::Error -> io::ErrorKind
2016-10-11 12:16:35 +02:00
Mathieu Poumeyrol
14f9cbdfd5
use MSG_NOSIGNAL on all relevant platforms
2016-10-09 13:01:29 +02:00
Tobias Bucher
70dcfd634e
Use try_into and move some functions
2016-10-09 10:49:05 +02:00
Tobias Bucher
f352f0eec0
Dynamically detect presence of p{read,write}64 on Android
2016-10-09 10:48:07 +02:00
Tobias Bucher
b3f2644b66
Implement reading and writing atomically at certain offsets
...
These functions allow to read from and write to a file in one atomic
action from multiple threads, avoiding the race between the seek and the
read.
The functions are named `{read,write}_at` on non-Windows (which don't
change the file cursor), and `seek_{read,write}` on Windows (which
change the file cursor).
2016-10-09 10:48:07 +02:00
Tobias Bucher
717d2ddca7
Use less size_t casts in libstd since it's now defined as usize
2016-10-08 15:48:28 +02:00
Jonathan Turner
0698929563
Rollup merge of #36965 - kallisti5:master, r=alexcrichton
...
Haiku: Fix IPv6 target_os check
2016-10-06 08:35:43 -07:00
bors
3210fd5c20
Auto merge of #36944 - brson:modos, r=alexcrichton
...
Fix mod declarations on untested platforms
r? @alexcrichton
2016-10-05 09:14:02 -07:00
Alexander von Gluck IV
4922abfbd2
Haiku: Fix IPv6 target_os check
2016-10-04 15:41:26 -05:00
Manish Goregaokar
d25aeb0ef1
Rollup merge of #36902 - ollie27:stab_impls, r=alexcrichton
...
std: Correct stability attributes for some implementations
These are displayed by rustdoc so should be correct.
2016-10-04 15:24:02 +05:30
Brian Anderson
2e7f796e58
Fix mod declarations on untested platforms
2016-10-03 22:29:03 +00:00
Brian Anderson
4d76ac8492
Move platform-specific arg handling to sys::args
2016-10-02 14:52:30 -07:00
Brian Anderson
29e0235415
Add a platform-abstraction tidy script
...
This is intended to maintain existing standards of code organization
in hopes that the standard library will continue to be refactored to
isolate platform-specific bits, making porting easier; where "standard
library" roughly means "all the dependencies of the std and test
crates".
This generally means placing restrictions on where `cfg(unix)`,
`cfg(windows)`, `cfg(target_os)` and `cfg(target_env)` may appear,
the basic objective being to isolate platform-specific code to the
platform-specific `std::sys` modules, and to the allocation,
unwinding, and libc crates.
Following are the basic rules, though there are currently
exceptions:
- core may not have platform-specific code
- liballoc_system may have platform-specific code
- liballoc_jemalloc may have platform-specific code
- libpanic_abort may have platform-specific code
- libpanic_unwind may have platform-specific code
- other crates in the std facade may not
- std may have platform-specific code in the following places
- sys/unix/
- sys/windows/
- os/
There are plenty of exceptions today though, noted in the whitelist.
2016-10-02 14:52:15 -07:00
Oliver Middleton
06a7dcd355
std: Correct stability attributes for some implementations
...
These are displayed by rustdoc so should be correct.
2016-10-01 23:58:14 +01:00
Brian Anderson
d311079a6f
std: Move platform specific stdio code into sys
2016-10-01 19:33:02 +00:00
Brian Anderson
fea1bd4cdf
std: Move platform specific memchr code into sys
2016-10-01 19:33:02 +00:00
Brian Anderson
5c21562302
std: Move platform specific env code into sys
2016-10-01 19:32:59 +00:00
Brian Anderson
e6457bb676
std: Move platform specific path code into sys
2016-10-01 19:28:17 +00:00
bors
5045d4e396
Auto merge of #36824 - kali:master, r=alexcrichton
...
SO_NOSIGPIPE and MSG_NOSIGNAL (rebased #36426 )
I'm not sure what happened when I pushed a rebased branch on #36426 , github closed it...
2016-10-01 01:19:47 -07:00
Brian Anderson
d997a6291f
Call emcc with ERROR_ON_UNDEFINED_SYMBOLS
2016-09-30 14:02:57 -07:00
Brian Anderson
096670ca41
Ignore various entire test modules on emscripten
2016-09-30 14:02:56 -07:00
Brian Anderson
9c4a01ee9e
Ignore lots and lots of std tests on emscripten
2016-09-30 14:02:48 -07:00
Mathieu Poumeyrol
5980d5bfdd
use MSG_NOSIGNAL from liblibc
2016-09-28 19:44:20 +02:00