Yuki Okushi
3fae7e9ce7
Fix style
2021-04-06 10:10:29 +09:00
Alan Somers
ec13c82bc9
Removed repr(packed) from some NetBSD structures
...
The structures in question have always been properly aligned, so the
packed attribute only serves to generate annoying compiler warnings. It
will be removed in the next release of NetBSD.
415c686e20
2021-04-04 10:05:10 -06:00
JohnTitor
e187543fdd
Constify `CMSG_SPACE` for all the targets
2021-03-30 17:37:13 +09:00
Guillaume Gomez
0d89fe28f8
Add the following types:
...
* processor_flavor_t
* processor_info_t
* processor_info_array_t
2021-03-29 21:52:05 +02:00
Guillaume Gomez
86236a83f7
Add the following elements:
...
* processor_cpu_load_info
* processor_cpu_load_info_t
* processor_cpu_load_info_data_t
* processor_basic_info
* processor_basic_info_t
* processor_basic_info_data_t
* processor_set_basic_info
* processor_set_basic_info_t
* processor_set_basic_info_data_t
* processor_set_load_info
* processor_set_load_info_t
* processor_set_load_info_data_t
* natural_t
* mach_msg_type_number_t
* PROCESSOR_BASIC_INFO
* PROCESSOR_CPU_LOAD_INFO
* PROCESSOR_PM_REGS_INFO
* PROCESSOR_TEMPERATURE
* PROCESSOR_SET_BASIC_INFO
* PROCESSOR_SET_LOAD_INFO
2021-03-29 16:46:20 +02:00
Alan Somers
51a287b98a
Add MAP_GUARD on FreeBSD.
...
It was added in FreeBSD 11.1.
2021-03-26 20:49:07 -06:00
Guillaume Gomez
fbba2bb34c
Add CPU_STATE_* constants
2021-03-13 21:51:01 +01:00
Torbjørn Birch Moltu
3f62e51d24
Add cr_pid to FreeBSD xucred - an unreleased addition in FreeBSD 13
...
definition: https://svnweb.freebsd.org/base/head/sys/sys/ucred.h?view=markup#l85
manpage: https://www.freebsd.org/cgi/man.cgi?query=unix&sektion=0&manpath=FreeBSD+13-current&format=html
Continue comparing and hashing __cr_unused1 for backwards compatibility.
2021-03-08 19:37:01 +01:00
Torbjørn Birch Moltu
0f40951415
Add NetBSD unpcbid, LOCAL_PEEREID and other LOCAL_ constants
2021-03-07 21:44:23 +01:00
Torbjørn Birch Moltu
adb0a34c87
Add LOCAL_PEERCRED and related to Dragonfly
...
https://gitweb.dragonflybsd.org/dragonfly.git/blob/cd4ac48fd186404370e0b8623530b6add4b70400:/sys/sys/ucred.h#l86
None of the other LOCAL_ constants for FreeBSD are available on Dragonfly:
https://gitweb.dragonflybsd.org/dragonfly.git/blob/master:/sys/sys/un.h
2021-03-07 21:44:17 +01:00
bors
c334f98ad9
dragonflybsd: expose waitid() prototype + related constants
...
This exposes the POSIX waitid() process management function and some related defined constants for dragonflybsd. It includes one correction: WSTOPPED which previously had the wrong value. Noticed this when a crate that depended on it, process_control, wouldn't compile on this platform.
2021-03-03 16:18:04 +00:00
James Lee
4b55c8715c
Add BPF structures for FreeBSD
2021-02-25 17:18:07 +11:00
James Lee
ed1256a366
Fix BPF_ALIGNMENT for 32bit FreeBSD
2021-02-25 17:17:50 +11:00
Alexander Batischev
3e4d684dcd
Add bindings for iconv calls
...
FreeBSD-likes all implement iconv:
- DragonflyBSD: bbb35c81f7/include/iconv.h
- FreeBSD: a6dc68c0e0/include/iconv.h
NetBSD-likes:
- NetBSD: 81a39f6087/include/iconv.h
- OpenBSD doesn't implement it
macOS: apparently ships a conforming implementation as a separate
library:
https://stackoverflow.com/questions/57734434/libiconv-or-iconv-undefined-symbol-on-mac-osx/57734435#57734435
Linux:
- glibc: https://sourceware.org/git/?p=glibc.git;a=blob;f=iconv/iconv.h;h=fdddf53d99c3046ef9c280db01a425c2f499043e;hb=HEAD
- musl: https://git.musl-libc.org/cgit/musl/tree/include/iconv.h?id=455f96857f91d14e193219ca00969354a981c09c
2021-02-11 01:22:49 +03:00
Thomas de Zeeuw
a8a28adcc2
Add SO_LINGER_SEC on macOS
2021-02-08 13:20:18 +01:00
Guillaume Gomez
d51b418bfe
Add getmntinfo and getmntinfo functions, MNT_WAIT and MNT_NOWAIT constants
2021-02-07 22:47:16 +01:00
Amanieu d'Antras
9d393107c6
Rustfmt
2021-02-01 22:52:54 +00:00
Alan Somers
c070417497
Add aio_readv and aio_writev
...
They are new in FreeBSD 13.
2021-01-29 16:06:09 -07:00
Alan Somers
e3482c13c1
Refactor freebsd to add a new FreeBSD 13 module
2021-01-29 16:05:51 -07:00
Sergio Lopez
81c3e9835d
Add preadv and pwritev for macOS
...
Add declarations for the preadv and pwritev system calls, introduced
in macOS 11.0 (Big Sur).
Signed-off-by: Sergio Lopez <slp@redhat.com>
2021-01-21 16:26:32 +01:00
Sébastien Marie
cf0793a926
openbsd: make WIFCONTINUED() safe
2021-01-16 17:54:22 +00:00
bors
2ec333c3b6
Auto merge of #2008 - bsteinb:macos-aarch64-mcontext, r=JohnTitor
...
Make test suite pass on macOS on aarch64
While working on #2007 I tried to run `cargo test` in `libc-test`, which failed, because the definition of `__darwin_mcontext64` was incomplete (see #1990 ). This adds definitions for the exception state and the floating point state as well.
`libc-test` still does not pass, because I use the type `[u128; 32]` for the `__v` field of `__darwin_arm_neon_state64` (in C it is `__uint128_t __v[32]`. `ctest2` does not translate `u128` to `__uint128_t` and the generated C code does not compile. Any ideas for working around this?
2021-01-05 11:12:12 +00:00
Benedikt Steinbusch
ee84dae71c
move declarations of mcontext_t and ucontext_t
2021-01-05 11:23:48 +01:00
Alan Somers
f40f3068a0
aio functions do not require librt on FreeBSD
...
On FreeBSD, the aio_ functions require librt _only_ if they use
SIGEV_THREAD completion notification. However, due to Rust's originally
poor support for C unions, libc doesn't even expose some of the fields of
struct sigevent that SIGEV_THREAD requires. Accordingly, there is no
need to link librt to programs using aio via libc.
This change partially reverts 8c23f77704
from PR #1630 .
While I'm here, fix the linkage of lio_listio on DragonflyBSD. It
_does_ require librt.
2021-01-03 11:06:05 -07:00
Benedikt Steinbusch
d377b52d73
fix glob symbol name on macOS aarch64
2021-01-01 03:11:34 +01:00
Benedikt Steinbusch
ea2bc2c065
add new constants for macOS Big Sur
2021-01-01 02:48:07 +01:00
Benedikt Steinbusch
3fc0015790
fix values of constants on macOS aarch64
2021-01-01 02:46:37 +01:00
Benedikt Steinbusch
bdc755b487
add declaration of max_align_t for macOS on aarch64
2021-01-01 02:41:26 +01:00
Benedikt Steinbusch
42fe29064e
provide declaration of boolean_t for macOS on aarch64
2021-01-01 02:41:26 +01:00
Benedikt Steinbusch
a15491e325
move declaration of __darwin_mcontext64 etc. into align.rs
2021-01-01 01:54:37 +01:00
Benedikt Steinbusch
2ec0e61663
use [u64; 2] with manual alignment instead of u128
2021-01-01 01:25:29 +01:00
Benedikt Steinbusch
10347e8604
provide complete definition of __darwin_mcontext64 on aarch64
2021-01-01 01:25:29 +01:00
bors
7e7452fa28
Auto merge of #2013 - Thomasdezeeuw:freebsd-constants, r=JohnTitor
...
Add SO_DOMAIN constants to FreeBSD
2020-12-29 11:42:28 +00:00
Thomas de Zeeuw
01f7008527
Add SO_DOMAIN constant to FreeBSD
2020-12-29 12:04:13 +01:00
bors
c9e8bab1e0
Auto merge of #2007 - bsteinb:macos-aarch64-symbols, r=JohnTitor
...
Fix symbols names on macOS aarch64
libSystem on macOS Big Sur on aarch64 exports these symbols without the `$suffix`es. See also: https://github.com/GuillaumeGomez/sysinfo/issues/372
2020-12-28 22:37:15 +00:00
Benedikt Steinbusch
ecffd09397
fix symbols names on macOS aarch64
2020-12-23 21:44:37 +01:00
dylni
d116ee592d
Define CLD_ constants for more targets
2020-12-21 21:31:14 -05:00
dylni
29b4faed15
Make si_status method more compatible
2020-12-17 00:21:54 -05:00
Yuki Okushi
990659966e
Fix `thread_state64` on `aarch64-apple-darwin`
2020-12-07 12:27:24 +09:00
bors
8e62c98274
Auto merge of #1982 - Thomasdezeeuw:freebsd-getrandom, r=JohnTitor
...
Add getrandom to FreeBSD
Introduced in FreeBSD 12.0.
Manual page: https://www.freebsd.org/cgi/man.cgi?query=getrandom .
Not sure if the constants should be `c_int`, just matching the `flags` argument in the function, in c they're macros.
2020-11-27 07:30:39 +00:00
Thomas de Zeeuw
99b3635079
Add getrandom to FreeBSD
...
Introduced in FreeBSD 12.0.
Manual page: https://www.freebsd.org/cgi/man.cgi?query=getrandom .
2020-11-24 11:08:27 +01:00
zonyitoo
9578fa1942
Add IPV6_BINDANY on FreeBSD
2020-11-07 12:08:32 +08:00
Lzu Tao
42dce281b2
Add dl_iterate_phdr for openbsd
2020-10-27 18:03:33 +07:00
Lzu Tao
6711eefc8c
Add dl_iterate_phdr for netbsd
2020-10-27 18:03:33 +07:00
Lzu Tao
89c90cd298
Add dl_iterate_phdr for freebsd
2020-10-27 09:59:37 +07:00
Yuki Okushi
d371bdcc1e
Fix `deprecated` attribute for `__error`
2020-10-25 10:37:49 +09:00
DarcInc
16e0a0bf5f
Adding nmount to freebsd and removing fdatasync from freebsd 10
2020-10-18 21:46:15 -04:00
Max Blachman
a6c451d17f
add clock_nanosleep to freebsd 12 and netbsd
2020-10-15 10:11:43 -07:00
Robert Collins
e9c6804523
Add missing NetBSD RLIMIT_ constants
2020-10-10 20:37:47 +02:00
Daniil Bondarev
773f5562ba
Use safe_f! consistently across platforms
...
The pr #1870 introduced safe_f! macro, which made some functions like
WIFEXITED and WEXITSTATUS const and safe on linux_like platform only,
which causes inconsistency when trying to use those functions in crates
compiled across multiple platforms, as using unsafe on those functions
will generate unused_unsafe warning on linux platforms and lack of
unsafe block will fail compilation on non-linux platforms.
To avoid the inconsistency, this commit applies the same macro for all
the same functions on other platforms too.
2020-09-12 23:38:06 -07:00