Skip to content

gh-161198: Select the GNU strerror_r variant on Cygwin - #162852

Open
tamaki0575-cloud wants to merge 1 commit into
python:mainfrom
tamaki0575-cloud:gh-161198-cygwin-gnu-strerror-r
Open

tamaki0575-cloud wants to merge 1 commit into
python:mainfrom
tamaki0575-cloud:gh-161198-cygwin-gnu-strerror-r

Conversation

@tamaki0575-cloud

@tamaki0575-cloud tamaki0575-cloud commented Nov 30, 2026 •

Copy link
Copy Markdown

Cygwin exposes the GNU strerror_r() variant when _GNU_SOURCE is defined. Include Cygwin in the existing GNU-variant guard so CPython uses the char * return type in that configuration. This follows the fix proposed in the issue.

Fixes #161198.

Testing

  • Cygwin 3.6.12, GCC 14.4.0, CPython main at c52b7a8.
  • Before the patch, make Python/fileutils.o failed at both strerror_r() calls with -Wint-conversion. The same target and a full debug build passed after the patch.
  • os.strerror(errno.ENOENT) and python.exe -m test test_os.test_posix test_errno passed.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CYGWIN: Python-3.16.0a1 doesn't select correct strerror_r()

1 participant