about summary refs log tree commit diff
path: root/src/liblibc
AgeCommit message (Collapse)AuthorLines
2014-04-24std: Add timeouts to unix connect/acceptAlex Crichton-1/+1
This adds support for connecting to a unix socket with a timeout (a named pipe on windows), and accepting a connection with a timeout. The goal is to bring unix pipes/named sockets back in line with TCP support for timeouts. Similarly to the TCP sockets, all methods are marked #[experimental] due to uncertainty about the type of the timeout argument. This internally involved a good bit of refactoring to share as much code as possible between TCP servers and pipe servers, but the core implementation did not change drastically as part of this commit. cc #13523
2014-04-19std: Add an experimental connect_timeout functionAlex Crichton-5/+10
This adds a `TcpStream::connect_timeout` function in order to assist opening connections with a timeout (cc #13523). There isn't really much design space for this specific operation (unlike timing out normal blocking reads/writes), so I am fairly confident that this is the correct interface for this function. The function is marked #[experimental] because it takes a u64 timeout argument, and the u64 type is likely to change in the future.
2014-04-16This is a Windows specific fix in libc. According to MSDN, the GUIDiancormac84-2/+2
structure's Data2 and Data3 members expect WORD types instead of DWORD. I discovered this discrepancy while experimenting with some bindings to Microsoft's OLE2 api. The discrepancy was corrupting the contents of the string returned by UuidToString after I used known GUIDs to test the accuracy of the function binding. I didn't add test cases because it would mean adding a dependency to my rather incomplete binding library. However, the fix produces expected string values when tested.
2014-04-16auto merge of #13454 : brson/rust/noglobs, r=alexcrichtonbors-61/+147
Them removes all the glob reexports from liblibc. I did it by removing them all, and then adding back per-platform explicit reexports until everything built again. I realize this isn't the best strategy for determining an API, but this is the lowest-impact change that solves the problem, plus I'm dissatisfied with the design of this library for other reasons and think it needs to be reconsidered from top to bottom (later). Progress on #11870.
2014-04-15Remove usage of private enum variantsAlex Crichton-2/+2
This replaces all uses of private enum variants with a struct that has one private field pointing at a private enum. RFC: 0006-remove-priv
2014-04-15libc: Deglob reexports. #11870Brian Anderson-61/+147
2014-04-10rustc: Don't succeed on shadowed nonexistent importAlex Crichton-1/+1
Previously resolve was checking the "import resolution" for whether an import had succeeded or not, but this was the same structure filled in by a previous import if a name is shadowed. Instead, this alters resolve to consult the local resolve state (as opposed to the shared one) to test whether an import succeeded or not. Closes #13404
2014-04-08Register new snapshotsAlex Crichton-8/+1
2014-04-05rustc: Pass --enable-long-section-names to gccAlex Crichton-0/+7
This was quite a curious bug on windows, and the details can be found in the comment I added to src/librustc/back/link.rs
2014-04-04Fix fallout from std::libc separationCorey Richardson-45/+29
2014-04-04Change how the readdir/opendir hack worksCorey Richardson-10/+6
2014-04-04Remove libc from stdCorey Richardson-0/+4323
These wrappers are bound to a specific libc, and they don't need to be part of libstd.