Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#527 - philippkeller:master, r=alexcrichton
add tmpnam and pthread_exit tmpnam and readdir are trivial IMO. About the `pthread_create` change: It needs `unsafe` for passing `C` functions to pthread_create (with rust functions the omission of `unsafe` is working of course). `bindgen` produces this function definition: ``` pub fn pthread_create(arg1: *mut pthread_t, arg2: *const pthread_attr_t, arg3: Option<unsafe extern "C" fn(arg1: *mut c_void) -> *mut c_void>, arg4: *mut c_void) -> c_int; ``` So it would add an additional `Option` around the function. But that would break existing code which uses `libc::pthread_create` and what use is it to call pthread_create without any function pointer, so I left `Option` out. For reference: I also opened a [stackoverflow question](http://stackoverflow.com/questions/42284562) where the answers were also suggesting adding `unsafe` to the function definition.
- Loading branch information