Issue 19355: Initial modernization of OpenWatcom support (original) (raw)
In an attempt to overhaul the existing Open-Watcom-specific portions of CPython, I encountered a number of issues related mostly to preprocessor directives surrounding support for the Open Watcom toolchain on Windows. Specifically, there were a number of places where #defined(MS_WINDOWS) should be checked prior to checking #defined(WATCOMC).
Additionally, there are some minor differences in the Open Watcom headers from the usual Microsoft headers that lead to problems. Open Watcom, for example, internally defines PATH_MAX, whereas MSVC does not. Open Watcom provides a few additional POSIX-y functions on the Windows platform that, again, MSVC does not.
The included patch fixes these minor problems. The changes should not effect compilation with any other compilers.
I realize Open Watcom probably isn't directly supported at the moment. I currently have project files, however, that are building CPython with the Open Watcom toolchain with these patches (and a few additional patches - separate issues, though).