Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upstd: Remove rust_builtin C support library #30175
Conversation
rust-highfive
assigned
aturon
Dec 2, 2015
This comment has been minimized.
This comment has been minimized.
|
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
rust-highfive
assigned
brson
and unassigned
aturon
Dec 2, 2015
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton Can you link me to the libc changes this pulls in? I'm curious what was involved. |
This comment has been minimized.
This comment has been minimized.
|
So far (although this is likely to grow to be a longer list) it required 2 changes: (the latter of which I now realize still needs to land...) |
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
force-pushed the
alexcrichton:less-c-code
branch
from
a60b4ab
to
b40f355
Dec 3, 2015
cuviper
referenced this pull request
Dec 3, 2015
Closed
fs::metadata - Value too large for defined data type #30050
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton thanks to Cc me. currently, it breaks at least openbsd. I have manually applied the patch (so I could also had done mistakes).
I can't check deeper today, but I will take a look tomorrow. |
This comment has been minimized.
This comment has been minimized.
|
Thanks @semarie! I've added the imports for |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton I think I would like the source to explicitly separate the cases where the cast is needed there, via cfg with a FIXME - it seems like it must be a bug right? |
This comment has been minimized.
This comment has been minimized.
|
It's a bad thing if these functions ever truncate values for I think we should either fake the |
alexcrichton
force-pushed the
alexcrichton:less-c-code
branch
from
9bc397c
to
977d0bd
Dec 3, 2015
This comment has been minimized.
This comment has been minimized.
|
I've pushed a commit to remove the cast, and I just started updating the That's a little controversial to me, however, as the types in |
alexcrichton
added
the
T-libs
label
Dec 3, 2015
This comment has been minimized.
This comment has been minimized.
|
And to make my concerns a little more concrete, here's what I'm thinking:
Overall I would propose a plan that looks like:
This will separate us from the C names as well as how they may change depending on how C code is compiled, and it means that we are no longer providing types that are "FFI compatible" as it doesn't always work out. For now we can probably leave the basic integer definitions (e.g. |
alexcrichton
force-pushed the
alexcrichton:less-c-code
branch
from
977d0bd
to
408d523
Dec 3, 2015
This comment has been minimized.
This comment has been minimized.
|
Keeping fundamental C types ( |
alexcrichton
force-pushed the
alexcrichton:less-c-code
branch
from
408d523
to
b7b2fae
Dec 16, 2015
This comment has been minimized.
This comment has been minimized.
|
re-r? @brson I'd like to move forward on this rather than wait for dealing with questions about other types in play here. Along those lines this patch now preserves the same behavior we have today. |
alexcrichton
removed
the
T-libs
label
Dec 16, 2015
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
force-pushed the
alexcrichton:less-c-code
branch
from
b7b2fae
to
33d0292
Dec 17, 2015
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
force-pushed the
alexcrichton:less-c-code
branch
from
33d0292
to
87f5ee1
Dec 19, 2015
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
force-pushed the
alexcrichton:less-c-code
branch
from
87f5ee1
to
a8cb016
Dec 20, 2015
This comment has been minimized.
This comment has been minimized.
|
r=me |
bors
added a commit
that referenced
this pull request
Dec 22, 2015
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Dec 22, 2015
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
force-pushed the
alexcrichton:less-c-code
branch
from
606369f
to
b1e0f1a
Dec 22, 2015
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Dec 22, 2015
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
force-pushed the
alexcrichton:less-c-code
branch
from
b1e0f1a
to
2f42ac4
Dec 22, 2015
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Dec 22, 2015
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
merged commit 2f42ac4
into
rust-lang:master
Dec 22, 2015
alexcrichton
deleted the
alexcrichton:less-c-code
branch
Dec 22, 2015
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this pull request
Dec 22, 2015
alexcrichton
referenced this pull request
Dec 22, 2015
Merged
std: Remove old android header file #30529
ticki
added a commit
to ticki/rust
that referenced
this pull request
Dec 22, 2015
ticki
added a commit
to ticki/rust
that referenced
this pull request
Dec 22, 2015
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this pull request
Dec 23, 2015
This comment has been minimized.
This comment has been minimized.
dhuseby
commented
Dec 30, 2015
|
When #30643 lands, i'll take a close look at the BSD builds and fix anything up that is needed. |
This was referenced Jan 5, 2016
This comment has been minimized.
This comment has been minimized.
|
FYI, this did end up breaking Android. It broke rust-errno (https://github.com/lfairy/rust-errno), and getting a fix landed for that is currently blocking Servo's rustup. Maybe we should just backport the symbol removed here ( |
This comment has been minimized.
This comment has been minimized.
|
@larsbergstrom you can probably fix it temporarily by adding this to any crate: #[cfg(target_os = "android")]
#[no_mangle]
pub unsafe extern fn __errno_location() -> *mut i32 {
extern { fn __errno() -> *mut i32; }
__errno()
} |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton Yeah, thanks! I was thinking of doing just that. Otherwise, we might have to fork errno, add a submodule for it, add a |
This comment has been minimized.
This comment has been minimized.
dhuseby
commented
Jan 27, 2016
|
@alexcrichton @semarie when #31230 and rust-lang/libc#157 land, the BSD builds should be green. |
alexcrichton commentedDec 2, 2015
All these definitions can now be written in Rust, so do so!