This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年10月08日 13:26 by Jeffrey.Armstrong, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| posix_init.patch | Jeffrey.Armstrong, 2014年10月08日 13:26 | Patch to check for MS_WINDOWS when determining name of posix module's init function | ||
| Messages (6) | |||
|---|---|---|---|
| msg228789 - (view) | Author: Jeffrey Armstrong (Jeffrey.Armstrong) * | Date: 2014年10月08日 13:26 | |
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. |
|||
| msg228861 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2014年10月09日 11:50 | |
The patch looks good to me, but I would prefer that someone else double check. |
|||
| msg228908 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2014年10月09日 20:41 | |
There is also #if !defined(__QNX__) #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) #define SEP L'\\' #define ALTSEP L'/' #define MAXPATHLEN 256 #define DELIM L';' #endif #endif in Include/osdefs.h |
|||
| msg228911 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2014年10月09日 21:08 | |
I would remove the "|| defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__)" part, since it's probably for MSDOS variants of those compilers. |
|||
| msg228914 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2014年10月09日 21:17 | |
> I would remove the "|| defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__)" part, since it's probably for MSDOS variants of those compilers. I agree, but IMO it is unrelated to this issue. Jeffrey wants to support a new C compiler (OpenWatcom) on Windows, not drop support of MS-DOS or old C compiler. I created the issue #22591 to drop support of MS-DOS specific code. |
|||
| msg228929 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2014年10月09日 22:14 | |
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 -> closed resolution: fixed messages: + msg228929 |
| 2014年10月09日 22:06:10 | Arfrever | set | nosy:
+ Arfrever |
| 2014年10月09日 21:17:07 | vstinner | set | messages: + msg228914 |
| 2014年10月09日 21:08:11 | pitrou | set | messages: + msg228911 |
| 2014年10月09日 20:41:01 | georg.brandl | set | nosy:
+ georg.brandl messages: + msg228908 |
| 2014年10月09日 11:50:08 | vstinner | set | versions:
+ Python 3.5, - Python 3.4 nosy: + loewis, vstinner, pitrou messages: + msg228861 components: + Windows |
| 2014年10月08日 13:26:55 | Jeffrey.Armstrong | create | |