Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/libc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.2.125
Choose a base ref
...
head repository: rust-lang/libc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.2.126
Choose a head ref

Commits on Apr 11, 2022

  1. Add android x86_64 user struct

    s1341 committed Apr 11, 2022
    Copy the full SHA
    fd64756 View commit details
  2. Copy the full SHA
    ac2785e View commit details
  3. Add GETREGS/SETREGS for android

    s1341 committed Apr 11, 2022
    Copy the full SHA
    775936e View commit details

Commits on Apr 14, 2022

  1. Copy the full SHA
    a498085 View commit details

Commits on Apr 25, 2022

  1. Copy the full SHA
    f9dd83b View commit details

Commits on Apr 30, 2022

  1. haiku build fix

    devnexen committed Apr 30, 2022
    Copy the full SHA
    9bf2fb0 View commit details
  2. openbsd: constantify some arguments of openpty() and forkpty()

    OpenBSD recently made termp and winp arguments of openpty() and forkpty() const. 
    to match the prototypes in glibc and musl libc.
    semarie committed Apr 30, 2022
    Copy the full SHA
    90fb41c View commit details
  3. linux: add GRND_INSECURE constant

    This is available on kernels ≥5.6 and was added to glibc in 2.32.
    zx2c4 committed Apr 30, 2022
    Copy the full SHA
    552d131 View commit details
  4. Update GitHub Actions actions/checkout@v2 to v3

    The v2 implementation uses Node 12, which is end-of-life on April 30, 2022.
    See https://nodejs.org/en/about/releases/. Update to v3, which is based on
    Node 16 whose support lasts until April 30, 2024.
    dtolnay committed Apr 30, 2022
    Copy the full SHA
    449edcf View commit details
  5. Auto merge of #2774 - dtolnay-contrib:checkoutv3, r=Amanieu

    Update GitHub Actions actions/checkout@v2 to v3
    
    The v2 implementation uses Node 12, which is end-of-life on April 30, 2022. See https://nodejs.org/en/about/releases/. Update to v3, which is based on Node 16 whose support lasts until April 30, 2024.
    
    They made this a major version change (v2 to v3) because old GitHub Enterprise versions aren't necessarily compatible with Node 16, but for github.com-supplied runners (SaaS) there is no practical difference.
    bors committed Apr 30, 2022
    Copy the full SHA
    42faa24 View commit details

Commits on May 1, 2022

  1. More long fixes

    s1341 committed May 1, 2022
    Copy the full SHA
    c0844c3 View commit details

Commits on May 2, 2022

  1. add malloc_usable_size for musl

    jjl committed May 2, 2022
    Copy the full SHA
    f5d7ab8 View commit details

Commits on May 5, 2022

  1. Remove FreeBSD 11 from CI

    FreeBSD 11 is EOL and packages for it are no longer provided, which
    causes the CI job to fail.
    Amanieu committed May 5, 2022
    Copy the full SHA
    b38ca80 View commit details
  2. Auto merge of #2779 - Amanieu:remove_freebsd11, r=Amanieu

    Remove FreeBSD 11 from CI
    
    FreeBSD 11 is EOL and packages for it are no longer provided, which causes the CI job to fail.
    
    cc `@asomers`
    bors committed May 5, 2022
    Copy the full SHA
    5ac0884 View commit details
  3. Enable aio_{read,write}v on FreeBSD

    When I originally added these symbols, I put them in the freebsd13
    module.  But I needn't have, since they didn't change any existing
    symbols.  Instead, as totally new symbols, they should've gone into the
    freebsd module.  This way they can actually be used.
    asomers committed May 5, 2022
    Copy the full SHA
    fb965d3 View commit details
  4. Copy the full SHA
    853f70c View commit details
  5. Auto merge of #2743 - zx2c4-forks:grnd_insecure, r=Amanieu

    linux: add GRND_INSECURE constant
    
    This is available on kernels ≥5.6.
    bors committed May 5, 2022
    Copy the full SHA
    dcd0a69 View commit details
  6. Auto merge of #2772 - devnexen:haiku_build_fix2, r=Amanieu

    haiku build fix
    bors committed May 5, 2022
    Copy the full SHA
    01d1fcf View commit details
  7. Auto merge of #2773 - semarie:openbsd-const, r=Amanieu

    openbsd: constantify some arguments of openpty() and forkpty()
    
    OpenBSD recently made `termp` and `winp` arguments of `openpty()` and `forkpty()` const.
    to match the prototypes in glibc and musl libc.
    
    It was done in [following commit](openbsd/src@78fa49e), which will be part of OpenBSD 7.2 .
    bors committed May 5, 2022
    Copy the full SHA
    9a6c13a View commit details
  8. Auto merge of #2775 - asomers:aio_writev2, r=Amanieu

    Enable aio_{read,write}v on FreeBSD
    
    When I originally added these symbols, I put them in the freebsd13
    module.  But I needn't have, since they didn't change any existing
    symbols.  Instead, as totally new symbols, they should've gone into the
    freebsd module.  This way they can actually be used.
    bors committed May 5, 2022
    Copy the full SHA
    e53cf4f View commit details
  9. Auto merge of #2776 - cww0614:socks_txtime_mips_musl, r=Amanieu

    Enable sock_txtime on mips musl target
    
    The struct and related constants were originally added in #2415. But they weren't enabled for mips musl target because the kernel version of the build image was old and they couldn't pass the build. Now the kernel version of the build image is already updated and I think we could enable them for mips musl target
    bors committed May 5, 2022
    Copy the full SHA
    7b5afd2 View commit details
  10. Auto merge of #2777 - jjl:musl-malloc_usable_size, r=Amanieu

    add malloc_usable_size for musl
    bors committed May 5, 2022
    Copy the full SHA
    78d6835 View commit details

Commits on May 7, 2022

  1. Fix definition of kevent.data on FreeBSD 12+

    FreeBSD 12 changed this field from intptr_t to __int64_t
    asomers committed May 7, 2022
    Copy the full SHA
    3608a81 View commit details
  2. Add LIO_READV and LIO_WRITEV on FreeBSD

    They are used along with lio_listio for non-POSIX vectored operations.
    asomers committed May 7, 2022
    Copy the full SHA
    5768391 View commit details
  3. Copy the full SHA
    dbe3c5a View commit details

Commits on May 8, 2022

  1. Copy the full SHA
    1c5bc66 View commit details
  2. Auto merge of #2784 - nmeum:riscv64-enotsup, r=Amanieu

    Add ENOTSUP constant for riscv64 musl
    
    Previously:
    
    * #2595
    * #1971
    * #448
    
    but not of these added the constant for riscv64 musl and rustc itself seems to use it nowadays.
    bors committed May 8, 2022
    Copy the full SHA
    4f88b8d View commit details

Commits on May 9, 2022

  1. Auto merge of #2780 - asomers:LIO_READV, r=Amanieu

    Add LIO_READV and LIO_WRITEV on FreeBSD
    
    They are used along with lio_listio for non-POSIX vectored operations.
    bors committed May 9, 2022
    Copy the full SHA
    bdf2f4c View commit details
  2. Auto merge of #2782 - asomers:kevent-data, r=Amanieu

    Fix definition of kevent.data on 32-bit FreeBSD 12+
    
    FreeBSD 12 changed this field from intptr_t to __int64_t
    bors committed May 9, 2022
    Copy the full SHA
    4d72a19 View commit details
  3. Auto merge of #2783 - Freaky:dfbsd_kinfo_proc, r=Amanieu

    Add DragonFlyBSD kinfo_proc and kinfo_lwp structs
    
    This adds the aforementioned structs and a few supporting enums and constants.
    
    I added the structs to semvar - contribution guidelines also say to add constants (and presumably enums) but I don't see this done for similar values to the ones I added so I'm unclear if there's some subtlety to this I'm missing.
    
    One field is also expected to be rounded up to the nearest sizeof(long).  Rather than worry about cfg() or whether I can use const size_of, I just assumed 8 bytes, as DragonFly's last 32-bit release was nearly 8 years ago.
    bors committed May 9, 2022
    Copy the full SHA
    a72d300 View commit details
  4. Move user struct into x86_64

    s1341 committed May 9, 2022
    Copy the full SHA
    b484a8d View commit details

Commits on May 10, 2022

  1. Add OpenBSD kinfo_proc struct

    Freaky committed May 10, 2022
    Copy the full SHA
    ae7a8f8 View commit details

Commits on May 11, 2022

  1. Promote pthread_getname_np and pthread_setname_np from glibc to linux

    musl libc added pthread_setname_np in 1.1.16 and pthread_getname_np
    in 1.2.3, and uClibc has had them since v1.0.20.
    colincross committed May 11, 2022
    Copy the full SHA
    af887f0 View commit details
  2. Auto merge of #2786 - Freaky:openbsd_kinfo_proc, r=Amanieu

    Add OpenBSD kinfo_proc struct
    bors committed May 11, 2022
    Copy the full SHA
    c3e4df1 View commit details
  3. Auto merge of #2748 - s1341:add_android_x86_64_user_struct, r=Amanieu

    Add android x86_64 user struct
    
    This PR adds the `user`, `user_regs_struct` and `user_fpregs_struct` structures to android x86_64
    bors committed May 11, 2022
    Copy the full SHA
    454fb0e View commit details
  4. Auto merge of #2768 - colincross:pthread_setname_np, r=Amanieu

    Promote pthread_getname_np and pthread_setname_np from glibc to linux
    
    musl libc added pthread_setname_np in 1.1.16 and pthread_getname_np
    in 1.2.3, and uClibc has had them since v1.0.20.
    bors committed May 11, 2022
    Copy the full SHA
    cd99f68 View commit details

Commits on May 15, 2022

  1. Bump version to 0.2.126

    s1341 committed May 15, 2022
    Copy the full SHA
    cf1ccd8 View commit details

Commits on May 16, 2022

  1. Allow unused macro rules

    Amanieu committed May 16, 2022
    Copy the full SHA
    b3b81a7 View commit details
  2. Auto merge of #2790 - Amanieu:fix-macro-rules-lint, r=Amanieu

    Allow unused macro rules
    bors committed May 16, 2022
    Copy the full SHA
    affe51f View commit details
  3. Auto merge of #2789 - s1341:bump_version_to_0_2_126, r=Amanieu

    Bump version to 0.2.126
    bors committed May 16, 2022
    Copy the full SHA
    5add164 View commit details
15 changes: 0 additions & 15 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
task:
name: stable x86_64-unknown-freebsd-11
freebsd_instance:
image: freebsd-11-4-release-amd64
setup_script:
- pkg install -y curl
- curl https://sh.rustup.rs -sSf --output rustup.sh
- sh rustup.sh -y --profile=minimal
- . $HOME/.cargo/env
- rustup --version
test_script:
- . $HOME/.cargo/env
- LIBC_CI=1 sh ci/run.sh x86_64-unknown-freebsd
- sh ci/run.sh x86_64-unknown-freebsd

task:
name: nightly x86_64-unknown-freebsd-12
freebsd_instance:
26 changes: 13 additions & 13 deletions .github/workflows/bors.yml
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ jobs:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Rust toolchain
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
- name: Execute run-docker.sh
@@ -40,7 +40,7 @@ jobs:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Rust toolchain
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
- name: Execute run.sh
@@ -71,7 +71,7 @@ jobs:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Self-update rustup
run: rustup self update
shell: bash
@@ -89,7 +89,7 @@ jobs:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Rust toolchain
run: sh ./ci/install-rust.sh
- name: Check style
@@ -145,7 +145,7 @@ jobs:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Rust toolchain
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
- name: Execute run-docker.sh
@@ -169,7 +169,7 @@ jobs:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Rust toolchain
run: TOOLCHAIN=nightly INSTALL_RUST_SRC=1 sh ./ci/install-rust.sh
- name: Execute run-docker.sh
@@ -184,7 +184,7 @@ jobs:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Rust toolchain
run: sh ./ci/install-rust.sh
- name: Execute run-docker.sh
@@ -214,7 +214,7 @@ jobs:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Rust toolchain
run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/install-rust.sh
- name: Execute build.sh
@@ -244,7 +244,7 @@ jobs:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Rust toolchain
run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/install-rust.sh
- name: Execute build.sh
@@ -266,7 +266,7 @@ jobs:
stable,
]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Self-update rustup
run: rustup self update
shell: bash
@@ -280,7 +280,7 @@ jobs:
runs-on: ubuntu-20.04
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Rust toolchain
# Should update the semverver revision in semver.sh if we touch nightly ver.
run: TOOLCHAIN=nightly-2021-09-30 sh ./ci/install-rust.sh
@@ -293,7 +293,7 @@ jobs:
runs-on: macos-11
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Rust toolchain
# Pin nightly version to make semverver compilable.
run: TOOLCHAIN=nightly-2021-09-30 sh ./ci/install-rust.sh
@@ -308,7 +308,7 @@ jobs:
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Rust toolchain
run: sh ./ci/install-rust.sh
- name: Generate documentation
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ jobs:
if: github.repository == 'rust-lang/libc'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Rust toolchain
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ jobs:
x86_64-unknown-linux-gnu,
]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Rust toolchain
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
- name: Execute run-docker.sh
@@ -35,7 +35,7 @@ jobs:
x86_64-apple-darwin,
]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Rust toolchain
run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
- name: Execute run.sh
@@ -63,7 +63,7 @@ jobs:
# ARCH: i686
- target: i686-pc-windows-msvc
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Self-update rustup
run: rustup self update
shell: bash
@@ -78,7 +78,7 @@ jobs:
name: Style check
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Rust toolchain
run: sh ./ci/install-rust.sh
- name: Check style
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libc"
version = "0.2.125"
version = "0.2.126"
authors = ["The Rust Project Developers"]
license = "MIT OR Apache-2.0"
readme = "README.md"
4 changes: 2 additions & 2 deletions libc-test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libc-test"
version = "0.2.125"
version = "0.2.126"
authors = ["The Rust Project Developers"]
license = "MIT OR Apache-2.0"
build = "build.rs"
@@ -12,7 +12,7 @@ A test crate for the libc crate.

[dependencies.libc]
path = ".."
version = "0.2.125"
version = "0.2.126"
default-features = false

[build-dependencies]
14 changes: 14 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
@@ -1732,6 +1732,9 @@ fn test_android(target: &str) {
// linux 5.12 min
"MPOL_F_NUMA_BALANCING" => true,

// GRND_INSECURE was added in platform-tools-30.0.0
"GRND_INSECURE" => true,

_ => false,
}
});
@@ -2251,6 +2254,9 @@ fn test_freebsd(target: &str) {
true
}

// Added in FreeBSD 14
"LIO_READV" | "LIO_WRITEV" | "LIO_VECTORED" if Some(14) > freebsd_ver => true,

_ => false,
}
});
@@ -2352,6 +2358,8 @@ fn test_freebsd(target: &str) {

// Added in FreeBSD 13.
"getlocalbase" if Some(13) > freebsd_ver => true,
"aio_readv" if Some(13) > freebsd_ver => true,
"aio_writev" if Some(13) > freebsd_ver => true,

_ => false,
}
@@ -3322,6 +3330,9 @@ fn test_linux(target: &str) {
// linux 5.17 min
"PR_SET_VMA" | "PR_SET_VMA_ANON_NAME" => true,

// GRND_INSECURE was added in glibc-2.32
"GRND_INSECURE" => true,

_ => false,
}
});
@@ -3402,6 +3413,9 @@ fn test_linux(target: &str) {
// Not defined in uclibc as of 1.0.34
"gettid" if uclibc => true,

// Needs musl 1.2.3 or later.
"pthread_getname_np" if musl => true,

_ => false,
}
});
1 change: 1 addition & 0 deletions libc-test/semver/android.txt
Original file line number Diff line number Diff line change
@@ -661,6 +661,7 @@ GENL_NAMSIZ
GENL_UNS_ADMIN_PERM
GRND_NONBLOCK
GRND_RANDOM
GRND_INSECURE
GRPQUOTA
HPFS_SUPER_MAGIC
HUGETLBFS_MAGIC
2 changes: 2 additions & 0 deletions libc-test/semver/dragonfly.txt
Original file line number Diff line number Diff line change
@@ -1315,6 +1315,8 @@ kevent
killpg
kinfo_cputime
kinfo_file
kinfo_lwp
kinfo_proc
kqueue
labs
lastlog
2 changes: 0 additions & 2 deletions libc-test/semver/linux-gnu.txt
Original file line number Diff line number Diff line change
@@ -624,11 +624,9 @@ process_vm_readv
process_vm_writev
pthread_attr_getaffinity_np
pthread_attr_setaffinity_np
pthread_getname_np
pthread_rwlockattr_getkind_np
pthread_rwlockattr_getpshared
pthread_rwlockattr_setkind_np
pthread_setname_np
ptrace_peeksiginfo_args
ptrace_syscall_info
pututxline
6 changes: 6 additions & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
@@ -649,6 +649,7 @@ GLOB_NOSORT
GLOB_NOSPACE
GRND_NONBLOCK
GRND_RANDOM
GRND_INSECURE
IBSHIFT
IFA_ADDRESS
IFA_ANYCAST
@@ -2069,6 +2070,8 @@ SOF_TIMESTAMPING_SOFTWARE
SOF_TIMESTAMPING_SYS_HARDWARE
SOF_TIMESTAMPING_TX_HARDWARE
SOF_TIMESTAMPING_TX_SOFTWARE
SOF_TXTIME_DEADLINE_MODE
SOF_TXTIME_REPORT_ERRORS
SOL_AAL
SOL_ALG
SOL_ATM
@@ -2950,6 +2953,7 @@ pthread_condattr_setpshared
pthread_getaffinity_np
pthread_getattr_np
pthread_getcpuclockid
pthread_getname_np
pthread_getschedparam
pthread_kill
pthread_mutex_consistent
@@ -2962,6 +2966,7 @@ pthread_mutexattr_getrobust
pthread_mutexattr_setrobust
pthread_rwlockattr_setpshared
pthread_setaffinity_np
pthread_setname_np
pthread_setschedparam
pthread_setschedprio
pthread_spin_destroy
@@ -3063,6 +3068,7 @@ sigwaitinfo
sock_extended_err
sock_filter
sock_fprog
sock_txtime
sockaddr_alg
sockaddr_can
sockaddr_ll
1 change: 1 addition & 0 deletions libc-test/semver/openbsd.txt
Original file line number Diff line number Diff line change
@@ -1042,6 +1042,7 @@ jrand48
kevent
key_t
killpg
kinfo_proc
kinfo_vmentry
kqueue
labs
2 changes: 1 addition & 1 deletion src/macros.rs
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ macro_rules! cfg_if {
};
}

#[allow(unused_macros)]
#[allow(unused_macros, unused_macro_rules)]
macro_rules! s {
($($(#[$attr:meta])* pub $t:ident $i:ident { $($field:tt)* })*) => ($(
s!(it: $(#[$attr])* pub $t $i { $($field)* });
Loading