Skip to content

Remove obsolete and unused configure macros - #159513

Open
methane wants to merge 2 commits into
python:mainfrom
methane:codex/remove-deadcode
Open

methane wants to merge 2 commits into
python:mainfrom
methane:codex/remove-deadcode

Conversation

@methane

@methane methane commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Remove obsolete platform workarounds and configuration checks whose results are no longer used:

  • Remaining IRIX workarounds: Remove IRIX-specific declarations, header handling, and macros from socket, select, termios, curses, posix, and integer-conversion code. IRIX support was removed in Python 3.7.
  • Checks left behind by removed modules: Remove checks for shadow.h, getspent(), getspnam(), linux/soundcard.h, sys/soundcard.h, and sys/audioio.h. Their consumers were the removed spwd, ossaudiodev, and sunaudiodev modules.
  • Checks left behind by bundled libmpdec: Remove the glibc _FORTIFY_SOURCE/memmove bug check, GCC ipa-pure-const bug check, and x64 inline-assembler check. Their consumers were removed with bundled libmpdec in 9eb3b14. Also remove the -O2 availability check used only by the glibc bug check.
  • Unused function checks: Remove checks for ftime(), getwd(), tempnam(), tmpnam(), tmpnam_r(), sigrelse(), fseek64(), and ftell64(). Neither their configuration macros nor their cached results have remaining consumers.
  • Pre-ANSI compiler checks: Remove checks for working const, signed char, and function prototypes, along with their compatibility macros. These features are guaranteed by CPython’s C11 requirement.
  • Obsolete MSVC version conditions: Remove conditions for compiler versions older than the supported minimum, retaining the current implementations and non-MSVC alternatives. This covers Windows configuration, socket headers, secure CRT handling, and invalid-parameter handlers.
  • Legacy BSD workarounds: Remove _XOPEN_SOURCE exceptions for OpenBSD 2.x–4.6 and NetBSD 1.5–1.6-era releases, and the pre-December-1997 NetBSD dynamic-loader workaround.
  • Regenerate configure and pyconfig.h.in with Autoconf 2.72, and update the C API macro allowlist and platform headers accordingly.

@methane methane changed the title Remove obsolete IRIX workarounds and unused configure checks Remove obsolete and unused configure macros Oct 16, 2026
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.

1 participant