Commit graph

6051 commits

Author SHA1 Message Date
Harvey Hunt 36aa6ca39c 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
bors a90993ec23 Auto merge of #2982 - JohnTitor:release-0.2.137, r=JohnTitor
Prepare 0.2.137 release

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-10-25 21:45:00 +00:00
Yuki Okushi 2cd24f52db
Prepare 0.2.137 releaase
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-10-26 06:44:24 +09:00
bors 7e8f84c2bb 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
Takayuki Nakata e206853f48 Fix typo: readfs -> readfds 2022-10-25 22:06:27 +09:00
bors a8b7b9c592 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
bors 3cdabffc40 Auto merge of #2978 - devnexen:musl_emscripten_msg_constants, r=JohnTitor
follow-up on #2963, changing MSG* constant types for musl/emscripten.
2022-10-25 09:34:45 +00:00
bors 3ee203bc63 Auto merge of #2980 - JohnTitor:ignore-res-init-macos, r=JohnTitor
Ignore `res_init` test on macOS

This addresses the below failure:

```
 = note: Undefined symbols for architecture x86_64:
            "_res_9_init", referenced from:
                main::fn_res_init::h8e336279ac8061c4 in main-00bd2ff8180a104c.3yxb2bpe56zwhp2u.rcgu.o
                ___test_fn_res_init in libmain.a(main.o)
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-10-25 08:24:59 +00:00
Yuki Okushi 8081c99181
Ignore res_init test on macOS
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-10-25 17:15:16 +09:00
David Carlier 4ba884ac18 follow-up on #2963, changing MSG* constant types for musl/emscripten. 2022-10-25 06:42:47 +01:00
Jeremy Soller f9d1f3ed1d Add MADV constants for Redox 2022-10-24 21:13:41 -06:00
Steve Lau 5ffdbc6847 expose dirname and basename 2022-10-25 08:04:54 +08:00
Eric Huss 8e874bdf8e Migrate from highfive to triagebot 2022-10-24 10:11:05 -07:00
bors 09ad0b37f3 Auto merge of #2975 - JohnTitor:release-0.2.136, r=JohnTitor
Prepare 0.2.136 release

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-10-24 09:47:29 +00:00
Yuki Okushi 5e3c7089fc
Prepare 0.2.136 release
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-10-24 18:31:31 +09:00
bors 71b864d377 Auto merge of #2969 - pfmooney:illumos-aout, r=JohnTitor
illumos: Remove obsolete (and private) a.out define

This cleans up an obsolete definition which [has been removed](fec0470817 (diff-33b9ac79706b16f65c95e909fde32771b388f896bee74a006d13fefdf877fe91L163)) in upstream illumos, and thus is causing libc-test to fail on up-to-date machines.
2022-10-23 03:34:16 +00:00
bors cc19b6f080 Auto merge of #2973 - asomers:MNT_bsd, r=JohnTitor
Add more MNT_ flags on {Dragonfly,Net,Open}BSD
2022-10-23 02:31:21 +00:00
Alan Somers 8acaac5ddf Add new definitions to libc-test/semver 2022-10-22 19:54:28 -06:00
bors a59c842948 Auto merge of #2963 - devnexen:recvmsg_linux_fix, r=JohnTitor
linux fixes recvmmsg flags type for musl/emscripten.

closes #2945
2022-10-23 00:28:31 +00:00
Alan Somers cfa31165a9 Style fixes, and filter out duplicate definitions 2022-10-22 10:23:26 -06:00
Alan Somers 138202dae5 Add more MNT_ flags on {Dragonfly,Net,Open}BSD 2022-10-22 09:22:05 -06:00
David Carlier 00204b0e20 warns that in the near future the MSG_* constants will have
a type change to fit Musl and Emscripten.

close #2945.
2022-10-22 08:14:24 +01:00
bors 0488a83dc9 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 e96f3abac8 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 35e3a431c3 remove redunant definition of CLOCK_UPTIME_RAW 2022-10-18 22:59:47 +08:00
Jeremy Soller c09d65f7fb
redox: Add ENOTSUP, FIONREAD, MSG_DONTWAIT, and madvise 2022-10-18 08:28:09 -06:00
bors 9bff92d2a9 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
bors 1e07687d27 Auto merge of #2965 - semarie:locale, r=JohnTitor
openbsd: add more locale constants for use with newlocale()
2022-10-18 11:25:52 +00:00
bors ce0d4079b2 Auto merge of #2970 - pfmooney:solarish-libsendfile, r=JohnTitor
solarish: Fix libsendfile symbol dependency

A number of function symbols were erroneously grouped under the `libsendfile` link section.  This should correct the situation.
2022-10-18 10:20:22 +00:00
Sébastien Marie 21f11f3507 add new constants to openbsd.txt 2022-10-18 04:45:05 +00:00
Patrick Mooney bb881547ca illumos: Remove obsolete (and private) a.out define 2022-10-17 23:23:29 -05:00
yuhaixin.hx de1de5a078 add missing clockid_t on macOS 2022-10-18 10:36:39 +08:00
David Carlier c6a69a3e85 linux add missing SIOC* constants.
close #2909.
2022-10-17 23:11:29 +01:00
Patrick Mooney 3edc2a3e33 solarish: Fix libsendfile symbol dependency 2022-10-17 13:37:14 -05:00
Sébastien Marie 75224dd1cf openbsd: add more locale constants for use with newlocale() 2022-10-17 16:06:41 +00:00
bors 998e88630e Auto merge of #2964 - devnexen:win32_putenv, r=JohnTitor
adds putenv call to win32.

closes #2926.
2022-10-16 22:46:53 +00:00
bors 937aeaafe4 Auto merge of #2960 - folkertdev:linux-ifreq, r=JohnTitor
implement ifreq for linux

defines the `ifreq` struct, for use with `ioctl`. I used the definition from the [manpages](https://man7.org/linux/man-pages/man7/netdevice.7.html)
2022-10-16 21:39:34 +00:00
Folkert 72667185f6
add ifreq and friends for linux 2022-10-16 15:05:59 +02:00
David Carlier 44450feaff adds putenv call to win32.
closes #2926.
2022-10-16 12:04:09 +01:00
bors e4e865d1c3 Auto merge of #2958 - thomcc:tvos-support, r=JohnTitor
Add support for tvOS

This is essentially identical to the iOS support, as the OS is... essentially identical to iOS.
2022-10-13 01:28:06 +00:00
bors 9960e1cdcc Auto merge of #2957 - SteveLauC:time-fn, r=JohnTitor
add some time functions on glibc and musl

#### man pages

* [asctime/ctime man page](https://man7.org/linux/man-pages/man3/ctime.3.html)
* [strftime](https://man7.org/linux/man-pages/man3/strftime.3.html)
* [strptime](https://man7.org/linux/man-pages/man3/strptime.3.html)

I didn't add `ctime()/ctime_r()` on musl because they involve the `time_t` type, which elicits [a deprecation wraning](https://github.com/rust-lang/libc/pull/1956).

Is it fine to add these two functions on `musl`, they will have the same definitions  as the `glibc` ones:
```rust
pub fn ctime(timep: *const time_t) -> *mut ::c_char;
pub fn ctime_r(timep: *const time_t, buf: *mut ::c_char) -> *mut ::c_char;
```
If it's ok, I will add them:)
2022-10-13 00:22:29 +00:00
bors 80b2ede677 Auto merge of #2959 - JohnTitor:exclude-more-android, r=JohnTitor
Ignore `arm-linux-androideabi` on bors

r? `@ghost`
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-10-12 23:15:28 +00:00
Yuki Okushi c04ecd499d
Ignore arm-linux-androideabi on bors
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-10-13 08:14:51 +09:00
Steve Lau bfc406468a some time functions on glibc and musl 2022-10-12 08:28:22 +08:00
Thom Chiovoloni bf618c96af
Add support for tvos 2022-10-11 17:05:58 -07:00
bors 88b2ed287f Auto merge of #2951 - MrCroxx:xx/bump-to-135, r=JohnTitor
Bump to 0.2.135

I'm going to make a new release as requested by https://github.com/nix-rust/nix/pull/1743#issuecomment-1272269999 .
2022-10-10 07:12:07 +00:00
bors 49c5419b3a Auto merge of #2954 - JohnTitor:ignore-i686-android, r=JohnTitor
Ignore `i686-linux-android` on bors

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
r? `@ghost`
2022-10-10 03:53:55 +00:00
Yuki Okushi 424a5892ea
Ignore Android targets on bors
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-10-10 11:49:41 +09:00
bors fe4f6d7bcf Auto merge of #2952 - SteveLauC:eaccess-on-freebsd-and-dragonfly, r=JohnTitor
add eaccess on freebsd and dragonfly

[man page of freebsd](https://www.freebsd.org/cgi/man.cgi?query=eaccess&sektion=2&n=1)
[man page of dragonfly](https://man.dragonflybsd.org/?command=access&section=2)
2022-10-10 00:32:44 +00:00
bors 0f5ee7a807 Auto merge of #2953 - SteveLauC:faccessat-on-illumos-and-solaris, r=JohnTitor
add faccessat on illumos/solaris and euidaccess on solaris

[`faccessat` man page of illumos](https://illumos.org/man/2/faccessat)

[`faccessat` and `euidaccess` man page of solaris](https://docs.oracle.com/cd/E88353_01/html/E37841/access-2.html)
2022-10-09 16:37:38 +00:00