Commit Graph

1301 Commits

Author SHA1 Message Date
haotuo c1da2af13f Add support for oh
Issue:I6W3E2

Signed-off-by: haotuo <haotuo@huawei.com>
2023-04-17 15:18:37 +08:00
Florian Bartels 0b8379f244 Prepare 0.2.139 release 2022-12-22 09:01:17 +01:00
bors f026a6ed2b Auto merge of #3041 - devnexen:linux_kernel_version, r=JohnTitor
adding KERNEL_VERSION macro for linux.
2022-12-21 12:54:30 +00:00
David Carlier 01af5fd730 adding KERNEL_VERSION macro for linux. 2022-12-21 12:46:21 +00:00
Frederick Mayle f87bf23e6f Add misc constants and functions for android
These are the main diffs present in the android opensource project.
2022-12-20 15:49:38 -08:00
bors 03d7b43ce1 Auto merge of #3038 - gh-tr:rebased/20221216, r=JohnTitor
Add support for QNX/Neutrino 7.1

Test cases (ctest2, all succeed):
QNX/Neutrino 7.1 x86_64:  9884
QNX/Neutrino 7.1 aarch64: 9766

Co-authored-by: Tristan Roach <troach@qnx.com>
Co-authored-by: Florian Bartels <Florian.Bartels@elektrobit.com>
2022-12-20 11:57:29 +00:00
Florian Bartels a778985104 Add support for QNX/Neutrino 7.1
Test cases (ctest2, all succeed):
QNX/Neutrino 7.1 x86_64:  9884
QNX/Neutrino 7.1 aarch64: 9766

Co-authored-by: Tristan Roach <troach@qnx.com>
Co-authored-by: Florian Bartels <Florian.Bartels@elektrobit.com>
2022-12-16 09:13:16 -05:00
LegionMammal978 f5a92ac64c Add ISO C functions atof, atol, atoll, strtoll, strtoull 2022-12-14 10:09:03 -05:00
bors d08276cb6c Auto merge of #3027 - Phantomical:auxval, r=JohnTitor
linux: Add AT_SYSINFO_EHDR constant

When passed to [`getauxval(3)`][2] this is used to retrieve the base address of the vdso mapped into the current process. It is defined the architecture specific `auxvec.h` headers but [it is defined to the same value in all of them][1] so I've put it in `src/unix/linux_like/linux/mod.rs` instead of in the arch submodule.

[1]: https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/torvalds/linux%24+%23define+AT_SYSINFO_EHDR&patternType=standard&sm=1
[2]: https://man7.org/linux/man-pages/man3/getauxval.3.html
2022-12-11 02:31:05 +00:00
carbotaniuman c1b40f0b85 Try readding all inotify flags 2022-12-07 08:31:03 -06:00
Phantomical e069c23d7d Add AT_SYSINFO_EHDR constant for linux 2022-12-04 17:29:27 -08:00
bors 5fb82c90d8 Auto merge of #2994 - SteveLauC:libc-02138, r=JohnTitor
bump to 0.2.138

Bump version to 0.2.138 🚀
2022-12-03 02:26:31 +00:00
bors 2670873b19 Auto merge of #3021 - devnexen:getopt_long, r=JohnTitor
adding getopt_long for unixes.
2022-12-03 00:18:45 +00:00
David Carlier 8b16715d40 adding getopt_long for unixes. 2022-12-01 12:34:38 +00:00
bors f0e6c80e39 Auto merge of #3023 - asomers:copy_file_range, r=JohnTitor
Enable copy_file_range on FreeBSD

PR #2479 did this, but only in the freebsd13 and freebsd14 modules, which was incorrect.  Those modules should only be used for functions that change across FreeBSD versions, and therefore need different ELF symbol versions.  Functions that were newly added since FreeBSD 11 can still go in the base freebsd module.  It will cause no problems for them to be there, and users will see an error at link time if they try to use such a function in an environment that is too old to support it.
2022-11-30 22:57:15 +00:00
Alan Somers e0cd169455 Enable copy_file_range on FreeBSD
PR #2479 did this, but only in the freebsd13 and freebsd14 modules,
which was incorrect.  Those modules should only be used for functions
that change across FreeBSD versions, and therefore need different ELF
symbol versions.  Functions that were newly added since FreeBSD 11 can
still go in the base freebsd module.  It will cause no problems for them
to be there, and users will see an error at link time if they try to
use such a function in an environment that is too old to support it.
2022-11-30 10:13:28 -07:00
bors 3d514980c6 Auto merge of #3022 - asomers:capsicum, r=JohnTitor
Add more capsicum functions for FreeBSD

These have all been available since at least FreeBSD 9.2.
2022-11-30 12:44:39 +00:00
bors 7e14ba55f0 Auto merge of #3003 - devnexen:musl_pidfd_nonblock, r=JohnTitor
linux musl adding `PIDFD_NONBLOCK` constant.

closes #3002
2022-11-30 11:24:00 +00:00
Alan Somers 82865f1cda Add FreeBSD's capsicum functions to semver 2022-11-29 17:14:34 -07:00
David Carlier ad6842c0cc linux musl adding PIDFD_NONBLOCK constant.
closes #3002
2022-11-20 12:08:06 +00:00
bors d75e23a16f Auto merge of #2995 - carbotaniuman:rand48, r=JohnTitor
Add rand48 functions
2022-11-20 03:28:04 +00:00
carbotaniuman 3bf74363fe Add rand48 functions 2022-11-20 12:09:29 +09:00
David CARLIER c28d69b720 freebsd subset of memstat api addition 2022-11-13 17:45:38 +00:00
bors 68123c7bae Auto merge of #2992 - devnexen:fbsd_procctl_upd, r=JohnTitor
freebsd procctl flags update
2022-11-10 11:38:33 +00:00
bors be6337a4c6 Auto merge of #2991 - SteveLauC:extattr_list_xx-on-NetBSD, r=JohnTitor
add extattr_list_xxx() on NetBSD

Corresponds to [this](https://github.com/NetBSD/src/blob/ac36f3f9fee8aff1c69d653503149faaa531f752/sys/sys/extattr.h#L98-L103):
```c
ssize_t	extattr_list_fd(int _fd, int _attrnamespace, void *_data,
	    size_t _nbytes);
ssize_t	extattr_list_file(const char *_path, int _attrnamespace, void *_data,
	    size_t _nbytes);
ssize_t	extattr_list_link(const char *_path, int _attrnamespace, void *_data,
	    size_t _nbytes);
```
2022-11-07 22:58:13 +00:00
David CARLIER fb2a528cc1 freebsd procctl flags update 2022-11-07 21:48:32 +00:00
bors 86a5fa0837 Auto merge of #2984 - spencercw:android-uinput, r=JohnTitor
Add Android uinput bindings

This is mostly copied from the Linux bindings.
2022-11-07 21:46:31 +00:00
Chris Spencer 69b37b91df Add Android uinput bindings 2022-11-07 10:19:09 +00:00
Steve Lau a472dc4dd1 bump to 0.2.138 2022-11-06 10:05:43 +08:00
Steve Lau 8f6b4c31a4 add extattr_list_xxx() on NetBSD 2022-11-03 20:30:50 +08:00
Steve Lau 72d2d0fc5f add extended attributes constants on NetBSD 2022-11-02 17:05:31 +08:00
David Tolnay 3c611ca724 Add FICLONE ioctl for linux aarch64 2022-10-31 15:34:21 -07:00
Harvey Hunt 807793be8b linux: Add POSIX_SPAWN_SETSID flag
This flag allows the child process created by POSIX spawn to create
a new session and become leader of a new process group. Expose the
flag so that Rust code can use it.
2022-10-26 21:22:31 +01:00
Yuki Okushi ca19134d82 Prepare 0.2.137 releaase
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-10-26 06:44:24 +09:00
bors 1cef92b1d0 Auto merge of #2979 - redox-os:redox-0.2.136, r=JohnTitor
Add MADV constants for Redox

Required for `memmap2` crate
2022-10-25 14:28:06 +00:00
bors c06371d3b5 Auto merge of #2974 - SteveLauC:dirname-basename, r=JohnTitor
add dirname and basename

This PR adds `dirname(3)` and `basename(3)` on the following platforms:
* Linux with glibc
* Linux with musl
* Android
* FreeBSD
* DragonFlyBSD
* NetBSD
* OpenBSD
* Apple platforms

I tested this PR on my host machine (Linux with glibc), and got the following error:
```
RUNNING ALL TESTS
bad basename function pointer: rust: 140093945892128 (0x7f6a29e14d20) != c 140093945544944 (0x7f6a29dc00f0)
thread 'main' panicked at 'some tests failed', /home/steve/Documents/workspace/libc/target/debug/build/libc-test-592f01d15ee93e7a/out/main.rs:12:21
stack backtrace:
   0: std::panicking::begin_panic
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:616:12
   1: main::main
             at /home/steve/Documents/workspace/libc/target/debug/build/libc-test-592f01d15ee93e7a/out/main.rs:12:21
   2: core::ops::function::FnOnce::call_once
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: test failed, to rerun pass '--test main'
```
The reason for this error probably is that there are two `basename(3)` on Linux with glibc, the  POSIX version and the GNU version, and they clash with each other. In C, if one `#include <libgen.h>`, then the POSIX version will be available; If one ` #define _GNU_SOURCE` and `#include <string.h>`, then the GNU one will be used.

Can we distinguish them in `libc`?
2022-10-25 10:41:18 +00:00
Yuki Okushi 2251c71c7a Ignore res_init test on macOS
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-10-25 17:15:16 +09:00
Jeremy Soller 09286ba536 Add MADV constants for Redox 2022-10-24 21:13:41 -06:00
Steve Lau 4b8e8bc563 expose dirname and basename 2022-10-25 08:04:54 +08:00
Yuki Okushi 15c93b0e91 Prepare 0.2.136 release
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-10-24 18:31:31 +09:00
Alan Somers 9e1c66989d Add new definitions to libc-test/semver 2022-10-22 19:54:28 -06:00
bors 187433a8e4 Auto merge of #2968 - name1e5s:macos_clocks, r=JohnTitor
add missing clockid_t on macOS

See https://github.com/apple-open-source-mirror/Libc/blob/master/include/time.h#L205
2022-10-18 23:40:30 +00:00
bors 458365f557 Auto merge of #2966 - redox-os:redox-0.2.135, r=JohnTitor
Redox updates

Adds some missing constants and functions for Redox
2022-10-18 22:36:41 +00:00
name1e5s c35ea848b8 remove redunant definition of CLOCK_UPTIME_RAW 2022-10-18 22:59:47 +08:00
Jeremy Soller 98e31aea16 redox: Add ENOTSUP, FIONREAD, MSG_DONTWAIT, and madvise 2022-10-18 08:28:09 -06:00
bors edb92c9856 Auto merge of #2967 - devnexen:missing_ioctl_sioc_flags, r=JohnTitor
linux add missing SIOC* constants.

close #2909.
2022-10-18 12:29:56 +00:00
Sébastien Marie c3c6893e41 add new constants to openbsd.txt 2022-10-18 04:45:05 +00:00
yuhaixin.hx fe1c0bc329 add missing clockid_t on macOS 2022-10-18 10:36:39 +08:00
David Carlier fa7d301a7b linux add missing SIOC* constants.
close #2909.
2022-10-17 23:11:29 +01:00
bors 77f6b9f6d7 Auto merge of #2964 - devnexen:win32_putenv, r=JohnTitor
adds putenv call to win32.

closes #2926.
2022-10-16 22:46:53 +00:00