summaryrefslogtreecommitdiff
path: root/libc-test
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #2999 - SteveLauC:major/minor-on-BSDs, r=<try>trybors2023-05-061-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * build: add necessary header on illumosSteve Lau2023-04-211-0/+1
| |
* | Auto merge of #3224 - stevenengler:wait-for-one, r=JohnTitorbors2023-05-062-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Added `MSG_WAITFORONE` to freebsd, openbsd, and illumosSteven Engler2023-04-252-0/+2
| | |
* | | redox: add grp.h and pwd.h functions for the users crateJeremy Soller2023-04-261-2/+9
| | |
* | | Unignore some items test on sparc64Yuki Okushi2023-04-261-42/+19
|/ / | | | | | | Signed-off-by: Yuki Okushi <jtitor@2k36.org>
* | Unignore `statx` test on sparc64Yuki Okushi2023-04-251-3/+0
| | | | | | | | Signed-off-by: Yuki Okushi <jtitor@2k36.org>
* | Auto merge of #3210 - devnexen:fbsd_elf_aux_info_constants, r=JohnTitorbors2023-04-232-0/+9
|\ \ | | | | | | | | | freebsd add elf_aux_info constants
| * | fix ci and update freebsd imageDavid CARLIER2023-04-202-2/+3
| | |
| * | freebsd add elf_aux_info constantsDavid CARLIER2023-04-201-0/+8
| | |
* | | linux_like: Android test ignores IPPROTO_MPTCP temporaryzonyitoo2023-04-221-0/+2
| | |
* | | Auto merge of #3159 - tatref:linux-madv, r=JohnTitorbors2023-04-222-0/+22
|\ \ \ | | | | | | | | | | | | | | | | | | | | Linux madv This is a followup of #2818
| * | | Ignore on sparc64 as wellYuki Okushi2023-04-221-1/+1
| | | |
| * | | Add MADV_* constants for Linuxtatref2023-04-212-0/+22
| | | |
* | | | Auto merge of #3040 - 0-wiz-0:netbsd, r=JohnTitorbors2023-04-221-0/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | NetBSD: add two more errno values available in NetBSD-current since 2020
| * | | | netbsd add two more errnosThomas Klausner2022-12-191-0/+2
| | | | | | | | | | | | | | | | | | | | available in NetBSD-current since 2020
* | | | | Fix "Bump to 0.2.142" libc dependency versionIllia Bobyr2023-04-211-1/+1
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Typo during the previous upgrade in commit 38702b2623a2acfbf1957263f0c84950ef071aa4 Author: Dan Johnson <computerdruid@google.com> Date: Wed Apr 19 14:17:19 2023 -0700 Bump to 0.2.142
* | | | Bump to 0.2.142Dan Johnson2023-04-191-2/+2
| |_|/ |/| |
* | | Auto merge of #3173 - sunfishcode:sunfishcode/upstream, r=JohnTitorbors2023-04-181-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream a few more constants from rustix. Add a definition of `CIBAUD` for powerpc and powerpc64 on glibc. And a definition for `RLIM64_INFINITY` on linux_like platforms.
| * | | Upstream a few more constants from rustix.Dan Gohman2023-04-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - And a definition for `RLIM64_INFINITY` on linux_like platforms. - Declare the `sync` function on Android and solarish. - Solaris: https://docs.oracle.com/cd/E26502_01/html/E29032/sync-2.html - Illumos: https://illumos.org/man/2/sync - Enable `FICLONE` and `FICLONERANGE` on more architectures.
* | | | adding getdtablesize on redoxDavid Carlier2023-04-131-0/+1
|/ / /
* | | Auto merge of #3188 - valpackett:waitconst, r=JohnTitorbors2023-04-122-0/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | netbsd,openbsd: add more waitid related constants `P_ALL`/`P_PID`/`WEXITED`/`WNOWAIT`/`WSTOPPED` in particular are what's required for rustix to support waitid and they were missing on OpenBSD; while here add NetBSD's custom ones. ping `@semarie`
| * | | netbsd,openbsd: add more waitid related constantsVal Packett2023-04-062-0/+11
| | | |
* | | | Auto merge of #3167 - devnexen:fbsd_map_aligned, r=JohnTitorbors2023-04-091-0/+2
|\ \ \ \ | |/ / / |/| | | | | | | freebsd add MAP_ALIGNED macro
| * | | freebsd add MAP_ALIGNED macroDavid CARLIER2023-04-041-0/+2
| | |/ | |/|
* | | netbsd add MAP_ALIGNED macroDavid Carlier2023-04-041-0/+1
|/ /
* | Auto merge of #3177 - arjentz:0.2.141, r=JohnTitorbors2023-04-041-2/+2
|\ \ | | | | | | | | | | | | | | | Bump version to 0.2.141 Bump version as requested in https://github.com/rust-lang/socket2/issues/405
| * | Bump version to 0.2.141Arjen2023-03-291-2/+2
| | |
* | | Auto merge of #3155 - folkertdev:hardware-timestamping, r=JohnTitorbors2023-04-032-1/+27
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | definitions for linux hardware timestamping Definitions can be found here https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/net_tstamp.h#L76 These definitions are relevant for (PTP and NTP) hardware timestamping
| * | | definitions for linux hardware timestampingFolkert2023-04-032-1/+27
| | | |
* | | | Auto merge of #3183 - ChrisDenton:align-stack-buffer, r=JohnTitorbors2023-04-031-13/+11
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | Use aligned `cmsghdr` structs `test_cmsg_nxthdr` Fixes #3181. I could find no reason for using unaligned structs in this test.
| * | | Use aligned `cmsghdr` structs `test_cmsg_nxthdr`Chris Denton2023-04-021-13/+11
| | | |
* | | | Auto merge of #3150 - valpackett:kq, r=JohnTitorbors2023-04-025-0/+24
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Add missing kqueue constants across BSDs While here, reorder some to match the C headers
| * | | | Add missing kqueue constants across BSDsVal Packett2023-03-295-0/+24
| | |/ / | |/| | | | | | | | | | While here, reorder some to match the C headers
* | | | Auto merge of #3035 - jreppnow:rtnetlink-ext-filter, r=JohnTitorbors2023-04-022-0/+9
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Adding RTEXT_FILTER* constants from linux/rtnetlink.h Adding some constants needed for some specific netlink-route interactions (fetching information on a network interface). They are defined at ```linux/rtnetlink.h```.
| * | | | ignore RTEXT_FILTER_* constants for non-GNU Linux libc checksJanosch Reppnow2023-02-261-0/+2
| | | | |
| * | | | add RTEXT_FILTER* constants from linux/rtnetlink.hJanosch Reppnow2023-02-261-0/+7
| | | | |
* | | | | Auto merge of #3174 - devnexen:redox_reallocarray, r=JohnTitorbors2023-04-021-0/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | redox reallocarray addition
| * | | | redox reallocarray additionDavid Carlier2023-03-281-0/+1
| | | | |
* | | | | Disable `test_cmsg_nxthdr`Yuki Okushi2023-04-021-0/+3
| |_|/ / |/| | | | | | | | | | | Signed-off-by: Yuki Okushi <jtitor@2k36.org>
* | | | Auto merge of #3153 - devnexen:dl_iterate_phdr_haiku, r=JohnTitorbors2023-03-291-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | haku adding dl_iterate_phdr bsd extension
| * | | | haku adding dl_iterate_phdr bsd extensionDavid Carlier2023-03-231-0/+1
| | | | |
* | | | | Auto merge of #3152 - shua:mactime, r=JohnTitorbors2023-03-291-0/+7
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | mac time.h functions I used these in https://github.com/shua/graf because I'm used to them, and don't really want to pull in time or chrono just for some stuff already present in libc.h . Compilation worked fine on my linux target, but failed on mac osx because these weren't defined in rust-lang/libc (but these are all present in 13.1 SDK).
| * | | | apple: add time.h functionsshua2023-03-261-0/+7
| | | | |
* | | | | Auto merge of #3164 - devnexen:redox_explicit_bzero, r=JohnTitorbors2023-03-281-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | redox add explicit_bzero
| * | | | | redox add explicit_bzeroDavid CARLIER2023-03-241-0/+1
| | |/ / / | |/| | |
* | | | | Auto merge of #3168 - devnexen:redox_strclpy_api, r=JohnTitorbors2023-03-271-0/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | redox add strlcpy api
| * | | | | redox add strlcpy apiDavid CARLIER2023-03-251-0/+2
| |/ / / /
* | | | | FreeBSD: Ignore test for remove constYuki Okushi2023-03-281-1/+4
|/ / / / | | | | | | | | | | | | Signed-off-by: Yuki Okushi <jtitor@2k36.org>
* | | | linux: add kexec flagsRicardo Ribalda2023-03-203-0/+15
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds `KEXEC_ARCH_MASK`, `KEXEC_FILE_NO_INITRAMFS`, `KEXEC_FILE_ON_CRASH`, `KEXEC_FILE_UNLOAD`, `KEXEC_ON_CRASH`, and `KEXEC_PRESERVE_CONTEXT` constants on Linux and Android. Those are used by `kexec` and `kexec_file_load` syscalls, and they are defined at: * https://github.com/torvalds/linux/blob/v6.2/include/uapi/linux/kexec.h#L12-L26