summaryrefslogtreecommitdiff
path: root/src/unix/bsd/netbsdlike/netbsd
Commit message (Collapse)AuthorAgeFilesLines
* Change branch references to HEAD where possible or main otherwiseJosh Triplett2023-05-151-1/+1
| | | | | | | 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/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+11
| |
* | 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-061-0/+5
| |
* | netbsd add MAP_ALIGNED macroDavid Carlier2023-04-041-0/+13
| |
* | Add missing kqueue constants across BSDsVal Packett2023-03-291-0/+7
| | | | | | | | While here, reorder some to match the C headers
* | 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-171-0/+6
|/
* add extattr_list_xxx() on NetBSDSteve Lau2022-11-031-0/+18
|
* add extended attributes constants on NetBSDSteve Lau2022-11-021-0/+6
|
* Style fixes, and filter out duplicate definitionsAlan Somers2022-10-221-1/+1
|
* Add more MNT_ flags on {Dragonfly,Net,Open}BSDAlan Somers2022-10-221-0/+17
|
* netbsd mcontext x86_64 constants.David Carlier2022-09-171-0/+27
|
* 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-1/+10
| | | | | 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
|
* 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 NetBSD's FUTEX_* constants.Mara Bos2022-04-191-0/+23
|
* Expose more thread bindings for NetBSD-like OSes.Victor Polevoy2022-04-011-7/+3
|
* bsd sched api updateDavid CARLIER2022-02-051-0/+1
|
* netbsd add ifconf dataDavid Carlier2022-01-241-0/+51
|
* netbsd add PROT_MPROTECT macros.David Carlier2022-01-151-0/+8
|
* NetBSD: add definition for execvpeBenny Siegert2022-01-011-0/+6
| | | | | This is exactly the same as the OpenBSD definition. NetBSD has had execvpe since the beginning, AFAICS.
* fcntl updates for DragonFlyBSD and NetBSDDavid Carlier2021-12-211-0/+1
|
* netbsd adding few more ptrace queries types.David Carlier2021-12-041-0/+21
|
* netbsd add sysctldesc query.David Carlier2021-11-171-0/+7
|
* netbsd add uucred structDavid Carlier2021-11-081-0/+10
|
* Auto merge of #2514 - devnexen:netbsd_xattr_api, r=Amanieubors2021-11-061-0/+44
|\ | | | | | | netbsd ext attrs api addition
| * netbsd ext attrs api additionDavid Carlier2021-11-051-0/+44
| |
* | netbsd add MAP_ALIGNED aliasesDavid Carlier2021-11-061-0/+9
|/
* netbsd libutil updateDavid Carlier2021-11-041-0/+13
|
* netbsd/openbsd add AI_* constantsDavid Carlier2021-10-311-0/+7
|
* Auto merge of #2492 - devnexen:netbsd_lwpinfo, r=JohnTitorbors2021-10-301-0/+14
|\ | | | | | | netbsd ptrace sig/lwpinfo additions
| * netbsd ptrace sig/lwpinfo additionsDavid Carlier2021-10-301-0/+14
| |
* | netbsd add missing posix_spawn constants.David Carlier2021-10-171-0/+8
|/
* netbsd add posix_spawn api.David Carlier2021-10-131-0/+159
|
* netbsd/openbsd add get thread name api.David Carlier2021-09-251-0/+1
|
* netbsd aff timer apiDavid Carlier2021-09-241-0/+21
|
* Auto merge of #2412 - devnexen:netbsd_pollts, r=JohnTitorbors2021-09-241-0/+8
|\ | | | | | | netbsd add pollts fn.
| * netbsd add pollts fn.David Carlier2021-09-201-0/+8
| |
* | BSD add utrace callsDavid Carlier2021-09-191-0/+1
|/