[Patches] use "win32" for sys.platform on Win64

Trent Mick trentm@activestate.com
Tue, 9 May 2000 17:43:57 -0700


Discussion:

Use "win32" for sys.platform on Win64 instead of "win32" because:
1. While it may be confusing to the Python scriptor on Win64 that he has to
   check for win*32*, that is something that he will learn the first time. It
   is better than the alternative of the scriptor happily using "win64" and
   then that code not running on Win32 for no good reason.
2. The main question is: is Win64 so much more like Win32 than different from
   it that the common-case general Python programmer should not ever have to
   make the differentiation in his Python code. Or, at least, enough so that
   such differentiation by the Python scriptor is rare enough that some other
   provided mechanism is sufficient (even preferable). Currently the answer
   is yes. Hopefully MS will not change this answer.



Legal:

I confirm that, to the best of my knowledge and belief, this
contribution is free of any claims of third parties under
copyright, patent or other rights or interests ("claims").  To
the extent that I have any such claims, I hereby grant to CNRI a
nonexclusive, irrevocable, royalty-free, worldwide license to
reproduce, distribute, perform and/or display publicly, prepare
derivative versions, and otherwise use this contribution as part
of the Python software and its related documentation, or any
derivative versions thereof, at no cost to CNRI or its licensed
users, and to authorize others to do so.

I acknowledge that CNRI may, at its sole discretion, decide
whether or not to incorporate this contribution in the Python
software and its related documentation.  I further grant CNRI
permission to use my name and other identifying information
provided to CNRI by me for use in connection with the Python
software and its related documentation.


Patch:


diff -c3  /home/trentm/main/contrib/python/dist/src/PC/config.h ./PC/config.h
*** /home/trentm/main/contrib/python/dist/src/PC/config.h	Mon May  8 07:14:48 2000
--- ./PC/config.h	Tue May  9 17:40:54 2000
***************
*** 234,240 ****
  /* End of compilers - finish up */
  
  #if defined(MS_WIN64)
! #define PLATFORM "win64"
  #define SIZEOF_VOID_P 8
  #elif defined(MS_WIN32)
  #define PLATFORM "win32"
--- 234,243 ----
  /* End of compilers - finish up */
  
  #if defined(MS_WIN64)
! /* maintain "win32" sys.platform for backward compatibility of Python code,
!    the Win64 API should be close enough to the Win32 API to make this
!    preferable */
! #define PLATFORM "win32"
  #define SIZEOF_VOID_P 8
  #elif defined(MS_WIN32)
  #define PLATFORM "win32"



-- 
Trent Mick
trentm@activestate.com