Commit Graph

2051 Commits

Author SHA1 Message Date
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
bors
16a0f4a3d6 Auto merge of #895 - GuillaumeGomez:difftime, r=alexcrichton
Difftime

Once merged, can you update the crate too please?
2018-01-12 15:08:43 +00:00
Guillaume Gomez
e91769eceb Update libc version 2018-01-11 23:32:27 +01: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
bors
27430bc492 Auto merge of #893 - kelseasy:ft/add_mntent, r=alexcrichton
feat(linux): add mntent struct and related functions

Useful when playing around with mounting points, sadly not a common interface. :(
2018-01-11 16:18:07 +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
bors
4939bb2224 Auto merge of #892 - EdSchouten:cloudabi-arm, r=alexcrichton
Minor fixes for CloudABI ARM support

In the initial set of fixes for CloudABI, it looks like support for 32-bit ARM was left out, even though it is supported for C/C++. While there, fix up `c_char` for ARM64, which currently has the wrong sign.
2018-01-09 15:15:59 +00: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
bors
d73af99372 Auto merge of #890 - ignatenkobrain:android-statvfs, r=malbarbo
android: add statvfs flags (ST_*)

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2018-01-08 11:55:35 +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
bors
84e789fa66 Auto merge of #888 - keeperofdakeys:netdb, r=alexcrichton
Bump to 0.2.35

Bump for EAI_* names.
2018-01-04 01:09:14 +00:00
Josh Driver
d61351e9c8 Bump to 0.2.35 2018-01-04 10:43:01 +10:30
bors
ea64b2cbff Auto merge of #885 - EdSchouten:nprocessors, r=alexcrichton
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 18:02:56 +00: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
bors
b8bf3cf0bb Auto merge of #883 - LuoZijun:patch-2, r=alexcrichton
Add some constant and struct on macOS

file: `net/bpf.h`
2017-12-27 16:53:30 +00: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
bors
5221616a77 Auto merge of #882 - LuoZijun:patch-1, r=alexcrichton
Add some constants for linux and macos

macos:
```
netinet/if_ether.h
net/route.h
```

linux:
```
linux/if_ether.h
```
2017-12-26 18:09:43 +00: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
bors
d5af3c6f41 Auto merge of #880 - Mic92:seccomp, r=alexcrichton
Add SECCOMP_MODE_* flags on Linux
2017-12-19 14:56:51 +00:00
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
bors
a58ce987c1 Auto merge of #873 - LuoZijun:patch-2, r=alexcrichton
Add `net/if_utun.h` and `linux/if_tun.h` constants for macos and linux platform

Add `net/if_utun.h` constants for macos platform.

Add `linux/if_tun.h` constants for linux platform.
2017-12-14 23:16:35 +00:00
luozijun
348bda9410 Remove constants UTUN_CONTROL_NAME 2017-12-15 01:07:05 +08:00