summaryrefslogtreecommitdiff
path: root/src/unix/bsd/netbsdlike/netbsd
Commit message (Collapse)AuthorAgeFilesLines
...
* Add memmemVickenty Fesunov2020-02-191-0/+6
| | | | | | 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.
* Remove unnecessary parenthesisVickenty Fesunov2020-02-121-6/+6
| | | | | This triggers a warning on a recent nightly, which in turn breaks CI due to `#![deny(warnings)]` in libc-test/build.rs
* Auto merge of #1610 - GrayJack:utmp_netbsd, r=gnzlbgbors2019-11-291-3/+24
|\ | | | | | | | | | | Implement utmp for NetBSD Followed this: https://github.com/NetBSD/src/blob/trunk/include/utmp.h
| * Implement utmp for NetBSDGrayJack2019-11-281-3/+24
| |
* | Auto merge of #1608 - lzutao:netbsd-mut-pthread_setname_np, r=gnzlbgbors2019-11-291-1/+1
|\ \ | |/ |/| | | use *const pointer for NetBSD's pthread_setname_np
| * use *const pointer for NetBSD's pthread_setname_npLzu Tao2019-11-281-1/+1
| |
* | Comment fields that are array with size above 32 in Debug impl utmpx lastlogxGrayJack2019-11-271-3/+3
| |
* | Fix the lastlogx PartialEq implGrayJack2019-11-271-1/+5
| |
* | Fix the PartialEq utmpx implGrayJack2019-11-201-1/+5
| |
* | Fix style error that `cargo fmt` didn't gotGrayJack2019-11-191-1/+0
| |
* | Run rustfmtGrayJack2019-11-191-3/+3
| |
* | Merge branch 'master' into utmpx_netbsdEric Shimizu Karbstein2019-11-191-0/+14
|\ \ | |/
| * add shm support for NetBSD and OpenBSDSébastien Marie2019-11-071-0/+13
| | | | | | | | | | | | initial work from @landryb for OpenBSD, various fixes and NetBSD support from me. Fixes #1585
* | Implement utmpx.h itensGrayJack2019-10-311-0/+158
|/
* add pthread_attr_get_np for NetBSDGarrett Squire2019-10-151-0/+4
|
* Add `pthread_main_np` to FreeBSD-like and `_lwp_self` to NetBSDMurarth2019-09-271-0/+3
|
* fix argument names in the mq_* family of functionsPhilipp Gesang2019-09-181-4/+4
| | | | It's *msg_prio* in both manpages and posix.
* Formattinggnzlbg2019-09-121-252/+327
|
* Deprecate RLIM_NLIMITSAlan Somers2019-09-021-0/+4
| | | | | | | | 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.
* Auto merge of #1474 - lpetre:add_utime_constants, r=gnzlbg0.2.63bors2019-08-201-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding UTIME_NOW and UTIME_OMIT to OSes which support utimensat I've managed to verify a handful of these: - [FreeBSD](https://github.com/freebsd/freebsd/blob/1d6e4247415d264485ee94b59fdbc12e0c566fd0/tools/build/stat.h#L35) - [NetBSD](https://github.com/NetBSD/src/blob/64b8a48e1288eb3902ed73113d157af50b2ec596/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](https://github.com/haiku/haiku/blob/abb59d7351c7ddb50c63c40430a82d94fa61917a/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](https://github.com/CraneStation/wasi-libc/blob/24792713d7e31cf593d7e19b943ef0c3aa26ef63/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](https://github.com/illumos/illumos-gate/blob/4e0c5eff9af325c80994e9527b7cb8b3a1ffd1d4/usr/src/uts/common/sys/stat.h#L478)
| * Adding UTIME_NOW and UTIME_OMIT to OSes which support utimensatLuke Petre2019-08-171-0/+3
| |
* | adapt ioctl() BPF for OpenBSDSébastien Marie2019-08-181-0/+6
|/
* Expose signal value of siginfo_tDouman2019-07-091-0/+16
| | | | Exposes value for most unix like platforms
* Remove AF_MAX, PF_MAX, NET_MAXID constantsBryant Mairs2019-07-051-25/+0
| | | | | | | 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
* Auto merge of #1387 - tormol:fionclex, r=gnzlbgbors2019-06-111-5/+0
|\ | | | | | | | | | | | | | | | | | | Add FIONCLEX and other FIO* constants for Linux, DragonFly and OpenBSD [OpenBSD header](https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/sys/filio.h?annotate=1.5) | [DragonFly header](http://gitweb.dragonflybsd.org/dragonfly.git/blame/refs/heads/master:/sys/sys/filio.h) | [Linux search](https://github.com/torvalds/linux/search?q=FIONCLEX+FIOQSIZE&unscoped_q=FIONCLEX+FIOQSIZE&type=Code) For Linux I've used [godbolt compiler explorer](https://godbolt.org/z/h-C7qM) to get final values where possible. Wile this crate has FIOCLEX for Fuchsia, Emscripten and Redox, I've not added FIONCLEX for them because those targets appear to support neither. I started adding FIOASYNC, FIOSETOWN and FIOGETOWN for all the Linux architectures, but gave up when I realized FIOASYNC is kind of deprecated and the other two useless without more symbols. If anybody is interested I have a [branch with how far I got](https://github.com/tormol/rust-libc/tree/sigio).
| * Generalize some FIO* constants to all BSDsTorbjørn Birch Moltu2019-06-071-5/+0
| | | | | | | | | | | | * Change the type of FIONCLEX on apple platforms from c_uint to c_ulong * Add FIONCLEX, FIONREAD, FIOASYNC, FIOSETOWN and FIOGETOWN for DragonFly and OpenBSD
* | Switch to manual trait impls for sigeventBryant Mairs2019-06-091-8/+38
|/ | | | | | sigevent structs on most platforms have padding or unused fields. Rather than display those in the Debug impl by deriving it, manually implement all extra_traits instead ignoring those fields.
* Auto merge of #1379 - gnzlbg:deprecate_fixed_width_ints, r=gnzlbgbors2019-05-291-65/+65
|\ | | | | | | | | | | | | | | 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 .
| * Replace uses of fixed-width integer aliases with Rust typesgnzlbg2019-05-291-65/+65
| |
* | Deprecate AF_MAX and PF_MAXgnzlbg2019-05-291-0/+21
|/
* [breaking change] incorrect API of gettimeofdaygnzlbg2019-05-221-0/+3
| | | | | | | | | | | | | | | | | | | | | The second argument of `gettimeofday` was a `*mut c_void` on all targets, but that type is incorrect in the following targets, where it should be a `*mut timezone` instead: On these other targets it appears that the signature of gettimeofday was incorrect (it takes a time-zone pointer instead of a void pointer): linux+gnu: http://man7.org/linux/man-pages/man2/gettimeofday.2.html freebsd: https://www.freebsd.org/cgi/man.cgi?query=gettimeofday&apropos=0&sektion=2&manpath=FreeBSD+11.2-stable&arch=default&format=html openbsd: https://man.openbsd.org/gettimeofday.2 android: https://github.com/ricardoquesada/android-ndk/blob/master/usr/include/sys/time.h dragonfly: https://www.dragonflybsd.org/cgi/web-man?command=gettimeofday&section=2 This commit corrects the type on these targets, which is a breaking change. Due to how this API is commonly used (e.g. passing `ptr::null_mut` to the second argument), breakage should be minimal. Users wanting to support both versions can just write `ptr as *mut _` instead. Closes #1338.
* vm_size_t does not exist on OpenBSDSébastien Marie2019-03-031-0/+1
|
* Add extra traits for NetBSDBryant Mairs2019-02-231-8/+303
|
* Remove the CMSG_ APIs from bitriggnzlbg2019-02-201-3/+51
|
* Auto merge of #1231 - dholroyd:mmsg-support, r=gnzlbgbors2019-02-181-0/+10
|\ | | | | | | | | | | | | | | Broader sendmmsg() / recvmmsg() support As a prerequisite for getting `sendmmsg()` / `recvmmsg()` into nix ( https://github.com/nix-rust/nix/pull/1017 ), support for non-linux platforms needs to be added in libc. The initial commits in this PR will just be to test out target support via CI.
| * openbsd doesn't have mmsghdr either!David Holroyd2019-02-081-0/+5
| |
| * openbsd lacks sendmmsg()/recvmmsg()David Holroyd2019-02-081-0/+5
| |
* | Cleanup dox messgnzlbg2019-02-136-18/+6
|/
* Fix build on all platformsgnzlbg2019-02-076-76/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR fixes the build on all platforms and all Rust version down to the minimum Rust version supported by libc: Rust 1.13.0. The `build.rs` is extended with logic to detect the newer Rust features used by `libc` since Rust 1.13.0: * Rust 1.19.0: `untagged_unions`. APIs using untagged unions are gated on `cfg(libc_unions)` and not available on older Rust versions. * Rust 1.25.0: `repr(align)`. Because `repr(align)` cannot be parsed by older Rust versions, all uses of `repr(align)` are split into `align.rs` and `no_align.rs` modules, which are gated on the `cfg(libc_align)` at the top level. These modules sometimes contain macros that are expanded at the top level to avoid privacy issues (`pub(crate)` is not available in older Rust versions). Closes #1242 . * Rust : `const` `mem::size_of`. These uses are worked around with hardcoded constants on older Rust versions. Also, `repr(packed)` structs cannot automatically `derive()` some traits like `Debug`. These have been moved into `s_no_extra_traits!` and the lint of missing `Debug` implementations on public items is silenced for these. We can manually implement the `extra_traits` for these in a follow up PR. This is tracked in #1243. Also, `extra_traits` does not enable `align` manually anymore. Since `f64::to_bits` is not available in older Rust versions, its usage has been replaced with a `transmute` to an `u64` which is what that method does under the hood. Closes #1232 .
* Auto merge of #1212 - asomers:cmsg, r=alexcrichtonbors2019-01-176-0/+34
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix CMSG_DATA(3) and friends on BSD PR #1098 added the CMSG_DATA(3) family of functions into libc. Because they're defined as macros in C, they had to be rewritten as Rust functions for libc. Also, they can't be tested in CI for the same reason. But that PR erroneously used the same definitions in BSD as in Linux. This commit corrects the definitions for OSX, FreeBSD, DragonflyBSD, OpenBSD, and NetBSD. I renamed a few variables and collapsed a few macros in order to combine the definitions where possible. Fixes #1210
| * Fix CMSG_DATA(3) and friends on BSDAlan Somers2019-01-166-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PR #1098 added the CMSG_DATA(3) family of functions into libc. Because they're defined as macros in C, they had to be rewritten as Rust functions for libc. Also, they can't be tested in CI for the same reason. But that PR erroneously used the same definitions in BSD as in Linux. This commit corrects the definitions for OSX, FreeBSD, DragonflyBSD, OpenBSD, and NetBSD. I renamed a few variables and collapsed a few macros in order to combine the definitions where possible. Fixes #1210
* | Auto merge of #1211 - asomers:netbsd_aio, r=gnzlbgbors2019-01-151-0/+3
|\ \ | | | | | | | | | | | | | | | Fix linking aio_read(3) and friends on NetBSD The aio functions require librt on NetBSD.
| * | Fix linking aio_read(3) and friends on NetBSDAlan Somers2019-01-141-0/+3
| |/ | | | | | | The aio functions require librt on NetBSD.
* | Auto merge of #1188 - pusateri:netbsd8, r=gnzlbgbors2019-01-151-5/+6
|\ \ | |/ |/| | | | | | | | | | | | | NetBSD 8 adds new address family changing AF_MAX and new ifaddrs flags. libc-test on NetBSD 8.0 fails without these changes. ifa_addrflags was added to struct ifaddrs to support AF_CAN. AF_MAX got bumped up one by AF_CAN. RT_IFLIST format changed to support ifa_addrflags.
| * NetBSD 8 adds new address family chaning AF_MAX and new ifaddrs flags.Tom Pusateri2018-12-271-5/+6
| |
* | Rectify line lengthalecmocatta2019-01-131-1/+1
| |
* | Fix https://github.com/rust-lang/libc/pull/1200#issuecomment-453712616alecmocatta2019-01-121-2/+3
| |
* | add FIO* for netbsdalecmocatta2019-01-081-0/+13
| |
* | Add IP_RECVDSTADDR on netbsd.Tom Pusateri2018-12-281-0/+2
| |
* | Add IP_RECVIF to BSD and IP_RECVDSTADDR to apple.Tom Pusateri2018-12-261-0/+1
|/