Skip to content

Commit 539e7e7

Browse files
authored
Merge pull request rust-lang#4032 from tgross35/backport-radicchio
[0.2] Backports
2 parents 2a84617 + 02139a4 commit 539e7e7

File tree

14 files changed

+115
-28
lines changed

14 files changed

+115
-28
lines changed

.cirrus.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
11
task:
22
only_if: $CIRRUS_BRANCH == 'main' || $CIRRUS_BASE_BRANCH == 'libc-0.2' || $CIRRUS_BASE_BRANCH == 'main'
3+
env:
4+
HOME: /tmp # cargo cache needs it
5+
TARGET: x86_64-unknown-freebsd
36
matrix:
4-
- name: nightly freebsd-13
7+
- name: nightly freebsd-13 i686
8+
# Test i686 FreeBSD in 32-bit emulation on a 64-bit host.
9+
env:
10+
TARGET: i686-unknown-freebsd
511
freebsd_instance:
612
image_family: freebsd-13-3
7-
- name: nightly freebsd-14
13+
- name: nightly freebsd-13 x86_64
814
freebsd_instance:
9-
image: freebsd-14-0-release-amd64-ufs
10-
- name: nightly freebsd-15
15+
image_family: freebsd-13-3
16+
- name: nightly freebsd-14 x86_64
17+
freebsd_instance:
18+
image: freebsd-14-1-release-amd64-ufs
19+
- name: nightly freebsd-15 x86_64
1120
freebsd_instance:
1221
image_family: freebsd-15-0-snap
1322
setup_script:
1423
- pkg install -y libnghttp2 curl
1524
- curl https://sh.rustup.rs -sSf --output rustup.sh
1625
- sh rustup.sh -y --default-toolchain nightly --profile=minimal
26+
- . $HOME/.cargo/env
27+
- if [ "$TARGET" = "i686-unknown-freebsd" ]; then rustup target add i686-unknown-freebsd; fi
1728
test_script:
1829
- . $HOME/.cargo/env
19-
- LIBC_CI=1 sh ci/run.sh x86_64-unknown-freebsd
20-
- sh ci/run.sh x86_64-unknown-freebsd
30+
- LIBC_CI=1 sh ci/run.sh $TARGET
31+
- sh ci/run.sh $TARGET

ci/style.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ else
1818
exit 1
1919
fi
2020

21+
# Ensure that `sort` output is not locale-dependent
22+
export LC_ALL=C
23+
2124
for file in libc-test/semver/*.txt; do
2225
case "$file" in
2326
*TODO*) continue ;;

libc-test/semver/apple.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1911,7 +1911,6 @@ clock_getres
19111911
clonefile
19121912
clonefileat
19131913
cmsghdr
1914-
confstr
19151914
connectx
19161915
copyfile
19171916
copyfile_callback_t

libc-test/semver/linux-gnu.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,8 @@ XSK_UNALIGNED_BUF_ADDR_MASK
505505
XSK_UNALIGNED_BUF_OFFSET_SHIFT
506506
_CS_GNU_LIBC_VERSION
507507
_CS_GNU_LIBPTHREAD_VERSION
508-
_CS_PATH
508+
_CS_V6_ENV
509+
_CS_V7_ENV
509510
_SC_2_C_VERSION
510511
_SC_BASE
511512
_SC_CHARCLASS_NAME_MAX
@@ -608,7 +609,6 @@ asctime_r
608609
backtrace
609610
clock_adjtime
610611
close_range
611-
confstr
612612
copy_file_range
613613
ctermid
614614
ctime_r

libc-test/semver/linux-musl.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ XDP_USE_SG
6060
XDP_ZEROCOPY
6161
XSK_UNALIGNED_BUF_ADDR_MASK
6262
XSK_UNALIGNED_BUF_OFFSET_SHIFT
63+
_CS_V6_ENV
64+
_CS_V7_ENV
6365
adjtimex
6466
aio_cancel
6567
aio_error

libc-test/semver/linux.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3326,6 +3326,42 @@ XATTR_REPLACE
33263326
XTABS
33273327
YESEXPR
33283328
YESSTR
3329+
_CS_PATH
3330+
_CS_POSIX_V5_WIDTH_RESTRICTED_ENVS
3331+
_CS_POSIX_V6_ILP32_OFF32_CFLAGS
3332+
_CS_POSIX_V6_ILP32_OFF32_LDFLAGS
3333+
_CS_POSIX_V6_ILP32_OFF32_LIBS
3334+
_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
3335+
_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
3336+
_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
3337+
_CS_POSIX_V6_ILP32_OFFBIG_LIBS
3338+
_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
3339+
_CS_POSIX_V6_LP64_OFF64_CFLAGS
3340+
_CS_POSIX_V6_LP64_OFF64_LDFLAGS
3341+
_CS_POSIX_V6_LP64_OFF64_LIBS
3342+
_CS_POSIX_V6_LP64_OFF64_LINTFLAGS
3343+
_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
3344+
_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
3345+
_CS_POSIX_V6_LPBIG_OFFBIG_LIBS
3346+
_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
3347+
_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS
3348+
_CS_POSIX_V7_ILP32_OFF32_CFLAGS
3349+
_CS_POSIX_V7_ILP32_OFF32_LDFLAGS
3350+
_CS_POSIX_V7_ILP32_OFF32_LIBS
3351+
_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS
3352+
_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
3353+
_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
3354+
_CS_POSIX_V7_ILP32_OFFBIG_LIBS
3355+
_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS
3356+
_CS_POSIX_V7_LP64_OFF64_CFLAGS
3357+
_CS_POSIX_V7_LP64_OFF64_LDFLAGS
3358+
_CS_POSIX_V7_LP64_OFF64_LIBS
3359+
_CS_POSIX_V7_LP64_OFF64_LINTFLAGS
3360+
_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
3361+
_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
3362+
_CS_POSIX_V7_LPBIG_OFFBIG_LIBS
3363+
_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
3364+
_CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
33293365
_IOFBF
33303366
_IOLBF
33313367
_IONBF

libc-test/semver/unix.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ clockid_t
492492
close
493493
closedir
494494
closelog
495+
confstr
495496
connect
496497
creat
497498
dev_t

src/unix/bsd/apple/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5657,11 +5657,6 @@ extern "C" {
56575657
pub fn fchflags(fd: ::c_int, flags: ::c_uint) -> ::c_int;
56585658
pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
56595659
pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
5660-
#[cfg_attr(
5661-
all(target_os = "macos", target_arch = "x86"),
5662-
link_name = "confstr$UNIX2003"
5663-
)]
5664-
pub fn confstr(name: ::c_int, buf: *mut ::c_char, len: ::size_t) -> ::size_t;
56655660
pub fn lio_listio(
56665661
mode: ::c_int,
56675662
aiocb_list: *const *mut aiocb,

src/unix/hurd/align.rs

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/unix/hurd/mod.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ pub type __ptrdiff_t = __sword_type;
7272
pub type __socklen_t = __u32_type;
7373
pub type __sig_atomic_t = ::c_int;
7474
pub type __time64_t = __int64_t;
75-
pub type ssize_t = __ssize_t;
7675
pub type wchar_t = ::c_int;
7776
pub type wint_t = ::c_uint;
7877
pub type gid_t = __gid_t;
@@ -4676,16 +4675,6 @@ safe_f! {
46764675
}
46774676
}
46784677

4679-
cfg_if! {
4680-
if #[cfg(libc_align)] {
4681-
mod align;
4682-
pub use self::align::*;
4683-
} else {
4684-
mod no_align;
4685-
pub use self::no_align::*;
4686-
}
4687-
}
4688-
46894678
cfg_if! {
46904679
if #[cfg(target_pointer_width = "64")] {
46914680
mod b64;

0 commit comments

Comments
 (0)