Tcl Source Code

View Ticket
Login
Ticket UUID: 1054357
Title: WIN32 not proper macro
Type: Bug Version: obsolete: 8.5a2
Submitter: davygrvy Created on: 2004-10-26 04:58:39
Subsystem: 06. Time Measurement Assigned To: kennykb
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2004-10-31 01:04:07
Resolution: Accepted Closed By: kennykb
    Closed on: 2004-10-30 18:04:07
Description:
Should be __WIN32__ as the proper check.  See tclPort.h

Index: tclClock.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclClock.c,v
retrieving revision 1.35
diff -c -r1.35 tclClock.c
*** tclClock.c21 Oct 2004 03:53:04 -00001.35
--- tclClock.c26 Oct 2004 04:55:29 -0000
***************
*** 21,27 ****
   * Windows has mktime.  The configurators do not check.
   */
  
! #ifdef WIN32
  #define HAVE_MKTIME 1
  #endif
  
--- 21,27 ----
   * Windows has mktime.  The configurators do not check.
   */
  
! #ifdef __WIN32__
  #define HAVE_MKTIME 1
  #endif
User Comments: davygrvy added on 2004-10-27 01:39:11:

File Added - 106575: patch.txt

davygrvy added on 2004-10-27 01:39:09:
Logged In: YES 
user_id=7549

If you want to change to WIN32 as the top-level, apply this
patch.

davygrvy added on 2004-10-26 12:13:52:
Logged In: YES 
user_id=7549

A note on history of __WIN32__...

If we go back to the 7.6 source, you'll see the origin of it
there as __WIN32__ is the Borland compiler intrinsic macro.
 It has always been the "top-level" platform macro for
compiling on windows.  It is even written right into
genStubs.tcl and a quick grep pulls up 58 occurances
throughout the source excluding the headers.

I'm not against changing the name of the top-level macro to
WIN32, but don't want to see the meaning of __WIN32__
dilluted in tclClock.c

Attachments: