Conversation
|
See rillian/rust@b606b65 for another approach to the problem. |
|
Rillian: maybe we could merge these 2 patches? Do you know if any other distros put it anywhere else apart from /usr/lib/ocaml/llvm? |
|
Feel free to give it a go. I find both constructs messy, but I couldn't think of a better way and yours is simpler to adjust going forward. Good point about other distros. I only checked Ubuntu 10.10, because that's the system I have with a packaged llvm 2.8. It looks like Fedora is putting it directly in /usr/lib/ocaml. That won't be relevant until Fedora 15 ships with 2.8, but it's worth amending the patch. |
|
I gave it a go. Let me know what you think of rillian/rust@83cc297 I patched the Fedora path by just adding $(CFG_OCAML_LIBPATH) directly. Graydon told me it would be bad to pass that to ocamldep. Is it a problem to pass it to ocamlc? |
|
This fix was applied in graydon/rust@6b9a9a7. This issue can be closed. |
This is a follow-up to [RFC PR #173](rust-lang/rfcs#173). I was told there that changes like this don't need to go through the RFC process, so I'm submitting this directly. This PR introduces `ToSocketAddr` trait as defined in said RFC. This trait defines a conversion from different types like `&str`, `(&str, u16)` or even `SocketAddr` to `SocketAddr`. Then this trait is used in all constructor methods for `TcpStream`, `TcpListener` and `UdpSocket`. This unifies these constructor methods - previously they were using different types of input parameters (TCP ones used `(&str, u16)` pair while UDP ones used `SocketAddr`), which is not consistent by itself and sometimes inconvenient - for example, when the address initially is available as `SocketAddr`, you still need to convert it to string to pass it to e.g. `TcpStream`. This is very prominently demonstrated by the unit tests for TCP functionality. This PR makes working with network objects much like with `Path`, which also uses similar trait to be able to be constructed from `&[u8]`, `Vec<u8>` and other `Path`s. This is a breaking change. If constant literals were used before, like this: ```rust TcpStream::connect("localhost", 12345) ``` then the nicest fix is to change it to this: ```rust TcpStream::connect("localhost:12345") ``` If variables were used before, like this: ```rust TcpStream::connect(some_address, some_port) ``` then the arguments should be wrapped in another set of parentheses: ```rust TcpStream::connect((some_address, some_port)) ``` `UdpSocket` usages won't break because its constructor method accepted `SocketAddr` which implements `ToSocketAddr`, so `bind()` calls: ```rust UdpSocket::bind(some_socket_addr) ``` will continue working as before. I haven't changed `UdpStream` constructor because it is deprecated anyway.
fix thread-local-no-dtor test on MacOS and ignore it on Windows
Add more RTLD_* constants
From the Intel intrinsics manual (emphasis mine): > Compute the absolute value of packed 16-bit integers in a, and store the > *unsigned* results in dst.
single_match: suggest `if` over `if let` when possible fixes: rust-lang#173 changelog: single_match: suggest `if` over `if let` when possible
This just changes the version detection in the makefile to look for any of the versions in CFG_LLVM_ALLOWED_VERSIONS, currently set to "2.8svn 2.8 2.9svn"