Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add accessors for Formatter flags #28615

Merged
merged 1 commit into from
Sep 26, 2015
Merged

Conversation

sfackler
Copy link
Member

@alexcrichton
Copy link
Member

@bors: r+
Suppose a future version of the Rust standard library doesn't depend on any C runtime on Windows. If the user doesn't want a C runtime at all, how are they supposed to get definitions for types like wchar_t?
Assuming Rust is dependent on a particular version of the C runtime, exposing functions like malloc is a trap because other DLLs are likely to have access to a different version of malloc which isn't compatible. On the other hand, if you're statically linking against code written in C, you might end up needing whatever malloc happens to be linked in.
The current proposed version of libc exposes functions which take paths as *const c_char... but you never want to use those functions on Windows because of encoding problems.

There's probably an argument to be made that libc shouldn't expose any functions at all on Windows. (The crate wouldn't be completely empty because it would contain some types.)

It might be a good idea to explicitly exclude pure math functions from the scope of libc (sin(), abs(), etc.). They aren't necessary, and we'd end up either reimplementing a lot of them in Rust or randomly excluding them on various platforms.

@bors
Copy link
Contributor

bors commented Sep 24, 2015

📌 Commit e5ee13f has been approved by alexcrichton

@alexcrichton
Copy link
Member

Oops, that was the wrong thing to copy paste

At least bors got the right idea!

@bors
Copy link
Contributor

bors commented Sep 26, 2015

⌛ Testing commit e5ee13f with merge 7ebfd85...

@bors
Copy link
Contributor

bors commented Sep 26, 2015

💔 Test failed - auto-linux-32-opt

@sfackler
Copy link
Member Author

@bors retry

@bors bors merged commit e5ee13f into rust-lang:master Sep 26, 2015
@sfackler sfackler deleted the formatter-methods branch November 26, 2016 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants