79 lines
3.3 KiB
Markdown
79 lines
3.3 KiB
Markdown
# Port Status — CPython 3.11.16 to Windows 98 SE
|
|
|
|
Date: 2026-08-17
|
|
Baseline: CPython `v3.11.16`
|
|
Compiler: MSVC 6.0 (`cl.exe` 12.00.8804), from external `MSVC600`
|
|
Host test environment: Linux + Wine
|
|
|
|
## Verified
|
|
|
|
- CPython source checkout is at the requested `v3.11.16` baseline.
|
|
- The MSVC600 tool bundle is present locally and its `VC98/bin/VCVARS32.BAT`
|
|
environment script runs under Wine.
|
|
- MSVC6 reports:
|
|
|
|
```text
|
|
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
|
|
```
|
|
|
|
- A direct compile probe reaches CPython 3.11 headers. The first unmodified
|
|
probe fails before linking, proving the compiler is being invoked against the
|
|
intended baseline.
|
|
- A project-local compatibility `inttypes.h` has been added under
|
|
`compat/msvc600/` as the first isolated shim. It is not yet wired into
|
|
CPython source or declared sufficient for the port.
|
|
|
|
## Current first-blocker evidence
|
|
|
|
The probe command was equivalent to:
|
|
|
|
```text
|
|
cl /nologo /I compat/msvc600 /I cpython/Include /I cpython/PC \
|
|
/c cpython/Programs/python.c
|
|
```
|
|
|
|
The next errors include:
|
|
|
|
- `Py_uintptr_t` / `Py_intptr_t` configuration failures in `Include/pyport.h`
|
|
- unsupported C `inline` syntax in `Include/object.h` and other public headers
|
|
- unsupported `__declspec(deprecated)` annotations
|
|
- additional C99/C99-era declarations and compatibility assumptions
|
|
|
|
The compatibility header now supplies the pointer-sized typedefs required by
|
|
`pyport.h`; the current first compiler diagnostics are unsupported C `inline`
|
|
syntax and `__declspec(deprecated)` annotations in CPython headers. The shim
|
|
resolved only the missing-header and pointer-type layer; it is intentionally not
|
|
presented as a complete fix.
|
|
|
|
## Larger blockers to plan for
|
|
|
|
1. **Build-system mismatch:** CPython 3.11's Windows build expects Visual Studio
|
|
2017-era MSBuild/vcxproj tooling. VC6 cannot consume the build as-is. A
|
|
dedicated minimal VC6 makefile/project set is required.
|
|
2. **Compiler language gap:** CPython 3.11 source and headers use C99-era and
|
|
later MSVC features that VC6 does not implement. Compatibility macros and
|
|
carefully scoped source backports are required.
|
|
3. **Win9x API gap:** CPython 3.11's Windows layer assumes NT-family Unicode,
|
|
synchronization, process, filesystem, and networking APIs. Windows 98 has
|
|
no wide-character file APIs and lacks multiple newer kernel APIs.
|
|
4. **Runtime/library gap:** SSL, SQLite, ctypes, multiprocessing, asyncio,
|
|
Unicode filesystem behavior, and parts of subprocess will need explicit
|
|
feature gates or Win9x-specific implementations.
|
|
5. **Validation gap:** final success requires booting the built executable on
|
|
Windows 98 SE; Wine compilation alone is not proof of Win9x runtime
|
|
compatibility.
|
|
|
|
## Recommended next implementation slice
|
|
|
|
Do not attempt the complete CPython solution yet. First create a minimal VC6
|
|
build target for `pythoncore` plus `Programs/python.c`, then make the public
|
|
headers compile under VC6 through a clearly isolated compatibility layer. Keep
|
|
all changes small and testable. After the core links, address the Win9x API
|
|
surface one subsystem at a time.
|
|
|
|
## Scope boundary
|
|
|
|
This project does not vendor the 223 MB MSVC600 bundle into a distributable
|
|
repository. It records the external tool as a local build prerequisite. No
|
|
Microsoft compiler binaries or runtime files should be committed or published.
|