summaryrefslogtreecommitdiff
path: root/src/unix/bsd/netbsdlike/openbsd/mod.rs
Commit message (Collapse)AuthorAgeFilesLines
* Change branch references to HEAD where possible or main otherwiseJosh Triplett2023-05-151-4/+4
| | | | | | | 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-081-1/+1
|
* Auto merge of #2999 - SteveLauC:major/minor-on-BSDs, r=JohnTitorbors2023-05-061-0/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-061-0/+13
| |
* | Added `MSG_WAITFORONE` to freebsd, openbsd, and illumosSteven Engler2023-04-251-0/+2
|/
* netbsd,openbsd: add more waitid related constantsVal Packett2023-04-061-1/+10
|
* Add missing kqueue constants across BSDsVal Packett2023-03-291-3/+7
| | | | 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 10 adding getentropy/getrandom.David Carlier2023-01-171-1/+0
|
* adding mimmutable from openbsd (7.3)David Carlier2023-01-091-0/+2
|
* Style fixes, and filter out duplicate definitionsAlan Somers2022-10-221-5/+1
|
* Add more MNT_ flags on {Dragonfly,Net,Open}BSDAlan Somers2022-10-221-0/+20
|
* openbsd: add more locale constants for use with newlocale()Sébastien Marie2022-10-171-0/+12
|
* openbsd: add getmntinfo(3) and getfsstat(2) supportSébastien Marie2022-09-131-0/+6
|
* Add makedev for the BSDsAlan Somers2022-09-071-0/+10
| | | | | | | | | | | 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-101-0/+11
| | | | | 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.
* Add OpenBSD kinfo_proc structThomas Hurst2022-05-101-0/+103
|
* openbsd: constantify some arguments of openpty() and forkpty()Sébastien Marie2022-04-301-0/+14
| | | | | OpenBSD recently made termp and winp arguments of openpty() and forkpty() const. to match the prototypes in glibc and musl libc.
* 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.
* 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
|
* Define ip_mreqn on OpenBSDCharlie Root2022-01-241-0/+6
|
* openbsd adding splice struct for SO_SPLICE sock optDavid Carlier2021-12-301-0/+6
|
* EV_SYSFLAGS changed value on upcoming 7.1Sébastien Marie2021-12-171-1/+3
|
* add more archs definition for openbsd: arm, mips64, powerpc, powerpc64, riscv64Sébastien Marie2021-12-131-7/+22
|
* couple of ptrace query for openbsdDavid Carlier2021-11-191-0/+15
|
* openbsd backtrace api additionDavid Carlier2021-11-101-0/+16
|
* Auto merge of #2505 - rtzoeller:bsd_getsetresuid, r=Amanieubors2021-11-041-0/+2
|\ | | | | | | | | | | Add getresgid and getresuid to DragonFly, FreeBSD and OpenBSD The functions have the same signatures as on Linux.
| * Add getresgid and getresuid to DragonFly, FreeBSD and OpenBSDRyan Zoeller2021-11-021-0/+2
| |
* | netbsd/openbsd add AI_* constantsDavid Carlier2021-10-311-0/+8
|/
* openbsd add getthrid fn.David Carlier2021-10-051-0/+1
|
* netbsd/openbsd add get thread name api.David Carlier2021-09-251-0/+1
|
* BSD add utrace callsDavid Carlier2021-09-191-0/+1
|
* openbsd add secure alloc fn.David Carlier2021-08-311-0/+4
|
* openbsd adding kinfo_vmentryDavid Carlier2021-07-251-0/+17
|
* pthread_spinlock api remaining bsd systemsDavid Carlier2021-06-171-0/+2
|
* bsd adding setproctitle (setproctitle_fast for FreeBSD too).David Carlier2021-06-011-0/+2
| | | | addresses #2197
* openbsd/netbsd siginfo_t adding si_addr field accessor.David Carlier2021-05-261-0/+4
|
* openbsd update deprecate few constantsDavid Carlier2021-05-221-0/+8
|
* Auto merge of #2176 - devnexen:netdb_constants, r=Amanieubors2021-05-161-0/+6
|\ | | | | | | openbsd adding few more netdb constants
| * openbsd adding few more netdb constantsDavid Carlier2021-05-161-0/+6
| |
* | Add OpenBSD unveil(2)Vincent Lee2021-05-151-0/+1
|/
* Auto merge of #2156 - niluxv:add_explicit_memset_functions, r=JohnTitorbors2021-05-111-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | Add explicit/volatile memset/memzero functions Adds the following functions to platforms that support them: * `explicit_bzero` (de facto standard): Glibc, MUSL, FreeBSD, DragonFly BSD, OpenBSD * `explicit_memset`: NetBSD * `memset_s` (C11 standard): FreeBSD, DragonFly BSD, Apple OSX These functions are useful for zeroing secret memory. Closes #2009
| * Remove the new `extern "C"` blocks (merge with existing blocks)niluxv2021-05-081-2/+0
| |
| * Add explicit/volatile memset/memzero functionsniluxv2021-05-021-0/+5
| | | | | | | | | | | | | | | | | | Adds the following functions to platforms that support them: * `explicit_bzero` (de facto standard): Glibc, MUSL, FreeBSD, DragonFly BSD, OpenBSD * `explicit_memset`: NetBSD * `memset_s` (C11 standard): FreeBSD, DragonFly BSD These functions are useful for zeroing secret memory.