Commit graph

2449 commits

Author SHA1 Message Date
bors 17f7b559cb Auto merge of #1107 - ignatenkobrain:patch-1, r=alexcrichton
exclude CI files from crates.io
2018-10-27 21:42:59 +00:00
Igor Gnatenko 793eeacbe5
exclude CI files from crates.io 2018-10-26 22:48:12 +02:00
bors 72cdbf9095 Auto merge of #1106 - AdelieLinux:master, r=alexcrichton
Finish correcting ioctl(2) interfaces on musl/ppc64

Last commit fixed the function definition but not the constants.  Oops.
2018-10-26 07:49:50 +00:00
A. Wilcox 914eba137b
Finish correcting ioctl(2) interfaces on musl/ppc64
Last commit fixed the function definition but not the constants.  Oops.
2018-10-26 00:33:18 -05:00
bors 87f4acb237 Auto merge of #1099 - gnzlbg:update_ctest, r=alexcrichton
update ctest version
2018-10-20 12:54:43 +00:00
bors 0f2b5e7920 Auto merge of #1101 - koutheir:master, r=alexcrichton
Added dup3() support on FreeBSD, NetBSD, OpenBSD and Solaris

Added `dup3()` support on FreeBSD, NetBSD, OpenBSD and Solaris.

The `dup3()` API is present in:
- FreeBSD 10.0 an later.
- NetBSD 6.0 and later.
- OpenBSD 5.7 and later.
- Solaris 11.4 and later.
2018-10-20 01:28:37 +00:00
Koutheir Attouchi 8915f42c9d Added dup3() support on FreeBSD, NetBSD, OpenBSD and Solaris. 2018-10-20 01:45:08 +02:00
gnzlbg 83f301d7d5 update ctest version 2018-10-19 15:02:30 +02:00
bors 93a1995d92 Auto merge of #1097 - AdelieLinux:master, r=alexcrichton
Correct ioctl(2) interface definition for musl/ppc64
2018-10-19 09:40:33 +00:00
Andrew Tunnell-Jones 2701f620d2 Add CMSG macros for unix/bsd and unix/notbsd 2018-10-19 03:39:55 +00:00
bors 814ce1ee95 Auto merge of #1095 - xoac:rs485_support, r=alexcrichton
Add TIOCGRS485 and TIOCSRS485 for musl #1094

I need help with adding `TIOCSRS485` and `TIOCSRS485` constants to libc.
2018-10-18 23:36:38 +00:00
A. Wilcox 6d9c681f4e
Correct ioctl(2) interface definition for musl/ppc64 2018-10-18 14:36:47 -05:00
Sylwester Rąpała 88de1004a5 Try fix mips constants 2018-10-18 10:19:09 +02:00
Sylwester Rąpała 04c0073851 Remove mistake #endif 2018-10-17 19:39:57 +02:00
bors c75ca6465a Auto merge of #1096 - jmmv:truncate, r=alexcrichton
Add truncate(2) to Unix platforms
2018-10-17 14:38:48 +00:00
Julio Merino 41ee5d0654 Add truncate(2) to Unix platforms 2018-10-16 21:52:06 -04:00
Sylwester Rąpała c95efe63d4 Add TIOCGRS485 and TIOCSRS485 for musl #1094 2018-10-16 10:48:22 +02:00
bors 9c4f6c4f02 Auto merge of #1093 - jabedude:acct, r=alexcrichton
Add acct(2) to BSD module

The `acct` syscall is supported on BSD platforms, the PR aims to add it to the BSD module.
2018-10-15 15:05:15 +00:00
Josh Abraham 70c178dc12
Remove rumprun target from .travis.yml
This patch removes the x86_64-rumprun-netbsd triple from Travis CI.
2018-10-15 10:29:48 -04:00
Josh Abraham c58d7abaad
Add acct(2) to BSD tree 2018-10-15 10:13:37 -04:00
Josh Abraham da73827875 Add acct(2) to BSD tree 2018-10-14 17:54:25 -04:00
bors 41944d5c37 Auto merge of #1091 - xd009642:ptrace-arch-specific, r=alexcrichton
Arch specific ptrace commands for BSDs

This PR is to add architecture specific ptrace requests etc.

Don't merge this yet if it passes I want to go over the other BSDs and architectures to see if I've missed anything I'm just creating the PR to get that initial CI approval that it's right as I expect this bit to be more fiddly.
2018-10-08 19:31:35 +00:00
xd009642 f6e6be1986 Added PT_FIRSTMACH 2018-10-08 19:11:43 +01:00
xd009642 e6d8c8d5ea Added openbsdlike and fixed netbsd/x86_64.rs 2018-10-08 19:06:21 +01:00
xd009642 3a10e2380b Fixed import 2018-10-08 18:58:26 +01:00
xd009642 08e34d7c2a Arch specific ptrace commands for netbsd 2018-10-08 18:48:03 +01:00
bors dd8f56ed57 Auto merge of #1090 - xd009642:master, r=alexcrichton
Add ptrace for non-apple BSDs

So yesterday I did a PR for ptrace for apple, I've now gone through the ptrace header files for the other BSDs supported by libc and added ptrace + constants for all of them.

Given the lack of ptrace in any of them I don't know if the test has to be changed at all for the new functions so I'll tackle any CI errors that come up if and as they appear.
2018-10-06 17:28:55 +00:00
xd009642 57b136a2de Add ptrace for non-apple BSDs
* Added ptrace and constants for all freebsdlike and netbsdlike OSs
2018-10-06 17:53:22 +01:00
bors 0bdb886af5 Auto merge of #1089 - xd009642:apple_ptrace, r=alexcrichton
Added ptrace constants for apple

I noticed the ptrace constants were missing for apple so I've added them referencing this [header](https://opensource.apple.com/source/xnu/xnu-792.13.8/bsd/sys/ptrace.h). This doesn't add any new functions just constants so I haven't added any tests which seems to be correct.
2018-10-05 20:36:38 +00:00
xd009642 4e21f4a884 Fixed TRACE_ME typo 2018-10-05 21:18:23 +01:00
xd009642 1e04fb668e Added ptrace constants for apple 2018-10-05 16:31:47 +01:00
bors 57c4a15fd6 Auto merge of #1086 - IsaacWoods:master, r=alexcrichton
Revisit work on cvoid

At the recommendation of @SimonSapin [here](https://github.com/rust-lang/rust/issues/53856#issuecomment-422932721), I have revisited the build script to check whether `core::ffi::c_void` resolves, instead of relying on a particular `rustc` version. This allows use on `1.30.x` builds with `core::ffi::c_void`.

I also noticed that `c_void` is defined twice in this crate, once in `lib.rs` and again in `switch.rs`. This instead defines `c_void` for every target except `wasm32`. As far as I can tell, this shouldn't actually change functionality on any existing targets.
2018-10-05 01:19:08 +00:00
Isaac Woods 90d86148b7
De-duplicate c_cvoid definitions 2018-10-04 10:46:55 +01:00
bors 3a04c32088 Auto merge of #1088 - m-hilgendorf:patch-1, r=alexcrichton
Add ftok on MacOS

Provide a symbol for the `ftok` function declared in sys/ipc.h, for completeness and to allow calling `ftok` to generate the key value for `shmat`.
2018-10-03 07:16:32 +00:00
bors 4a1bae281a Auto merge of #1087 - kalamay:bsd-fcntl-locks, r=alexcrichton
Add fcntl constants for advisory locking on BSDs

For range-based locking POSIX fcntl locks are needed. This adds the
constants F_RDLCK, F_UNLCK, and F_WRLCK for FreeBSD, NetBSD, OpenBSD,
DragonFlyBSD, and macOS/iOS. Fortunately these values are defined the same across these platforms.
2018-10-03 04:48:12 +00:00
m-hilgendorf f1d56f669d
Add ftok on MacOS
Provide a symbol for the `ftok` function declared in sys/ipc.h, for completeness and to allow calling `ftok` to generate the key value for `shmat`.
2018-10-02 11:04:56 -07:00
Jeremy Larkin ea3b3197d2 add missing semi-colons 2018-10-02 09:45:46 -07:00
Jeremy Larkin 4928bd9869 Add fcntl constants for advisory locking on BSDs
For range-based locking POSIX fcntl locks are needed. This adds the
constants F_RDLCK, F_UNLCK, and F_WRLCK for FreeBSD, NetBSD, OpenBSD,
DragonFlyBSD, and macOS/iOS. Fortunately these values are defined the same across these platforms.
2018-10-02 09:40:13 -07:00
bors 2926a5bb1e Auto merge of #1085 - jmmv:freebsd-utimensat, r=alexcrichton
Expose futimens and utimensat on FreeBSD and DragonFly

Should have sent this out with #1084 but I didn't notice then that these were missing (see https://github.com/nix-rust/nix/pull/944).

Haven't been able to test these locally as I do not have access to these platforms. Will rely on CI to verify these for me.
2018-09-28 17:13:33 +00:00
Julio Merino 622cc28aad Expose futimens and utimensat on FreeBSD and DragonFly 2018-09-25 16:20:52 -04:00
bors 9f78ad1248 Auto merge of #1084 - jmmv:apple-utimensat, r=alexcrichton
Expose futimens and utimensat on Apple platforms

Entries copy/pasted from `netbsdlike/mod.rs`.
2018-09-25 17:13:26 +00:00
Julio Merino b8245e3de1 Expose futimens and utimensat on Apple platforms 2018-09-25 13:05:35 -04:00
bors 78d53920c3 Auto merge of #1083 - danielverkamp:fallocate64, r=alexcrichton
Add fallocate64 and posix_fallocate64 bindings

These are necessary for large file support on 32-bit platforms,
following the same pattern as 74825222cf ("Add bindings for
-D_FILE_OFFSET_BITS=64").

Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
2018-09-22 04:00:36 +00:00
Daniel Verkamp bb9269ba13 Add fallocate64 and posix_fallocate64 bindings
These are necessary for large file support on 32-bit platforms,
following the same pattern as 74825222cf ("Add bindings for
-D_FILE_OFFSET_BITS=64").

Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
2018-09-21 16:14:32 -07:00
bors d13f3461ce Auto merge of #1082 - IsaacWoods:core_cvoid, r=alexcrichton
Re-export core::ffi::c_void if it exists

This is the second part of the implementation of [RFC 2521](https://github.com/rust-lang/rfcs/pull/2521), replacing the definition of `c_void` in libc with a re-export of the type from `core::ffi::c_void` on builds it exists for.

This uses the re-export for rustc version `1.31.0` or greater, as `1.30.x` was the current nightly when [the PR for the changes to libcore and libstd](https://github.com/rust-lang/rust/pull/53910) was merged, so I'm assuming the first nightly they will appear in will be `1.31.0`; is this acceptable?

cc rust-lang/rust#53856
2018-09-19 18:28:49 +00:00
Isaac Woods 79c80c4ec4
Re-export core::ffi::c_void if supported 2018-09-18 19:50:36 +01:00
bors 878e6aea1f Auto merge of #1075 - tbu-:pr_test_statics, r=alexcrichton
Theoretically test statics

There are none of them in `libc` except for `__progname` on Android, but
that one cannot be tested because it's not present in any header files.
2018-09-13 15:45:32 +00:00
Tobias Bucher eb6bdf35dd Revert accidentally committed test ignores 2018-09-13 07:24:47 +02:00
Tobias Bucher 45f191d192 Update to non-yanked version of ctest 2018-09-12 23:27:28 +02:00
bors 995d7daf2b Auto merge of #1078 - johalun:so_reuseport_lb, r=alexcrichton
Add new FreeBSD socket option SO_REUSEPORT_LB.

FreeBSD 12, which is scheduled to be released soon, has a new socket option SO_REUSEPORT_LB.
From setsockopt man page:
     SO_REUSEPORT_LB allows completely duplicate bindings by multiple
     processes if they all set SO_REUSEPORT_LB before binding the port.
     Incoming TCP and UDP connections are distributed among the sharing
     processes based on a hash function of local port number, foreign IP
     address and port number. A maximum of 256 processes can share one socket.
2018-09-10 23:59:22 +00:00