Add experimental newlib bindings
I'm not sure how much desire there is for something like this in the libc crate, but I've been working with a newlib-based toolchain for a while and thought I'd throw this PR up and see what happens.
These bindings are more specifically targeted towards the devkitARM toolchain from http://devkitpro.org rather than newlib in general. I'd be happy to try making things more platform and toolchain-agnostic, but I'm not completely sure what the best way to do that is. I can move more of the arch-specific bindings to the `arm` folder, but should there also be a `devkitarm` subdirectory to further separate specific bindings from other newlib implementations?
There's also the question of if the bindings should live in the `unix` directory in the first place. Newlib aims to provide a unix/posix-like environment and it would be nice to inherit common unix definitions by default, but it can target anything from embedded devices to custom userlands, and as such it often lacks APIs that are common in other libc variants, such as pthreads.
Add missing flags in glibc arm
Adds two missing flags that are defined everywhere except for arm-linux-gnueabi for some reason : SO_PASSCRED and SO_SNDBUFFORCE.
Also adds MAP_32BIT on x86_64-linux-android and i686-linux-android.
Add missing termios constants for Mac
Didn't add these the first time around, because it says they're unimplemented, but so are the `NL0` and related constants I added. This also makes testing a little easier having these constants available, and they are in the termios headers on Mac.
Add socket constants for more platforms
Missing a few constants across all nix-supported platforms (see nix-rust/nix#636) so this adds them. This is still a work in progress as I wanted to make sure I didn't break anything doing most of the fixes. I'll come back and finish this up later.
Add pthread_rwlockattr APIs
I'm basically trying to mirror the existing code for pthread_mutexattr.
Hopefully the non-linux parts are correct - finding the right definitions is rather confusing and occasionally even contradicts existing definitions (e.g. [this](a26375e7b3/src/libpthread/src/internal.h (L295)) `pthread_condattr_t` doesn't match #335).
Add structs defined in linux/input.h
I was using definitions for these structs from `ioctl` but because @cmr decide to deprecate his crate (and yanked all versions :() I think that `libc` is the best place for them.
In original C header, primitive types uses aliases like `__u16` or `__s32`; for now I replaced them with Rust's counterparts but I'm not sure if it is ok, especially because tests were failing for `u64` (`unsigned long long` vs `unsigned long` on x86_64). Also, should I do something special with union in `ff_effect`?
I would like also to add all constants form `linux/input.h` and `linux/input-event-codes.h` if this PR will be accepted.
Add missing Android constant
This pull requests add the `_SC_NPROCESSORS_CONF` constant to `libc` for Android targets. The similar `_SC_NPROCESSORS_ONLN` already existed.
The reason for adding only this constant is to help fix an [issue with `num_cpus`](https://github.com/seanmonstar/num_cpus/issues/34).