Skip to content

Conversation

@500-internal-server-error

Description

These constants and functions are required for building uutils-coreutils for Cygwin.

I'm not sure what the logic is on where things are placed, I just made it work. Additionally, I can't figure out how the tests work to fix it, but it's functional enough to unblock my immediate needs. Hopefully someone can give me guidance on how to clean up the changes and fix the tests?

Sources

https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/winsup/cygwin/include/cygwin/config.h#L50
https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/newlib/libc/include/stdio.h#L138-L139

https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/winsup/cygwin/include/cygwin/utmp.h#L20-L33

https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/winsup/cygwin/include/utmpx.h#L21-L32

https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/newlib/libc/include/stdio.h#L120-L122

https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/newlib/libc/include/grp.h#L64-L65

https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/winsup/cygwin/include/utmpx.h#L21-L32

https://github.com/msys2/msys2-runtime/blob/msys2-3.6.5/winsup/cygwin/include/utmpx.h#L42-L49

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot label +stable-nominated

@rustbot rustbot added O-unix stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Nov 12, 2025
@500-internal-server-error 500-internal-server-error marked this pull request as ready for review November 13, 2025 03:19
@500-internal-server-error
Copy link
Author

I don't think I touched MacOS, so I'm going to assume the fail is not due to my changes. I don't have hardware to test locally either...

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes themselves LGTM, thank you for including links. A request for history though - could you squash the last two commits and make the commit message something like "cygwin: Add missing utmp/x.h, grp.h, and stdio.h interfaces"? We use cherry picks here so it's nice if the log is a bit more specific than "cygwin stuff" :)

(Feel free to just paste the great PR description/sources you have into the commit message, that would be awesome. We don't squash+merge because you can't choose the strategy with merge queues.)

@rustbot
Copy link
Collaborator

rustbot commented Nov 19, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@tgross35 tgross35 changed the title Add more Cygwin stuff cygwin: Add missing utmp/x.h, grp.h, and stdio.h interfaces Nov 19, 2025
@tgross35
Copy link
Contributor

Cc also platform maintainer @Berrysoft

Copy link
Contributor

@Berrysoft Berrysoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have checked the changes and verified that they match the cygwin headers.

@500-internal-server-error
Copy link
Author

@tgross35 I have squashed the last 2 commits as requested.

@500-internal-server-error
Copy link
Author

@rustbot ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-unix S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants