Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-10-31
01:04 • Closed ticket [1054357fff]: WIN32 not proper macro plus 3 other changes artifact: 3f0e03f765 user: kennykb
2004-10-27
01:39 • Ticket [1054357fff]: 4 changes artifact: e5f96bfe8c user: davygrvy
01:39 • Add attachment patch.txt to ticket [1054357fff] artifact: e3d4b4d976 user: davygrvy
01:39 • Ticket [1054357fff] WIN32 not proper macro status still Open with 4 other ch... artifact: b1b5fd2c2d user: davygrvy
2004-10-26
12:13 • Ticket [1054357fff]: 4 changes artifact: e7de0f5600 user: davygrvy
04:58 • New ticket [1054357fff]. artifact: ef2349d496 user: davygrvy

WIN32 not proper macro

Closed / Accepted1054357fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-10-26 04:58:39
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
davygrvyplain2004-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
davygrvyplain2004-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.
davygrvyplain2004-10-27 01:39:11
File Added - 106575: patch.txt
kennykb Closed ticket [1054357fff]. [History diff]2004-10-31 01:04:07
Log in (anonymous is fine) to add a comment.

Attachments: