[issue10560] Fixes for Windows sources

2013-03-17 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I'm rejecting the patch, on grounds of PEP 11. We only support MSVC compilers 
up to 3 years after the extended support by Microsoft has expired. For MSC 5, 
this is long past. For MSC 6, extended support was discontinued in 2005, for 
MSVC 2002, in 2009. For all these versions, we will not accept patches anymore.

MSVC 2003 will be supported until 08/10/2013, 2005 until 12/04/2016, and 2008 
until 10/04/2018, so we would continue to accept for any of these for quite 
some time.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10560] Fixes for Windows sources

2013-02-24 Thread Carlo Bramini

Carlo Bramini added the comment:

Hello,
no problem, the fix on GetModuleHandle() can be avoided without problems if you 
want. Anyways, although nowadays the "hybrid" operating systems like Windows 
9x/ME are dead and burried, in this particular case I would still suggest to 
use directly GetModuleHandleA(), because the instance to find is just 
"KERNEL32" and it is not made by esoteric characters. Normally, as developer 
for Windows platform, I would surely agree to use the wide char version, but 
due to the highly portable nature of Python, with my experience I learned that 
some particular conditions can make the cross compiling for Windows easier, if 
you do not explicitely add "-fshort-wchar".
BTW, the ".dll" in the string of the parameter is redundant as you can see from 
MSDN page of GetModuleHandle(), there are also few other points in the sources 
of Python that can be "optimized", but afterall these are just "fine" 
improvements, not so much important if they are compared to other things...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10560] Fixes for Windows sources

2013-02-23 Thread STINNER Victor

STINNER Victor added the comment:

-HINSTANCE hKernel32 = GetModuleHandleW(L"kernel32.dll");
+HINSTANCE hKernel32 = GetModuleHandle(TEXT("KERNEL32"));

I prefer to be explicit and force the usage of the wide character API, 
espacially in Python 3.

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10560] Fixes for Windows sources

2013-02-23 Thread Roumen Petrov

Roumen Petrov added the comment:

yes

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10560] Fixes for Windows sources

2013-02-23 Thread Carlo Bramini

Carlo Bramini added the comment:

I have downloaded the latest sources with HG and, with the only exception of 
the variable "cookie" now conditionally declared with an "#ifdef HAVE_SXS", 
yes, all these fixes are still actual.

--
status: pending -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10560] Fixes for Windows sources

2013-02-22 Thread Ezio Melotti

Ezio Melotti added the comment:

Is this issue still valid?

--
nosy: +brian.curtin, ezio.melotti
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10560] Fixes for Windows sources

2010-11-28 Thread Carlo Bramini

Carlo Bramini  added the comment:

I modified the patch by using Py_LL() as suggested in a previous comment.

I just would like to say that these fixes are not required to compiling under 
MSVC5: I was able to compile all the sources as they were, even without changes 
and this is a great thing.
I have just noticed, from some strange warning messages, that few things 
required to be fixed, now reduced to correct __STDC__ syntax to some functions 
(declaring in that manner is wrong anyways, since it's C89) and fix a constant 
with the right modifier.

--
Added file: http://bugs.python.org/file19863/python-svn.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10560] Fixes for Windows sources

2010-11-28 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> According to the instructions received at #python-dev, I'm posting a
> new patch with the same fixes made on the most recent SVN sources
> (py3k). Actually the new patch does not include the fixes made on the
> GetFileAttributesEx wrappers since they have been removed in the SVN
> sources; however I would like to remember that removing that code
> will also break support for Windows 98 and Windows ME: it's true that
> they have it but only ASCII version is working.

Python has not been supporting Windows 98 anymore for quite some time
now. I don't see the need to support MSVC5, either. Since Windows 2000
isn't supported anymore, either, the LoadActCtxPointers function can
be dropped, and be replaced with a direct call to GetCurrentActCtx.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10560] Fixes for Windows sources

2010-11-28 Thread Roumen Petrov

Roumen Petrov  added the comment:

posix_module has to use Py_LL(...)

--
nosy: +rpetrov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10560] Fixes for Windows sources

2010-11-28 Thread Carlo Bramini

Carlo Bramini  added the comment:

According to the instructions received at #python-dev, I'm posting a new patch 
with the same fixes made on the most recent SVN sources (py3k).
Actually the new patch does not include the fixes made on the 
GetFileAttributesEx wrappers since they have been removed in the SVN sources; 
however I would like to remember that removing that code will also break 
support for Windows 98 and Windows ME: it's true that they have it but only 
ASCII version is working.

Sincerely,

Carlo Bramini.

--
Added file: http://bugs.python.org/file19855/python-svn.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10560] Fixes for Windows sources

2010-11-28 Thread Georg Brandl

Changes by Georg Brandl :


--
assignee:  -> loewis
nosy: +loewis

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10560] Fixes for Windows sources

2010-11-28 Thread Carlo Bramini

New submission from Carlo Bramini :

Hello,
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.

Sincerely,

Carlo Bramini.

--
components: Windows
files: python.txt
messages: 122651
nosy: Carlo_Bramini
priority: normal
severity: normal
status: open
title: Fixes for Windows sources
Added file: http://bugs.python.org/file19853/python.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com