The determination of the name of the posix module's initialization function (at Modules/posixmodule.c:12055) is currently dependent on the compiler being used. For MSVC, Watcom, or Borland, the name is defined as "PyInit_nt." However, both Open Watcom and Borland have shipped compilers for GNU/Linux (and other platforms), making determining the posix module initialization function based on compiler incorrect. Most other places in Modules/posixmodule.c correctly use the "MS_WINDOWS" preprocessor definition to determine if Windows routines should be used. Naming the intialization function for the posix module should be dependent on this as well rather than compiler identifiers. Linking the interpreter natively with Open Watcom fails under GNU/Linux due to "PyInit_posix" being undefined. This occurs because of the reasons described above. The patch included corrects the issue.
Ok, I pushed the change: --- changeset: 92900:c7adad17f663 user: Victor Stinner <victor.stinner@gmail.com> date: Fri Oct 10 00:09:47 2014 +0200 files: Modules/posixmodule.c Closes #22579: Fix posixmodule.c to support any C compiler on Windows --- Oh, I forgot to mention that Jeffrey Armstrong wrote it, sorry :-( I created the issue #22592 "Drop support of Borland C compiler". See also the issue #22591 for MS-DOS.
History
Date
User
Action
Args
2022-04-11 14:58:08
admin
set
github: 66769
2014-10-09 22:14:23
vstinner
set
status: open -> closedresolution: fixedmessages: +