[New-bugs-announce] [issue10560] Fixes for Windows sources
report at bugs.python.org
Sun Nov 28 12:17:57 CET 2010
New submission from Carlo Bramini <carlo.bramix at libero.it>:
I was able to compile latest python sources with MSVC5, by importing and fixing a bit the project workspaces of MSVC6.
During this action I received some messages, so I gave a look to the sources and I would like to suggest the following fixes:
1) in posixmodule.c, I had a warning of constant out of range for secs_between_epochs.
The problem has been solved by applying "i64" suffix as suggested in MSDN for doing correct declaration of 64 bits constants.
While doing this fix, I took this chance for adding support for all currently supported platforms: MSVC, GCC and Watcom.
2) in posixmodule.c, I fixed a bit check_gfax() function:
- Function declaration has been fixed with 'void' in its parameter section (fixes a warning).
- I removed the variable 'checked' and I placed instead the handle to kernel32 module.
- I removed the L-value assignment: all other source codes in Python are already corrected in that manner, this is the last one that needs to be fixed.
3) in posixmodule.c, there is a bug in function Py_GetFileAttributesExW(): it tests for 'gfaxa' but later it uses 'gfaxw'.
4) in dl_nt.c, I fixed function prototypes with "void" (solves a warning).
5) in dl_nt.c, in function _LoadActCtxPointers(), I do not see a good reason for using widechar version of GetModuleHandle, since it just need to retrieve the instance of kernel32.
6) in dynload_win.c, I fixed _Py_ActivateActCtx prototype declaration (solves a warning).
7) in dynload_win.c, I suggest to rename local strcasecmp() to something less dangerous to prototype conflicts.
8) in dynload_win.c, in function _PyImport_GetDynLoadFunc() the first 'cookie' variable is not used, so its declaration has been removed.
I hope you will find this useful.
title: Fixes for Windows sources
Added file: http://bugs.python.org/file19853/python.txt
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce