summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #2999 - SteveLauC:major/minor-on-BSDs, r=<try>trybors2023-05-069-0/+91
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * fix clippySteve Lau2023-05-061-1/+1
| |
| * build: add necessary header on illumosSteve Lau2023-04-211-0/+1
| |
| * add major/minor on BSDs/illumosSteve Lau2023-04-208-0/+90
| |
* | Auto merge of #3237 - loongarch-rs:loongarch64, r=JohnTitorbors2023-05-061-2/+4
|\ \ | | | | | | | | | linux_like: Add missing constants for loongarch64
| * | linux_like: Add missing constants for loongarch64WANG Rui2023-05-061-2/+4
| | |
* | | Auto merge of #3206 - roblabla:rtmsghdr-apple, r=JohnTitorbors2023-05-061-0/+74
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add PF_ROUTE-related structures on Apple systems This commit adds the following structures from [net/route.h](https://github.com/roblabla/MacOSX-SDKs/blob/master/MacOSX13.3.sdk/usr/include/net/route.h): - rt_msghdr - rt_msghdr2 - rt_metrics and the following structures from [net/if.h](https://github.com/roblabla/MacOSX-SDKs/blob/master/MacOSX13.3.sdk/usr/include/net/if.h): - ifa_msghdr - ifma_msghdr - ifma_msghdr2
| * | | Add PF_ROUTE structures on Apple systemsroblabla2023-04-251-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the following structures from net/route.h: - rt_msghdr - rt_msghdr2 - rt_metrics and the following structures from net/if.h: - ifa_msghdr - ifma_msghdr - ifma_msghdr2
* | | | Auto merge of #3224 - stevenengler:wait-for-one, r=JohnTitorbors2023-05-064-0/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add `MSG_WAITFORONE` to freebsd and openbsd Adds `MSG_WAITFORONE` to freebsd, openbsd, and ~illumos~, as requested in https://github.com/nix-rust/nix/pull/2014. I got the values from: - freebsd: http://fxr.watson.org/fxr/source/sys/socket.h#L473 - openbsd: https://github.com/openbsd/src/blob/2852e11abfc574a216ce741308fb0c6968d9617a/sys/sys/socket.h#L512 - illumos: https://github.com/illumos/illumos-gate/blob/717646f7112314de3f464bc0b75f034f009c861e/usr/src/boot/sys/sys/socket.h#L434 This flag is also supposedly supported on [solaris](https://docs.oracle.com/cd/E88353_01/html/E37843/recvmmsg-3c.html), but I don't know how to find the value. If anyone knows what it is, I'll add it to the PR.
| * | | | Removed `MSG_WAITFORONE` from illumosSteven Engler2023-04-251-2/+0
| | | | |
| * | | | Added `MSG_WAITFORONE` to freebsd, openbsd, and illumosSteven Engler2023-04-255-0/+7
| | | | |
* | | | | Auto merge of #3231 - devnexen:fbsd_procctl_x8664, r=JohnTitorbors2023-05-061-0/+7
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | freebsd add few more procctl x86_64 constants.
| * | | | freebsd add few more procctl x86_64 constants.David CARLIER2023-04-281-0/+7
| | | | |
* | | | | Auto merge of #3232 - devnexen:redox_poll_consts, r=JohnTitorbors2023-05-031-0/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | redox add few more poll constants
| * | | | | redox add few more poll constantsDavid Carlier2023-05-031-0/+4
|/ / / / /
* | | | | Auto merge of #3228 - redox-os:redox-pw, r=JohnTitorbors2023-05-012-2/+41
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | redox: add grp.h and pwd.h functions for the users crate
| * | | | | redox: add grp.h and pwd.h functions for the users crateJeremy Soller2023-04-262-2/+41
| |/ / / /
* | | | | Auto merge of #3230 - nikarh:vita-rand, r=JohnTitorbors2023-05-011-0/+2
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added getentropy to vita target This is a late addition to https://github.com/rust-lang/libc/pull/3209. This definition is required in order to implement random in std correctly. As the previous PR, getentropy is a standard C function, should be implemented by newlib provider, and is not Sony's intellectual property.
| * | | | Added getentropy to vita targetNikolay Arhipov2023-04-281-0/+2
|/ / / /
* | | | Auto merge of #3227 - JohnTitor:unignore-on-sparc64, r=JohnTitorbors2023-04-261-42/+19
|\ \ \ \ | | | | | | | | | | | | | | | Unignore some items test on sparc64
| * | | | Unignore some items test on sparc64Yuki Okushi2023-04-261-42/+19
| |/ / / | | | | | | | | | | | | Signed-off-by: Yuki Okushi <jtitor@2k36.org>
* | | | Auto merge of #3226 - ChrisDenton:std-no-legacy, r=JohnTitorbors2023-04-261-7/+11
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Don't link `legacy_stdio_definitions` from std std on windows-msvc does not use `printf` or `fprintf` so never needs the `legacy_stdio_definitions.lib` import library and will always work fine without it.
| * | | | Don't link `legacy_stdio_definitions` from stdChris Denton2023-04-261-7/+11
| |/ / / | | | | | | | | | | | | std on Windows does not use `printf` or `fprintf` so never needs the `legacy_stdio_definitions.lib` import library.
* | | | Auto merge of #3209 - nikarh:vita, r=JohnTitorbors2023-04-262-0/+176
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | armv7 PSVita OS support via newlib Added support for ps vita via newlib. Similar to #2480, but for a different device. I'm working on adding support of std for vita, and this is essentially a prerequisite.
| * | | | armv7 PSVita OS support via newlibNikolay Arhipov2023-04-212-0/+176
| | | | |
* | | | | Auto merge of #3222 - jessicah:fix-haiku-memmem, r=JohnTitorbors2023-04-261-1/+1
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | haiku: fix incorrect linked library. Introduced in fb2a763; using a non-existent "libunix". This is in libgnu.
| * | | | haiku: fix incorrect linked library.Jessica Hamilton2023-04-251-1/+1
|/ / / / | | | | | | | | | | | | | | | | Introduced in fb2a763; using a non-existent "libunix". This is in libgnu.
* | | | Auto merge of #3220 - JohnTitor:sparc64-2022-12-09, r=JohnTitorbors2023-04-243-6/+2
|\ \ \ \ | | | | | | | | | | | | | | | Use the latest Debian for SPARC64
| * | | | Unignore `statx` test on sparc64Yuki Okushi2023-04-251-3/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Yuki Okushi <jtitor@2k36.org>
| * | | | Use the latest Debian for SPARC64Yuki Okushi2023-04-252-3/+2
|/ / / / | | | | | | | | | | | | Signed-off-by: Yuki Okushi <jtitor@2k36.org>
* | | | Auto merge of #3219 - JohnTitor:macos-12, r=JohnTitorbors2023-04-241-17/+13
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade CI image to macOS 12 The linked issue was closed, let's see if we can use macOS 12.
| * | | | Use macOS 11 for older toolchainsYuki Okushi2023-04-241-13/+13
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Yuki Okushi <jtitor@2k36.org>
| * | | | Upgrade CI image to macOS 12Yuki Okushi2023-04-241-5/+1
|/ / / / | | | | | | | | | | | | Signed-off-by: Yuki Okushi <jtitor@2k36.org>
* | | | Auto merge of #3210 - devnexen:fbsd_elf_aux_info_constants, r=JohnTitorbors2023-04-234-1/+19
|\ \ \ \ | | | | | | | | | | | | | | | freebsd add elf_aux_info constants
| * | | | fix ci and update freebsd imageDavid CARLIER2023-04-203-3/+4
| | | | |
| * | | | freebsd add elf_aux_info constantsDavid CARLIER2023-04-202-0/+17
| |/ / /
* | | | Auto merge of #3218 - JohnTitor:cleanup-extern-c, r=JohnTitorbors2023-04-233-40/+25
|\ \ \ \ | | | | | | | | | | | | | | | Clean up some externs
| * | | | Remove dangling env varYuki Okushi2023-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Yuki Okushi <jtitor@2k36.org>
| * | | | Clean up some `extern`sYuki Okushi2023-04-232-39/+24
|/ / / / | | | | | | | | | | | | Signed-off-by: Yuki Okushi <jtitor@2k36.org>
* | | | Auto merge of #3197 - zonyitoo:master, r=JohnTitorbors2023-04-233-2/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | linux_like: IPPROTO_MPTCP are supported in all linux_like platforms `IPPROTO_MPTCP` is supported on Android. Android: https://android.googlesource.com/platform/external/kernel-headers/+/refs/heads/master/original/uapi/linux/in.h#85
| * | | | linux_like: Android test ignores IPPROTO_MPTCP temporaryzonyitoo2023-04-221-0/+2
| | | | |
| * | | | linux_like: IPPROTO_MPTCP are supported in all linux_like platformszonyitoo2023-04-222-2/+2
|/ / / /
* | | | Auto merge of #3214 - devnexen:redox_further_missing_calls, r=JohnTitorbors2023-04-221-0/+10
|\ \ \ \ | | | | | | | | | | | | | | | redox adding few calls.
| * | | | redox adding few calls.David Carlier2023-04-221-0/+10
| |/ / /
* | | | Auto merge of #3212 - sunfishcode:sunfishcode/ficlone-mips-power, r=JohnTitorbors2023-04-223-8/+8
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Define `FICLONE` on mips and power. PR #3173 added definitions of `FICLONE` for mips and power to a generic file, however mips and power have their own versions of this file, so move their `FICLONE` definitions into their own files.
| * | | | Define `FICLONE` on mips and power.Dan Gohman2023-04-213-8/+8
| |/ / / | | | | | | | | | | | | | | | | | | | | PR #3173 added definitions of `FICLONE` for mips and power to a generic file, however mips and power have their own versions of this file, so move their `FICLONE` definitions into their own files.
* | | | Auto merge of #3159 - tatref:linux-madv, r=JohnTitorbors2023-04-223-0/+33
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Linux madv This is a followup of #2818
| * | | | Ignore on sparc64 as wellYuki Okushi2023-04-221-1/+1
| | | | |
| * | | | Add MADV_* constants for Linuxtatref2023-04-213-0/+33
| | | | |
* | | | | Auto merge of #3040 - 0-wiz-0:netbsd, r=JohnTitorbors2023-04-222-1/+11
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NetBSD: add two more errno values available in NetBSD-current since 2020