Commit Graph

1324 Commits

Author SHA1 Message Date
Geoff Cant
913da6cc3a Add FIONREAD for apple/b64 2017-03-24 17:16:43 -07:00
bors
4e313148fe Auto merge of #550 - Mic92:fdopendir, r=alexcrichton
add fdopendir
2017-03-24 14:36:31 +00:00
Jörg Thalheim
99a524d4fc
add fdopendir 2017-03-24 10:38:09 +01:00
bors
e9238ebc9b Auto merge of #552 - vojtechkral:patch-3, r=alexcrichton
Solaris/Illumos: Add several more filio ioctls

MIO needs these
2017-03-23 21:01:30 +00:00
Alex Crichton
1febc500a5 Surround rustc download in appveyor-retry 2017-03-23 13:42:26 -07:00
bors
443977132a Auto merge of #551 - Mic92:readlinkat, r=alexcrichton
move *at family to unix

apparently supported on all platforms.
2017-03-23 20:37:54 +00:00
bors
16718abf50 Auto merge of #553 - alexcrichton:fix-ci, r=alexcrichton
Get CI working again

A few changes have necessitated some updates on our end
2017-03-23 18:47:30 +00:00
Alex Crichton
9a55bc1027 Get CI working again
A few changes have necessitated some updates on our end
2017-03-23 11:29:57 -07:00
Vojtech Kral
636348ae6b Solaris/Illumos: Add several more filio ioctls
MIO needs these
2017-03-21 17:27:16 +01:00
Jörg Thalheim
64f89331ee
move *at family to unix 2017-03-20 16:10:01 +01:00
bors
863fb88586 Auto merge of #546 - alexander255:master, r=alexcrichton
Add support for the `accept4` system call for FreeBSD* & NetBSD*

As outlined in #540.

However since support for this system call seems to be committed, but not yet released in NetBSD & BitRig (is BitRig actually still be developed at all, btw?), I'm not sure whether it wouldn't be a better idea to only add OpenBSD support instead?
What's the official policy on this?
2017-03-03 23:53:22 +00:00
Alexander Schlarb
23d4059546 Add support for the accept4 system call for FreeBSD* & NetBSD* 2017-03-03 21:12:12 +01:00
bors
05a2d19735 Auto merge of #545 - kamalmarhubi:bump, r=alexcrichton
Bump to 0.2.21

closes https://github.com/rust-lang/libc/issues/539
2017-03-02 00:31:07 +00:00
Kamal Marhubi
d24e86c9d7 Bump to 0.2.21
closes https://github.com/rust-lang/libc/issues/539
2017-03-01 19:00:07 -05:00
bors
d197e21015 Auto merge of #543 - berkowski:socket_constants, r=alexcrichton
Adds many socket related constants

Started off adding a few constants to help cleaning up some `nix-rust/nix` issues.  Went a little.. further.

Adds lots of socket-related constants (`PF_*`, `MSG_*`, `AF_*`, `SO_*`, `SOL_*`, etc.) to linux/bsd flavors.

Added constants to `bsd/frebsdlike/dragonfly` for completeness, though they aren't covered by CI.  Did not touch `notbsd/linux/s390x.rs`
2017-03-01 22:59:11 +00:00
Zac Berkowitz
985ea406ec Added #[doc(hidden)] to AF_MAX, PF_MAX, others. 2017-03-01 18:06:01 +00:00
Zac Berkowitz
fa1962641a Added socket constants for apple 2017-03-01 18:06:01 +00:00
Zac Berkowitz
27ce7b1575 Cleaned up unused socket constants. 2017-03-01 18:06:01 +00:00
Zac Berkowitz
5494238c47 Added many socket-related constants to BSD 2017-03-01 18:06:01 +00:00
Zac Berkowitz
1479ea84fe Added many socket-related constants to linux 2017-03-01 18:06:01 +00:00
bors
612a5861da Auto merge of #538 - malbarbo:ci-android, r=alexcrichton
Add and fix tests for {i686, aarch64}-linux-android targets

I think that these changes do not breaks compatibility.

There are some types and constants changes to i686 and aarch64, but I see these changes as bug fixes instead of breaking changes. Also the type time64_t was remove from aarch64 because it is not defined in this arch.

Fixes #536
2017-03-01 16:24:39 +00:00
bors
331b179a7b Auto merge of #542 - Susurrus:master, r=alexcrichton
Add OXTABS and ONOEOT for BSD systems

According to all references I could find these are BSD extensions to POSIX and are also supported on OS X.
2017-02-28 17:14:12 +00:00
Bryant Mairs
cda0f200da Add OXTABS and ONOEOT for BSD systems 2017-02-28 08:49:26 -08:00
Marco A L Barbosa
b2791dbef0 Merge branch 'master' into ci-android 2017-02-27 23:10:55 -03:00
bors
5dd2f3917b Auto merge of #541 - Susurrus:more_termios, r=alexcrichton
Add cfmakeraw and cfsetspeed

This includes implementations for Android. `cfsetspeed` is basically just a back-to-back call to `cfsetispeed` and `cfsetospeed`, both of which seem to do the same thing here, so I just copied that body as well for `cfsetspeed`. The implementation for `cfmakeraw` was taken from the man pages for `termios(3)`.
2017-02-27 20:55:56 +00:00
Marco A L Barbosa
9a20f93222 Fix style 2017-02-27 17:54:51 -03:00
Marco A L Barbosa
a3759d7feb Fix missing prefix :: 2017-02-27 17:40:58 -03:00
Marco A L Barbosa
bfeb3606f2 Merge branch 'master' into ci-android 2017-02-27 17:25:43 -03:00
Marco A L Barbosa
fab2d30ada Remove cfg_if from src/unix/mod.rs
- Copy 17 functions definitions from src/unix/mod.rs
      to src/unix/bsd/mod.rs src/unix/haiku/mod.rs
      src/unix/notbsd/linux/mod.rs and src/unix/solaris/mod.rs
    - Add some functions to android that was cfged out
    - Remove cf* and tc* functions implementations for android
      (they are available with api >= 12, which was release in 2011)
2017-02-27 16:41:57 -03:00
Marco A L Barbosa
1175c6657d Remove cfg_if from src/unix/notbsd/android/ 2017-02-27 16:41:43 -03:00
Bryant Mairs
39e554f3f8 Add cfmakeraw and cfsetspeed
This includes implementations for Android.
2017-02-27 09:54:58 -08:00
bors
b9a0a6a77c Auto merge of #537 - Susurrus:master, r=alexcrichton
Add ppoll() for all unix platforms

I'm unsure of whether there is support in OS X for this, and I can't find anything online (so I'm betting there isn't), but I'm going to let this run through CI to confirm.
2017-02-24 20:53:44 +00:00
bors
dc1aa0e2c0 Auto merge of #530 - berkowski:baud_constants, r=alexcrichton
Added baudrate constants.

Addresses #528, adding baudrate constants for `bsd` and `notbsd` flavors of `unix`.

Passes `libc-test` locally on ubuntu 14.04 LTS with the additional (uncommitted) entries into in `build.rs`:

```
cfg.skip_const( move |name| {
        match name {
            # ... snip ...
            "PTRACE_O_SUSPEND_SECCOMP" |
            "CLONE_NEWCGROUP" |
            "NETLINK_LIST_MEMBERSHIPS" |
            "NETLINK_LISTEN_ALL_NSID" |
            "NETLINK_CAP_ACK" |
            "PR_CAP_AMBIENT_CLEAR_ALL" |
            "PR_CAP_AMBIENT_LOWER" |
            "PR_CAP_AMBIENT_RAISE" |
            "PR_CAP_AMBIENT_IS_SET" |
            "PR_CAP_AMBIENT" |
            "PR_FP_MODE_FRE" |
            "PR_FP_MODE_FR" |
            "PR_GET_FP_MODE" |
            "PR_SET_FP_MODE" |
            "PR_MPX_DISABLE_MANAGEMENT" |
            "PR_MPX_ENABLE_MANAGEMENT" |
            "PR_GET_THP_DISABLE" |
            "PR_SET_THP_DISABLE" |
            "PR_SET_MM_MAP_SIZE" |
            "PR_GET_MM_MAP_SIZE" |
            "PR_SET_MM_MAP" |
            "NLM_F_DUMP_FILTERED" |
            "EPOLLEXCLUSIVE" => true,

            _ => false,
        }
    });
```
I'm assuming this is because I'm stuck using `linux-libc-dev:3.13.0-24.46` for the moment and those constants are defined in newer versions.
2017-02-24 20:25:55 +00:00
Marco A L Barbosa
d500a458a0 Enable travis tests for {i686, aarch64}-linux-android 2017-02-24 17:21:56 -03:00
Marco A L Barbosa
f2f1129672 Fix aarch64-linux-android failing tests 2017-02-24 17:03:51 -03:00
Marco A L Barbosa
92ce51823c Make libc-tests compile for aarch64-linux-android
- some tests are failing
- remove readlink, timegm and sig* functions in favor of the
  unix/mod.rs definitions
- remove time64_t (it is not defined for aarch64)
- move some definitions to android/b32.rs and create appropriated
  definitions in android/b64.rs
2017-02-24 16:24:49 -03:00
Zac Berkowitz
004814849d Removed "rpcsvc/rex.h" from build.rs for OpenBSD
```
export TARGET=x86_64-unknown-openbsd
export QEMU=openbsd.qcow2
sh ci/run-docker.sh $TARGET
```
Passes when run localy.
2017-02-24 18:51:51 +00:00
Zac Berkowitz
62ec26aacc Changed CBAUDEX to 0b000020 on ppc and ppc64 2017-02-24 18:17:22 +00:00
Zac Berkowitz
bd6e72db5d Changed CBAUDEX to 0o010000 for ppc and ppc64 2017-02-24 17:59:04 +00:00
Zac Berkowitz
e8fc9928cd Removed "termios.h" from build.rs openbsd case.
Adding `termios.h` behind `rpcsvc/rex.h` does not solve the #define
clash since `rex.h` also defines the `_SYS_TERMIOS_H_` include guard.
2017-02-24 17:20:34 +00:00
Bryant Mairs
88e37f278c Fix path for nfds_t 2017-02-24 08:59:22 -08:00
Bryant Mairs
871f3b2cf6 Expose ppoll on some BSDs 2017-02-24 08:46:27 -08:00
Bryant Mairs
6d5aa56e71 Unify import style 2017-02-24 08:46:00 -08:00
Bryant Mairs
029cd2d957 Only expose ppoll on non-BSD targets 2017-02-24 08:07:19 -08:00
Bryant Mairs
d86901e259 Fix timeout argument type 2017-02-23 15:03:41 -08:00
Bryant Mairs
f79eed589a Fix style errors 2017-02-23 14:46:56 -08:00
Marco A L Barbosa
c53251867f Fix i686-linux-android failing tests 2017-02-23 16:40:28 -03:00
Marco A L Barbosa
599eec3781 Add test support for {aarch64, i686}-linux-android 2017-02-23 16:08:29 -03:00
Bryant Mairs
cd8447550d Add ppoll() for all unix platforms.
I'm unsure of whether there is support in OS X for this, and I can't find
anything online (I'm betting there isn't), but I'm going to let this run
through CI to confirm
2017-02-23 10:21:42 -08:00
bors
684be76eca Auto merge of #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.
2017-02-23 15:50:17 +00:00