Yuki Okushi
3fae7e9ce7
Fix style
2021-04-06 10:10:29 +09:00
JohnTitor
e187543fdd
Constify `CMSG_SPACE` for all the targets
2021-03-30 17:37:13 +09:00
Sébastien Marie
cf0793a926
openbsd: make WIFCONTINUED() safe
2021-01-16 17:54:22 +00:00
Lzu Tao
42dce281b2
Add dl_iterate_phdr for openbsd
2020-10-27 18:03:33 +07: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
Yuki Okushi
68e1fd8faa
openbsd: Fix `WIFSTOPPED` following upstream
...
b66614995a/sys/sys/wait.h (L52)
2020-07-15 01:39:07 +09:00
Yuki Okushi
78ba4b4ee4
Deprecate `KERN_USERMOUNT` and `KERN_ARND` in 0.2.71
2020-05-22 13:36:27 +09:00
Torbjørn Birch Moltu
e3bbec2745
Add accept4() for NetBSD, Illumos and Solaris
...
References:
* NetBSD (became available with 8.0):
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/socket.h?annotate=1.129&only_with_tag=MAIN
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/sys/accept4.c?annotate=1.2&only_with_tag=MAIN
* Illumos:
https://illumos.org/man/3socket/accept
https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/socket.h
https://github.com/illumos/illumos-gate/blob/master/usr/src/lib/libsocket/socket/weaks.c
* Solaris:
https://docs.oracle.com/cd/E88353_01/html/E37843/accept-3c.html
2020-03-21 13:16:31 +01:00
Vickenty Fesunov
1c012aec18
Add memmem
...
memmem is a non-standard extension, first added in GNU libc and later
ported to other systems. Support for it is non-uniform, thus it was only
added to platforms that seem to support it.
2020-02-19 10:32:33 +01:00
Vickenty Fesunov
9358be36d6
Remove unnecessary parenthesis
...
This triggers a warning on a recent nightly, which in turn breaks CI due to
`#![deny(warnings)]` in libc-test/build.rs
2020-02-12 10:09:22 +01:00
bors
328eff4d1b
Auto merge of #1568 - ltratt:master, r=gnzlbg
...
Add two missing pthread calls to the OpenBSD support.
These are shamelessly copied from the NetBSD support, whose prototypes in this regard are identical to OpenBSD's.
2019-11-19 14:42:16 +00:00
Sébastien Marie
487b454d9f
add shm support for NetBSD and OpenBSD
...
initial work from @landryb for OpenBSD, various fixes and NetBSD support from me.
Fixes #1585
2019-11-07 13:10:04 +01:00
Laurence Tratt
f66774e673
Add two missing pthread calls to the OpenBSD support.
2019-10-25 16:04:02 +01:00
GrayJack
f6d9f0230d
Format settimeday on openbsd
2019-10-13 17:13:06 -03:00
GrayJack
f5ff9d9a71
Format settimeofday on openbsd
2019-10-13 16:10:47 -03:00
GrayJack
b97166f68f
Add settimeofday for openbsd
2019-10-13 15:08:59 -03:00
gnzlbg
939a2e5a3a
Formatting
2019-09-12 15:12:33 +02:00
Alan Somers
ac1e12409e
Deprecate RLIM_NLIMITS
...
This constant is not stable across OS versions, so it cannot be used in
any backwards- or forwards- compatible way. It's typically used to size
arrays in the kernel and in debugging utilities that are closely tied to
the OS version. Since libc is ignorant about OS versions, we shouldn't
even be defining it.
2019-09-02 10:21:57 -06:00
Sébastien Marie
255b01e658
UTIME_OMIT and UTIME_NOW values are inverted on OpenBSD. correct it
2019-08-21 08:45:14 +02:00
bors
38750521a6
Auto merge of #1474 - lpetre:add_utime_constants, r=gnzlbg
...
Adding UTIME_NOW and UTIME_OMIT to OSes which support utimensat
I've managed to verify a handful of these:
- [FreeBSD](1d6e424741/tools/build/stat.h (L35)
)
- [NetBSD](64b8a48e12/sys/sys/stat.h (L235)
)
- [Apple](https://opensource.apple.com/source/xnu/xnu-4903.221.2/bsd/sys/stat.h.auto.html )
I'm less confident in these:
- [Haiku](abb59d7351/headers/posix/sys/stat.h (L105)
)
- I could be wrong on this one: https://github.com/haiku/haiku/search?q=UTIME_NOW&unscoped_q=UTIME_NOW
- [WASI](24792713d7/libc-top-half/musl/include/sys/stat.h (L71)
)
- I could be wrong on this one: https://github.com/CraneStation/wasi-libc/search?q=UTIME_NOW&unscoped_q=UTIME_NOW
- [Solarish](4e0c5eff9a/usr/src/uts/common/sys/stat.h (L478)
)
2019-08-20 09:45:52 +00:00
Sébastien Marie
3b7be3c193
adapt ioctl() BPF for OpenBSD
2019-08-18 10:19:49 +02:00
Luke Petre
2c839a3342
Adding OpenBSD as per request, verified here: https://github.com/openbsd/src/blob/master/sys/sys/stat.h#L188
2019-08-17 06:41:39 +01:00
Sébastien Marie
1a45839084
openbsd: add sparc64 support
2019-08-15 12:43:00 +02:00
Sébastien Marie
3311ba8a02
openbsd: introduce _MAX_PAGE_SHIFT to compute PTHREAD_STACK_MIN, MINSIGSTKSZ, and SIGSTKSZ
2019-08-15 12:29:48 +02:00
Sébastien Marie
7ddda6fd3b
define KERN_TIMEOUT_STATS and incr KERN_MAXID on OpenBSD
2019-08-05 08:26:56 +02:00
Douman
0c2e7831ce
Expose signal value of siginfo_t
...
Exposes value for most unix like platforms
2019-07-09 15:15:17 +02:00
Bryant Mairs
215f095601
Remove AF_MAX, PF_MAX, NET_MAXID constants
...
These constants have already been deprecated for a few releases with
a deprecation notice, so they can finally be removed.
Closes rust-lang/libc#665
2019-07-05 07:39:00 -07:00
bors
0e702c1b4e
Auto merge of #1379 - gnzlbg:deprecate_fixed_width_ints, r=gnzlbg
...
Deprecate fixed width integer type aliases
cc @emilio - I think it makes sense to ensure that the latest released version of bindgen works properly with this change. That is, that even when asked to use C types from, e.g., `libc::`, it does not use aliases for the fixed-width integer C types (e.g. `libc::int64_t`) but uses Rust primitive types instead (e.g. `u64`).
Closes #1304 .
2019-05-29 18:13:57 +00:00
gnzlbg
a0865265d4
Replace uses of fixed-width integer aliases with Rust types
2019-05-29 13:17:17 +02:00
gnzlbg
a74b588ad2
Deprecate AF_MAX and PF_MAX
2019-05-29 12:24:47 +02:00
Sébastien Marie
83a947a9d9
openbsd: add KERN_PFSTATUS and update KERN_MAXID
2019-05-23 06:35:19 +02:00
gnzlbg
7b45788a01
Refactor OpenBSD-like module into OpenBSD
2019-05-22 14:20:13 +02:00