summaryrefslogtreecommitdiff
path: root/src/unix/bsd/netbsdlike
Commit message (Collapse)AuthorAgeFilesLines
* Change branch references to HEAD where possible or main otherwiseJosh Triplett2023-05-152-5/+5
| | | | | | | This updates CI, documentation, and similar to work with a `main` branch. It also renames references to *other* repositories to work, as well, which additionally makes it easier to search for remaining references.
* Constify `CMSG_LEN` for all targets.John Millikin2023-05-082-2/+2
|
* Auto merge of #2999 - SteveLauC:major/minor-on-BSDs, r=JohnTitorbors2023-05-062-0/+24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add major/minor on BSDs/illumos This PR adds `major/minor` on BSDs and `major/minor/makedev` on illumos. Ref: * [FreeBSD 11](https://github.com/freebsd/freebsd-src/blob/3e9337c6b211e778829ed3af783cd41447a8721b/sys/sys/types.h#L372-L374) ```c #define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ #define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ ``` * [FreeBSD 12/13/14](https://github.com/freebsd/freebsd-src/blob/3d98e253febf816e6e2aea7d3b1c013c421895de/sys/sys/types.h#L332-L341) ```c static __inline int __major(dev_t _d) { return (((_d >> 32) & 0xffffff00) | ((_d >> 8) & 0xff)); } static __inline int __minor(dev_t _d) { return (((_d >> 24) & 0xff00) | (_d & 0xffff00ff)); } ``` * [DragonFly](https://github.com/DragonFlyBSD/DragonFlyBSD/blob/d7a10f947f5344fc95e874ca3b83e9e8d0986b25/sys/sys/types.h#L170-L171) ```c #define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ #define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ ``` * [NetBSD](https://github.com/NetBSD/src/blob/a25a6fec1b0a676fc5b36fa01b2990e775775d90/sys/sys/types.h#L264-L266) ```c #define major(x) ((devmajor_t)(((uint32_t)(x) & 0x000fff00) >> 8)) #define minor(x) ((devminor_t)((((uint32_t)(x) & 0xfff00000) >> 12) | \ (((uint32_t)(x) & 0x000000ff) >> 0))) ``` * [OpenBSD](https://github.com/openbsd/src/blob/05cbc9aa8d8372e83274c75e35add6b8073c26f5/sys/sys/types.h#L211-L212) ```c #define major(x) (((unsigned)(x) >> 8) & 0xff) #define minor(x) ((unsigned)((x) & 0xff) | (((x) & 0xffff0000) >> 8)) ``` * illumos: 1. [mkdev.c](https://github.com/illumos/illumos-gate/blob/8b26092d555bd1deaacf79ea64da374602aefb65/usr/src/lib/libc/port/gen/mkdev.c#L40-L146) 2. [mkdev.h](https://github.com/illumos/illumos-gate/blob/8b26092d555bd1deaacf79ea64da374602aefb65/usr/src/uts/common/sys/mkdev.h#L97-L99)
| * add major/minor on BSDs/illumosSteve Lau2023-05-062-0/+24
| |
* | Added `MSG_WAITFORONE` to freebsd, openbsd, and illumosSteven Engler2023-04-251-0/+2
| |
* | Clean up some `extern`sYuki Okushi2023-04-231-24/+22
| | | | | | | | Signed-off-by: Yuki Okushi <jtitor@2k36.org>
* | Auto merge of #3040 - 0-wiz-0:netbsd, r=JohnTitorbors2023-04-221-1/+9
|\ \ | |/ |/| | | | | | | NetBSD: add two more errno values available in NetBSD-current since 2020
| * netbsd add deprecation warning for ELASTThomas Klausner2023-04-211-0/+6
| | | | | | | | Requested in #3040
| * netbsd add two more errnosThomas Klausner2022-12-191-1/+3
| | | | | | | | available in NetBSD-current since 2020
* | netbsd,openbsd: add more waitid related constantsVal Packett2023-04-062-1/+15
| |
* | netbsd add MAP_ALIGNED macroDavid Carlier2023-04-041-0/+13
| |
* | Add missing kqueue constants across BSDsVal Packett2023-03-292-3/+14
| | | | | | | | While here, reorder some to match the C headers
* | Add OpenBSD CLOCK_* constantsLaurent Cheylus2023-03-131-0/+6
| | | | | | | | | | | | | | | | - src/unix/bsd/netbsdlike/openbsd/mod.rs: add CLOCK_* constants from /usr/include/sys/_time.h - libc-test/semver/openbsd.txt: update file for new constants CLOCK_* Signed-off-by: Laurent Cheylus <foxy@free.fr>
* | add p_name field in kinfo_proc struct on OpenBSDSébastien Marie2023-02-221-0/+1
| | | | | | | | | | | | | | pthread_get_name_np() and pthread_set_name_np() are now using a kernel storage and could be viewed from outside the process. Reference: https://github.com/openbsd/src/commit/cef5a146e600a27064f0ea2aa25fc5f8663cb9b7
* | netbsd tcp_info data addition.David Carlier2023-02-101-0/+43
| |
* | Auto merge of #3083 - devnexen:netbsd10_pollapi_update, r=JohnTitorbors2023-01-251-1/+6
|\ \ | | | | | | | | | netbsd 10 add ppoll api support
| * | netbsd 10 add ppoll api supportDavid Carlier2023-01-221-1/+6
| | |
* | | netbsd 10 event api update.David Carlier2023-01-211-0/+8
|/ /
* | netbsd 10 adding getentropy/getrandom.David Carlier2023-01-173-1/+7
| |
* | adding mimmutable from openbsd (7.3)David Carlier2023-01-091-0/+2
|/
* add extattr_list_xxx() on NetBSDSteve Lau2022-11-031-0/+18
|
* add extended attributes constants on NetBSDSteve Lau2022-11-021-0/+6
|
* expose dirname and basenameSteve Lau2022-10-251-0/+3
|
* Style fixes, and filter out duplicate definitionsAlan Somers2022-10-223-7/+2
|
* Add more MNT_ flags on {Dragonfly,Net,Open}BSDAlan Somers2022-10-223-0/+43
|
* openbsd: add more locale constants for use with newlocale()Sébastien Marie2022-10-171-0/+12
|
* netbsd mcontext x86_64 constants.David Carlier2022-09-171-0/+27
|
* openbsd: add getmntinfo(3) and getfsstat(2) supportSébastien Marie2022-09-131-0/+6
|
* Add makedev for the BSDsAlan Somers2022-09-072-0/+20
| | | | | | | | | | | Also, make makedev function safe and const on all platforms. On Android, change the arguments from signed to unsigned integers to match the other platforms. The C makedev is a macro, so the signededness is undefined. Add an integration test for makedev, too, since it's a macro that we must reimplement.
* Fix the type of file flags on OpenBSDAlan Somers2022-07-103-12/+21
| | | | | In C they're defined as macros, but since they're used with chflags(2) they should have the same type as that function's flags argument.
* Remove rumprun-related codeYuki Okushi2022-06-191-4/+1
| | | | Signed-off-by: Yuki Okushi <jtitor@2k36.org>
* Add NetBSD ki_sigset_t, kinfo_proc2, and kinfo_lwp structsThomas Hurst2022-05-171-0/+144
|
* Add OpenBSD kinfo_proc structThomas Hurst2022-05-101-0/+103
|
* openbsd: constantify some arguments of openpty() and forkpty()Sébastien Marie2022-04-303-13/+28
| | | | | OpenBSD recently made termp and winp arguments of openpty() and forkpty() const. to match the prototypes in glibc and musl libc.
* Auto merge of #2762 - m-ou-se:netbsd-futex-consts, r=Amanieubors2022-04-201-0/+23
|\ | | | | | | | | | | Add NetBSD's FUTEX_* constants. This adds the FUTEX_* constants from NetBSD's [src/sys/sys/futex.h](http://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/sys/futex.h).
| * Add NetBSD's FUTEX_* constants.Mara Bos2022-04-191-0/+23
| |
* | Add OpenBSD's futex.h.Mara Bos2022-04-191-0/+15
|/
* Add SCHED constants for OpenBSD.Victor Polevoy2022-04-091-0/+4
| | | | | | | The constants are defined for improving the user experience when calling the libc functions related to scheduling policies. Also helps with unifiying the code as all these constants are already defined for other operating systems.
* Auto merge of #2733 - vityafx:add-pthread-functions-to-bsd, r=Amanieubors2022-04-022-7/+17
|\ | | | | | | | | | | Expose more thread bindings for BSD-like OSes. Fixes https://github.com/rust-lang/libc/issues/2721
| * Expose more thread bindings for NetBSD-like OSes.Victor Polevoy2022-04-012-7/+17
| |
* | following up on openbsd's kinfo_vmentry flagsDavid Carlier2022-03-311-0/+24
| |
* | openbsd kinfo_vmentry protection flagsDavid Carlier2022-03-301-0/+5
|/
* openbsd hash search apiDavid Carlier2022-03-051-0/+18
|
* openbsd add lsearch/lfind fn.David Carlier2022-03-031-0/+15
|
* BSD add deterministic rand apiDavid Carlier2022-02-141-0/+4
|
* bsd sched api updateDavid CARLIER2022-02-051-0/+1
|
* Auto merge of #2649 - devnexen:netbsd_ifconf, r=Amanieubors2022-01-241-0/+51
|\ | | | | | | netbsd add ifconf data
| * netbsd add ifconf dataDavid Carlier2022-01-241-0/+51
| |
* | Define ip_mreqn on OpenBSDCharlie Root2022-01-241-0/+6
|/
* netbsd add PROT_MPROTECT macros.David Carlier2022-01-151-0/+8
|