Commit Graph

1199 Commits

Author SHA1 Message Date
gnzlbg
e4bc821548 Add {get,set}domainname 2018-01-18 10:33:37 +01:00
Bryant Mairs
46933f0311 Add sockaddr_ctl on Mac 2018-01-14 22:26:46 -08:00
bors
3ccb0750ff Auto merge of #879 - SanchayanMaity:kill, r=alexcrichton
Add killpg
2018-01-13 18:01:39 +00:00
bors
1e80d93800 Auto merge of #896 - cneira:master, r=alexcrichton
added EPOLL(5)  for Illumos (Solaris fork)

EPOLL(5)  is being used in crates like mio and iovec , this change allows those crates and other that depends on EPOLL(5)  to be built in illumos systems.
2018-01-12 22:12:26 +00:00
neirac
c6bb76abf2 revert changes 2018-01-12 19:41:27 +00:00
neirac
6406f18b9f fix style 2018-01-12 19:38:07 +00:00
neirac
c1df963888 epoll create syscall table numer 2018-01-12 15:25:46 +00:00
Guillaume Gomez
d5d0bdf414 Add difftime function 2018-01-11 23:32:27 +01:00
neirac
3a7294ad0e pub mod unix 2018-01-11 22:06:34 +00:00
neirac
94608b85e0 illumos defines 2018-01-11 21:12:23 +00:00
neirac
02b5a926d6 solaris mod 2018-01-11 20:38:30 +00:00
neirac
3e3c292063 solaris defs missing 2018-01-11 20:28:37 +00:00
neirac
5b6bab01f7 solaris defs missing 2018-01-11 20:27:39 +00:00
neirac
66e0bf148d pub unix 2018-01-11 20:08:46 +00:00
neirac
efc8c95296 add const 2018-01-11 18:48:13 +00:00
neirac
8492b7a2d3 epoll defines 2018-01-11 15:45:59 +00:00
neirac
3092748c95 adding epoll for illumos 2018-01-11 15:25:00 +00:00
Kelsey Z
586867d39a feat(linux): add mntent struct and related functions
Useful when playing around with mounting points, sadly not a common
interface
2018-01-11 21:57:30 +13:00
Ed Schouten
dad866d670 Add support for CloudABI running on 32-bit ARM systems. 2018-01-09 11:40:07 +01:00
Ed Schouten
ee3d0578e6 Correct the type of c_char.
On ARM64, it is supposed to be unsigned char:

  $ aarch64-unknown-cloudabi-cc -dM -E - < /dev/null | grep __CHAR_UNSIGNED__
  #define __CHAR_UNSIGNED__ 1
2018-01-09 11:39:21 +01:00
bors
2b4cd1016b Auto merge of #889 - EdSchouten:cloudabi-time_t, r=alexcrichton
Add time_t for CloudABI.

Even though this data type is not used by libstd in any platform
independent code, one of the unit tests in src/libstd/time/mod.rs refers
to it. Instead of making that unit test more complicated, simply add
time_t, matching the type used by the C library.
2018-01-08 15:05:51 +00:00
Igor Gnatenko
2462733797 android: add statvfs flags (ST_*)
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2018-01-08 00:38:46 +01:00
Ed Schouten
63bb3f482d Add time_t for CloudABI.
Even though this data type is not used by libstd in any platform
independent code, one of the unit tests in src/libstd/time/mod.rs refers
to it. Instead of making that unit test more complicated, simply add
time_t, matching the type used by the C library.
2018-01-07 23:36:04 +01:00
Ed Schouten
bbaf0426bd Add _SC_NPROCESSORS_ONLN for CloudABI.
This constant is not used by the C library, which is why I didn't add it
initially. It is, however, used by libtest to determine the parallelism
for the execution of tests.
2018-01-02 12:37:34 +01:00
bors
f060d95ffc Auto merge of #884 - EdSchouten:cloudabi, r=alexcrichton
Add support for CloudABI.

CloudABI is a sandboxed UNIX-like runtime environment, based on the
principle of capability-based security. As CloudABI is intended to be
cross-platform, the system call layer is specified here:

    https://github.com/NuxiNL/cloudabi/blob/master/cloudabi.txt

From these definitions, we automatically generate C and Rust bindings.
The latter is published on crates.io:

    https://crates.io/crates/cloudabi

My goal is to implement libstd for CloudABI in such a way that it uses
the C library as little as possible; only in places where it would ease
interfacing with C code (e.g., thread creation). In places where
constants in the C library are directly based on the CloudABI
specification (e.g., errnos), use the constants provided by the cloudabi
crate.
2017-12-28 16:21:11 +00:00
Ed Schouten
ac0bdf9a48 Add EXIT_FAILURE and EXIT_SUCCESS for CloudABI.
These are now used by libstd's termination.rs.
2017-12-28 13:20:13 +01:00
Ed Schouten
7c36e1c305 Add arc4random_buf() for PRNG access. 2017-12-28 10:38:21 +01:00
Ed Schouten
27a5a3b967 Fix style to appease CI. 2017-12-27 18:58:34 +01:00
Ed Schouten
2fa33ef8eb Inline values coming from the cloudabi package. 2017-12-27 17:20:46 +01:00
Ed Schouten
510cb2f720 Add support for CloudABI.
CloudABI is a sandboxed UNIX-like runtime environment, based on the
principle of capability-based security. As CloudABI is intended to be
cross-platform, the system call layer is specified here:

    https://github.com/NuxiNL/cloudabi/blob/master/cloudabi.txt

From these definitions, we automatically generate C and Rust bindings.
The latter is published on crates.io:

    https://crates.io/crates/cloudabi

My goal is to implement libstd for CloudABI in such a way that it uses
the C library as little as possible; only in places where it would ease
interfacing with C code (e.g., thread creation). In places where
constants in the C library are directly based on the CloudABI
specification (e.g., errnos), use the constants provided by the cloudabi
crate.
2017-12-27 14:42:19 +01:00
luozijun
536b5cfa86 Add bpf constant on macOS 2017-12-27 04:04:46 +08:00
luozijun
629908abe3 Add struct bpf_hdr on macOS 2017-12-27 04:03:39 +08:00
luozijun
5ea536a0a0 Add some constants for linux and macos 2017-12-26 10:36:01 +08:00
Sanchayan Maity
a2f948dd61 Add killpg 2017-12-19 20:57:46 +05:30
Jörg Thalheim
9f720f3c64 Add SECCOMP_MODE_* flags on Linux 2017-12-19 14:31:12 +00:00
bors
ef9eefb6df Auto merge of #876 - asomers:remove_deprecated, r=alexcrichton
Change deprecated constants into hidden constants

rustc, an important libc consumer, has a policy that they can't use any
crates with deprecated symbols.  Replace libc's two deprecated symbols
with hidden symbols instead.
2017-12-17 18:27:08 +00:00
Alan Somers
6e8e7cf3b6 Change deprecated constants into hidden constants
rustc, an important libc consumer, has a policy that they can't use any
crates with deprecated symbols.  Replace libc's two deprecated symbols
with hidden symbols instead.
2017-12-17 11:22:03 -07:00
bors
236e0fa551 Auto merge of #875 - kpcyrd:aarch64-syscalls, r=alexcrichton
Add additional aarch64 linux syscalls

I've noticed some syscalls are missing for aarch64 linux, I've added those I needed. The numbers have been taken from a raspberry pi 3.

Adds:
- `SYS_fcntl`
- `SYS_lseek`
- `SYS_newfstatat`
- `SYS_fstat`
- `SYS_mmap`
- `SYS_open`
- `SYS_stat`
- `SYS_lstat`
- `SYS_pipe`
- `SYS_getdents`
- `SYS_poll`
2017-12-17 17:54:02 +00:00
kpcyrd
6610e424ec Remove special aarch64 syscalls again 2017-12-17 02:35:36 +01:00
bors
a8c0a3bf3e Auto merge of #871 - asomers:mq, r=alexcrichton
POSIX mqueue bindings for the BSDs

Note that OpenBSD and OSX do not support POSIX message queues.
2017-12-17 00:54:16 +00:00
Alan Somers
831ca990d2 POSIX mqueue bindings for the BSDs
Note that OpenBSD and OSX do not support POSIX message queues.
2017-12-16 10:22:11 -07:00
kpcyrd
ac365733d9 Add additional aarch64 linux syscalls 2017-12-16 01:21:10 +01:00
luozijun
348bda9410 Remove constants UTUN_CONTROL_NAME 2017-12-15 01:07:05 +08:00
luozijun
f26f092c37 Add net/if_utun.h constants for macos platform and linux/if_tun.h for linux platform 2017-12-14 22:49:44 +08:00
Sébastien Marie
94827af073 add aarch64-unknown-openbsd definition
move c_char definition more deeper to make it 'u8' on
aarch64-unknown-openbsd.
2017-12-13 08:17:11 +01:00
Sébastien Marie
b63e15f238 openbsd: update errno definition 2017-12-13 06:53:06 +01:00
bors
385a82275a Auto merge of #866 - LuoZijun:patch-1, r=alexcrichton
Add struct `sockaddr_dl` for bsdlike platforms

Freebsd: https://github.com/freebsd/freebsd/blob/master/sys/net/if_dl.h#L59
Macos: https://github.com/apple/darwin-xnu/blob/master/bsd/net/if_dl.h#L95
2017-12-12 16:28:19 +00:00
Josh Driver
b3fca2443c Add missing EAI_* flags for multiple platforms 2017-12-12 22:13:03 +10:30
luozijun
511f8c89bc fix macos 2017-12-12 12:31:43 +08:00
luozijun
789fd5eb81 Add sockaddr_dl for all bsdlike 2017-12-12 11:24:00 +08:00