summaryrefslogtreecommitdiff
path: root/src/unix/bsd/netbsdlike
Commit message (Collapse)AuthorAgeFilesLines
...
* FreeBSD: make wchar_t unsigned on arm/aarch64Greg V2020-07-061-0/+1
| | | | Wide chars are unsigned when normal chars are
* Deprecate `KERN_USERMOUNT` and `KERN_ARND` in 0.2.71Yuki Okushi2020-05-221-0/+2
|
* REG_ENOSYS is NetBSD specificSébastien Marie2020-04-142-2/+2
|
* Add bindings for POSIX regexesAlexander Batischev2020-04-131-0/+2
| | | | | | | | | | | | Headers I used: Oh, for reference, here are the headers I used while working on this: - musl: https://git.musl-libc.org/cgit/musl/tree/include/regex.h?id=8327ae0cb23b799bc55a45e0d4bd95f5a2b1cdf1 - glibc: https://sourceware.org/git/?p=glibc.git;a=blob;f=posix/regex.h;h=87cce7f5cb8cc3b678467329b479bd511e250e61;hb=HEAD - macOS: https://opensource.apple.com/source/Libc/Libc-997.90.3/include/regex.h.auto.html - FreeBSD: https://github.com/freebsd/freebsd/blob/8103b0ddb041617b7cd161528f0ff93ff32970a2/include/regex.h - NetBSD: https://github.com/NetBSD/src/blob/61c8f6fbb7e38b20e862d5cb3ed2203312963283/include/regex.h
* Add accept4() for NetBSD, Illumos and SolarisTorbjørn Birch Moltu2020-03-212-6/+6
| | | | | | | | | | | | | 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
* Add <sys/timex.h> declarations for BSDsDaniel Fox Franke2020-03-011-0/+86
|
* Add memmemVickenty Fesunov2020-02-192-0/+12
| | | | | | 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-122-8/+8
| | | | | 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
| |
* | Auto merge of #1576 - GrayJack:utmpx_netbsd, r=gnzlbgbors2019-11-281-0/+166
|\ \ | |/ |/| | | | | | | | | | | Implement utmpx.h itens for NetBSD This PR partially closes #1534 If add the constants, structs and and extra traid implmentation
| * 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-193-0/+64
| |\
| * | Implement utmpx.h itensGrayJack2019-10-311-0/+158
| | |
* | | Auto merge of #1568 - ltratt:master, r=gnzlbgbors2019-11-191-0/+9
|\ \ \ | |_|/ |/| | | | | | | | | | | 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.
| * | Add two missing pthread calls to the OpenBSD support.Laurence Tratt2019-10-251-0/+9
| |/
* | add shm support for NetBSD and OpenBSDSébastien Marie2019-11-073-0/+63
|/ | | | | | initial work from @landryb for OpenBSD, various fixes and NetBSD support from me. Fixes #1585
* Auto merge of #1552 - gsquire:add-pthread_attr_get_np, r=gnzlbgbors2019-10-161-0/+4
|\ | | | | | | | | | | | | | | NetBSD pthread_attr_get_np This patch adds a signature for the [`pthread_attr_get_np`](https://netbsd.gw.com/cgi-bin/man-cgi?pthread_attr_get_np+3+NetBSD-current) function for all architectures on NetBSD. Closes #1538
| * add pthread_attr_get_np for NetBSDGarrett Squire2019-10-151-0/+4
| |
* | Format settimeday on openbsdGrayJack2019-10-131-1/+1
| |
* | Format settimeofday on openbsdGrayJack2019-10-131-1/+4
| |
* | Add settimeofday for openbsdGrayJack2019-10-131-0/+1
|/
* 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-123-740/+882
|
* Deprecate RLIM_NLIMITSAlan Somers2019-09-022-0/+8
| | | | | | | | 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.
* UTIME_OMIT and UTIME_NOW values are inverted on OpenBSD. correct itSébastien Marie2019-08-211-2/+2
|
* Auto merge of #1474 - lpetre:add_utime_constants, r=gnzlbg0.2.63bors2019-08-202-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 OpenBSD as per request, verified here: ↵Luke Petre2019-08-171-0/+3
| | | | | | | | https://github.com/openbsd/src/blob/master/sys/sys/stat.h#L188
| * Adding UTIME_NOW and UTIME_OMIT to OSes which support utimensatLuke Petre2019-08-171-0/+3
| |
* | adapt ioctl() BPF for OpenBSDSébastien Marie2019-08-182-0/+10
|/
* openbsd: add sparc64 supportSébastien Marie2019-08-152-0/+11
|
* openbsd: introduce _MAX_PAGE_SHIFT to compute PTHREAD_STACK_MIN, ↵Sébastien Marie2019-08-154-2/+9
| | | | MINSIGSTKSZ, and SIGSTKSZ
* define KERN_TIMEOUT_STATS and incr KERN_MAXID on OpenBSDSébastien Marie2019-08-051-1/+2
|
* Expose signal value of siginfo_tDouman2019-07-092-0/+31
| | | | Exposes value for most unix like platforms
* Remove AF_MAX, PF_MAX, NET_MAXID constantsBryant Mairs2019-07-052-49/+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-293-130/+130
|\ | | | | | | | | | | | | | | 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-293-130/+130
| |
* | Deprecate AF_MAX and PF_MAXgnzlbg2019-05-292-0/+38
|/
* Add a FreeBSD 12 build job and test FreeBSD12 APIsgnzlbg2019-05-241-0/+1
| | | | | | | | | | | | | | | | | | | | | This commits adds a second FreeBSD 12 build job, and splits the implementation of the FreeBSD module into two modules, one for FreeBSD 11, and one for FreeBSD 12. The FreeBSD 11 module is compiled always by default, and is mostly forward compatible with FreeBSD 12 systems. The FreeBSD 12 module is only built for now in libc's CI, and uses FreeBSD 12 data types and APIs, linking to symbols that are only available in FreeBSD 12. Basically, when LIBC_CI env variable is defined, and the host system is a FreeBSD 12 system, then the FreeBSD 12 module is automatically built and tested. Conditional compilation is done using a `cfg(freebsd12)` flag. This commit also re-enables many tests, and documents why some remain disabled.
* openbsd: add KERN_PFSTATUS and update KERN_MAXIDSébastien Marie2019-05-231-1/+11
|