summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-10-15 18:38:02 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-10-15 18:38:02 (GMT)
commitd3f32c25f4f4e52eff048406ab16786b1de14677 (patch)
tree8a8212da8cd407a47f23422e2ef3e4f3f728530e /win
parent3bf2e431b1f1d665dc8ce7d2b34635376fdc58be (diff)
downloadtcl-d3f32c25f4f4e52eff048406ab16786b1de14677.zip
tcl-d3f32c25f4f4e52eff048406ab16786b1de14677.tar.gz
tcl-d3f32c25f4f4e52eff048406ab16786b1de14677.tar.bz2
merge updates from HEAD
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in7
-rw-r--r--win/coffbase.txt8
-rw-r--r--win/makefile.bc2
-rw-r--r--win/makefile.vc85
-rw-r--r--win/nmakehlp.c6
-rw-r--r--win/rules.vc239
-rw-r--r--win/tclWinPort.h9
7 files changed, 209 insertions, 147 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index 410665b..830e076 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -4,7 +4,7 @@
# "./configure", which is a configuration script generated by the "autoconf"
# program (constructs like "@foo@" will get replaced in the actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.115.2.3 2007/09/14 16:28:39 dgp Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.115.2.4 2007/10/15 18:38:09 dgp Exp $
VERSION = @TCL_VERSION@
@@ -359,9 +359,6 @@ WIN_OBJS = \
tclWinThrd.$(OBJEXT) \
tclWinTime.$(OBJEXT)
-COMPAT_OBJS = \
- strtoll.$(OBJEXT) strtoull.$(OBJEXT)
-
PIPE_OBJS = stub16.$(OBJEXT)
DDE_OBJS = tclWinDde.$(OBJEXT)
@@ -372,7 +369,7 @@ STUB_OBJS = tclStubLib.$(OBJEXT)
TCLSH_OBJS = tclAppInit.$(OBJEXT)
-TCL_OBJS = ${GENERIC_OBJS} $(TOMMATH_OBJS) ${WIN_OBJS} ${COMPAT_OBJS}
+TCL_OBJS = ${GENERIC_OBJS} $(TOMMATH_OBJS) ${WIN_OBJS}
TCL_DOCS = "$(ROOT_DIR_NATIVE)"/doc/*.[13n]
diff --git a/win/coffbase.txt b/win/coffbase.txt
index 93f46d5..c93dc08 100644
--- a/win/coffbase.txt
+++ b/win/coffbase.txt
@@ -12,7 +12,7 @@
; they're mutually exclusive. This info is placed in the DLL's PE header by the
; linker with the `-base:@$(TCLDIR)\win\coffbase.txt,<key>` option.
;
-; RCS: @(#) $Id: coffbase.txt,v 1.9 2007/05/04 18:04:54 patthoyts Exp $
+; RCS: @(#) $Id: coffbase.txt,v 1.9.2.1 2007/10/15 18:38:09 dgp Exp $
tcl 0x10000000 0x00200000
tcldde 0x10200000 0x00010000
@@ -28,4 +28,8 @@ tls 0x10780000 0x00100000
winico 0x10880000 0x00010000
tile 0x10900000 0x00080000
memchan 0x109D0000 0x00010000
-tdom 0x109E0000 0x00080000 \ No newline at end of file
+tdom 0x109E0000 0x00080000
+tkvideo 0x10B00000 0x00010000
+snack 0x1E000000 0x00400000
+sound 0x1E400000 0x00400000
+snackogg 0x1E800000 0x00200000
diff --git a/win/makefile.bc b/win/makefile.bc
index 97846d6..f750555 100644
--- a/win/makefile.bc
+++ b/win/makefile.bc
@@ -193,8 +193,6 @@ TCLOBJS = \
$(TMPDIR)\regexec.obj \
$(TMPDIR)\regfree.obj \
$(TMPDIR)\regerror.obj \
- $(TMPDIR)\strtoll.obj \
- $(TMPDIR)\strtoull.obj \
$(TMPDIR)\tclAlloc.obj \
$(TMPDIR)\tclAsync.obj \
$(TMPDIR)\tclBasic.obj \
diff --git a/win/makefile.vc b/win/makefile.vc
index 447ad0e..4c050d1 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -12,7 +12,7 @@
# Copyright (c) 2001-2004 David Gravereaux.
#
#------------------------------------------------------------------------------
-# RCS: @(#) $Id: makefile.vc,v 1.160.2.4 2007/09/17 15:03:48 dgp Exp $
+# RCS: @(#) $Id: makefile.vc,v 1.160.2.5 2007/10/15 18:38:09 dgp Exp $
#------------------------------------------------------------------------------
# Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR)
@@ -103,13 +103,14 @@ the build instructions.
# memdbg = Enables the debugging memory allocator.
# compdbg = Enables byte compilation logging.
#
-# CHECKS=nodep,fullwarn,none
+# CHECKS=nodep,fullwarn,64bit,none
# Sets special macros for checking compatability.
#
# nodep = Turns off compatability macros to ensure the core
# isn't being built with deprecated functions.
# fullwarn = Builds with full compiler and link warnings enabled.
# Very verbose.
+# 64bit = Enable 64bit portability warnings (if available)
#
# MACHINE=(IX86|IA64|AMD64|ALPHA)
# Set the machine type used for the compiler, linker, and
@@ -175,20 +176,9 @@ Please `cd` to its location first.
PROJECT = tcl
!include "rules.vc"
-STUBPREFIX = $(PROJECT)stub
-
-!if [nmakehlp -g ../generic/tcl.h TCL_VERSION] == 85
-DOTVERSION = 8.5
-!elseif [nmakehlp -g ../generic/tcl.h TCL_VERSION] == 86
-DOTVERSION = 8.6
-!elseif [nmakehlp -g ../generic/tcl.h TCL_VERSION] == 90
-DOTVERSION = 9.0
-!elseif [nmakehlp -g ../generic/tcl.h TCL_VERSION] == 0
-MSG =^
-Cannot get version string from ../generic/tcl.h
-!error $(MSG)
-!endif
-VERSION = $(DOTVERSION:.=)
+STUBPREFIX = $(PROJECT)stub
+DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
+VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
DDEDOTVERSION = 1.3
DDEVERSION = $(DDEDOTVERSION:.=)
@@ -252,8 +242,6 @@ TCLOBJS = \
$(TMP_DIR)\regerror.obj \
$(TMP_DIR)\regexec.obj \
$(TMP_DIR)\regfree.obj \
- $(TMP_DIR)\strtoll.obj \
- $(TMP_DIR)\strtoull.obj \
$(TMP_DIR)\tclAlloc.obj \
$(TMP_DIR)\tclAsync.obj \
$(TMP_DIR)\tclBasic.obj \
@@ -430,15 +418,9 @@ cdebug = -Zi -WX $(DEBUGFLAGS)
!endif
### Declarations common to all compiler options
-cwarn = -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
+cwarn = $(WARNINGS) -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\
-!if $(FULLWARNINGS)
-cflags = $(cflags) -W4
-!else
-cflags = $(cflags) -W3
-!endif
-
!if $(MSVCRT)
!if $(DEBUG) && !$(UNCHECKED)
crt = -MDd
@@ -454,9 +436,8 @@ crt = -MT
!endif
TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" -I"$(TOMMATHDIR)"
-BASE_CFLAGS = $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) \
- -DTCL_PIPE_DLL=\"$(TCLPIPEDLLNAME)\" -DTCL_TOMMATH \
- -DMP_PREC=4 -Dinline=__inline
+TCL_DEFINES = -DTCL_PIPE_DLL=\"$(TCLPIPEDLLNAME)\" -DTCL_TOMMATH -DMP_PREC=4 -Dinline=__inline
+BASE_CFLAGS = $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) $(TCL_DEFINES)
CON_CFLAGS = $(cflags) $(cdebug) $(crt) -DCONSOLE
TCL_CFLAGS = $(BASE_CFLAGS) $(OPTDEFINES)
STUB_CFLAGS = $(cflags) $(cdebug) $(OPTDEFINES)
@@ -475,10 +456,6 @@ ldebug = -release -opt:ref -opt:icf,3
### Declarations common to all linker options
lflags = -nologo -machine:$(MACHINE) $(LINKERFLAGS) $(ldebug)
-!if $(FULLWARNINGS)
-lflags = $(lflags) -warn:3
-!endif
-
!if $(PROFILE)
lflags = $(lflags) -profile
!endif
@@ -650,23 +627,6 @@ gentommath_h:
!endif
#---------------------------------------------------------------------
-# Generate the makefile depedancies.
-#---------------------------------------------------------------------
-
-depend:
-!if !exist($(TCLSH))
- @echo Build tclsh first!
-!else
- $(TCLSH) $(TOOLSDIR:\=/)/mkdepend.tcl -vc32 -out:"$(OUT_DIR)\depend.mk" \
- -passthru:"-DBUILD_tcl $(TCL_INCLUDES:"="")" $(GENERICDIR) \
- $(COMPATDIR) $(WINDIR) @<<
-$(TCLOBJS)
-<<
-!endif
-
-#" for emacs font-locking.
-
-#---------------------------------------------------------------------
# Build the windows help file.
#---------------------------------------------------------------------
@@ -796,11 +756,13 @@ $(OUT_DIR)\tclConfig.sh: $(WINDIR)\tclConfig.sh.in
<<
+#---------------------------------------------------------------------
# The following target generates the file generic/tclDate.c
# from the yacc grammar found in generic/tclGetDate.y. This is
# only run by hand as yacc is not available in all environments.
# The name of the .c file is different than the name of the .y file
# so that make doesn't try to automatically regenerate the .c file.
+#---------------------------------------------------------------------
gendate:
bison --output-file=$(GENERICDIR)/tclDate.c \
@@ -864,15 +826,34 @@ $(TMP_DIR)\tclWinDde.obj: $(WINDIR)\tclWinDde.c
### The following objects are part of the stub library and should not
-### be built as DLL objects. -Zl is used to avoid a dependancy on any
+### be built as DLL objects. -Zl is used to avoid a dependency on any
### specific C run-time.
$(TMP_DIR)\tclStubLib.obj: $(GENERICDIR)\tclStubLib.c
$(cc32) $(STUB_CFLAGS) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $?
+#---------------------------------------------------------------------
+# Generate the source dependencies. Having dependency rules will
+# improve incrimental build accuracy without having to resort to a
+# full rebuild just because some non-global header file like tclCompile.h
+# was changed. These rules aren't needed when building from scratch.
+#---------------------------------------------------------------------
+
+depend:
+!if !exist($(TCLSH))
+ @echo Build tclsh first!
+!else
+ $(TCLSH) $(TOOLSDIR:\=/)/mkdepend.tcl -vc32 -out:"$(OUT_DIR)\depend.mk" \
+ -passthru:"-DBUILD_tcl $(TCL_INCLUDES:"=""")" $(GENERICDIR),$$(GENERICDIR) \
+ $(COMPATDIR),$$(COMPATDIR) $(TOMMATHDIR),$$(TOMMATHDIR) $(WINDIR),$$(WINDIR) @<<
+$(TCLOBJS)
+<<
+!endif
+
+#" emacs fix
#---------------------------------------------------------------------
-# Dedependency rules
+# Dependency rules
#---------------------------------------------------------------------
$(GENERICDIR)\regcomp.c: \
@@ -1040,6 +1021,8 @@ install-libraries: tclConfig install-msgs install-tzdata
@$(CPY) "$(ROOT)\library\encoding\*.enc" \
"$(SCRIPT_INSTALL_DIR)\encoding\"
+#" emacs fix
+
install-tzdata:
@echo Installing time zone data
@set TCL_LIBRARY=$(ROOT)/library
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index 7dd3aac..a5eb1c4 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -11,7 +11,7 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* ----------------------------------------------------------------------------
- * RCS: @(#) $Id: nmakehlp.c,v 1.17.2.1 2007/09/14 16:28:39 dgp Exp $
+ * RCS: @(#) $Id: nmakehlp.c,v 1.17.2.2 2007/10/15 18:38:09 dgp Exp $
* ----------------------------------------------------------------------------
*/
@@ -299,7 +299,9 @@ CheckForCompilerFeature(
return !(strstr(Out.buffer, "D4002") != NULL
|| strstr(Err.buffer, "D4002") != NULL
|| strstr(Out.buffer, "D9002") != NULL
- || strstr(Err.buffer, "D9002") != NULL);
+ || strstr(Err.buffer, "D9002") != NULL
+ || strstr(Out.buffer, "D2021") != NULL
+ || strstr(Err.buffer, "D2021") != NULL);
}
int
diff --git a/win/rules.vc b/win/rules.vc
index 2f1f27e..76e70c1 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -8,10 +8,10 @@
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# Copyright (c) 2001-2003 David Gravereaux.
-# Copyright (c) 2003-2006 Patrick Thoyts
+# Copyright (c) 2003-2007 Patrick Thoyts
#
#------------------------------------------------------------------------------
-# RCS: @(#) $Id: rules.vc,v 1.29.2.1 2007/09/14 16:28:39 dgp Exp $
+# RCS: @(#) $Id: rules.vc,v 1.29.2.2 2007/10/15 18:38:09 dgp Exp $
#------------------------------------------------------------------------------
!ifndef _RULES_VC
@@ -88,7 +88,7 @@ MKDIR = mkdir
!message *** Compiler has 'Optimizations'
OPTIMIZING = 1
!else
-!message *** Compiler doesn't have 'Optimizations'
+!message *** Compiler does not have 'Optimizations'
OPTIMIZING = 0
!endif
@@ -106,9 +106,19 @@ OPTIMIZATIONS = $(OPTIMIZATIONS) -Oi
OPTIMIZATIONS = $(OPTIMIZATIONS) -Op
!endif
+# Tk doesnt seem to be able to use -fp:strict.
+!if "$(PROJECT)" != "tk"
!if [nmakehlp -c -fp:strict]
OPTIMIZATIONS = $(OPTIMIZATIONS) -fp:strict
!endif
+!else
+!if [nmakehlp -c -fp:precise]
+OPTIMIZATIONS = $(OPTIMIZATIONS) -fp:precise
+!endif
+!if [nmakehlp -c -fp:except]
+OPTIMIZATIONS = $(OPTIMIZATIONS) -fp:except
+!endif
+!endif
!if [nmakehlp -c -Gs]
OPTIMIZATIONS = $(OPTIMIZATIONS) -Gs
@@ -145,7 +155,7 @@ OPTIMIZATIONS = $(OPTIMIZATIONS) -YX
!message *** Compiler has 'Pentium 0x0f fix'
COMPILERFLAGS = $(COMPILERFLAGSS) -QI0f
!else
-!message *** Compiler doesn't have 'Pentium 0x0f fix'
+!message *** Compiler does not have 'Pentium 0x0f fix'
!endif
!endif
@@ -165,7 +175,7 @@ COMPILERFLAGS = $(COMPILERFLAGS) -QIA64_Bx
!message *** Linker has 'Win98 alignment problem'
ALIGN98_HACK = 1
!else
-!message *** Linker doesn't have 'Win98 alignment problem'
+!message *** Linker does not have 'Win98 alignment problem'
ALIGN98_HACK = 0
!endif
!else
@@ -380,7 +390,7 @@ TCL_COMPILE_DEBUG = 0
!if "$(CHECKS)" == "" || [nmakehlp -f "$(CHECKS)" "none"]
TCL_NO_DEPRECATED = 0
-FULLWARNINGS = 0
+WARNINGS = -W3
!else
!if [nmakehlp -f $(CHECKS) "nodep"]
!message *** Doing nodep check
@@ -390,12 +400,18 @@ TCL_NO_DEPRECATED = 0
!endif
!if [nmakehlp -f $(CHECKS) "fullwarn"]
!message *** Doing full warnings check
-FULLWARNINGS = 1
+WARNINGS = -W4
+!if [nmakehlp -l -warn:3]
+LINKERFLAGS = $(LINKERFLAGS) -warn:3
+!endif
!else
-FULLWARNINGS = 0
+WARNINGS = -W3
+!endif
+!if [nmakehlp -f $(CHECKS) "64bit"] && [nmakehlp -c -Wp64]
+!message *** Doing 64bit portability warnings
+WARNINGS = $(WARNINGS) -Wp64
!endif
!endif
-
#----------------------------------------------------------
# Set our defines now armed with our options.
@@ -436,16 +452,26 @@ OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_DO64BIT
#----------------------------------------------------------
-# Get common info used when building extensions.
+# Locate the Tcl headers to build against
#----------------------------------------------------------
-!if "$(PROJECT)" != "tcl"
+!if "$(PROJECT)" == "tcl"
-!if !defined(TCLDIR)
+_TCL_H = ..\generic\tcl.h
+
+!else
+
+# If INSTALLDIR set to tcl root dir then reset to the lib dir.
!if exist("$(_INSTALLDIR)\include\tcl.h")
-TCLH = "$(_INSTALLDIR)\include\tcl.h"
+_INSTALLDIR=$(_INSTALLDIR)\lib
+!endif
+
+!if !defined(TCLDIR)
+!if exist("$(_INSTALLDIR)\..\include\tcl.h")
TCLINSTALL = 1
-_TCLDIR = $(_INSTALLDIR)
+_TCLDIR = $(_INSTALLDIR)\..
+_TCL_H = $(_INSTALLDIR)\..\include\tcl.h
+TCLDIR = $(_INSTALLDIR)\..
!else
MSG=^
Failed to find tcl.h. Set the TCLDIR macro.
@@ -454,48 +480,64 @@ Failed to find tcl.h. Set the TCLDIR macro.
!else
_TCLDIR = $(TCLDIR:/=\)
!if exist("$(_TCLDIR)\include\tcl.h")
-TCLH = "$(_TCLDIR)\include\tcl.h"
TCLINSTALL = 1
+_TCL_H = $(_TCLDIR)\include\tcl.h
!elseif exist("$(_TCLDIR)\generic\tcl.h")
-TCLH = "$(_TCLDIR)\generic\tcl.h"
TCLINSTALL = 0
+_TCL_H = $(_TCLDIR)\generic\tcl.h
!else
MSG =^
Failed to find tcl.h. The TCLDIR macro does not appear correct.
!error $(MSG)
!endif
!endif
+!endif
-#----------------------------------------------------------
-# Get the version from the header file. Try all possibles
-# even though some aren't fully valid.
-#----------------------------------------------------------
+#--------------------------------------------------------------
+# Extract various version numbers from tcl headers
+# The generated file is then included in the makefile.
+#--------------------------------------------------------------
-!if [nmakehlp -g $(TCLH) TCL_VERSION] == 76
-TCL_DOTVERSION = 7.6
-!elseif [nmakehlp -g $(TCLH) TCL_VERSION] == 80
-TCL_DOTVERSION = 8.0
-!elseif [nmakehlp -g $(TCLH) TCL_VERSION] == 81
-TCL_DOTVERSION = 8.1
-!elseif [nmakehlp -g $(TCLH) TCL_VERSION] == 82
-TCL_DOTVERSION = 8.2
-!elseif [nmakehlp -g $(TCLH) TCL_VERSION] == 83
-TCL_DOTVERSION = 8.3
-!elseif [nmakehlp -g $(TCLH) TCL_VERSION] == 84
-TCL_DOTVERSION = 8.4
-!elseif [nmakehlp -g $(TCLH) TCL_VERSION] == 85
-TCL_DOTVERSION = 8.5
-!elseif [nmakehlp -g $(TCLH) TCL_VERSION] == 86
-TCL_DOTVERSION = 8.6
-!elseif [nmakehlp -g $(TCLH) TCL_VERSION] == 90
-TCL_DOTVERSION = 9.0
-!elseif [nmakehlp -g $(TCLH) TCL_VERSION] == 0
-MSG =^
-Can't get version string from $(TCLH)
-!error $(MSG)
+!if [echo REM = This file is generated from rules.vc > versions.vc]
+!endif
+!if [echo TCL_MAJOR_VERSION = \>> versions.vc] \
+ && [nmakehlp -V "$(_TCL_H)" TCL_MAJOR_VERSION >> versions.vc]
+!endif
+!if [echo TCL_MINOR_VERSION = \>> versions.vc] \
+ && [nmakehlp -V "$(_TCL_H)" TCL_MINOR_VERSION >> versions.vc]
+!endif
+!if [echo TCL_PATCH_LEVEL = \>> versions.vc] \
+ && [nmakehlp -V "$(_TCL_H)" TCL_PATCH_LEVEL >> versions.vc]
!endif
-TCL_VERSION = $(TCL_DOTVERSION:.=)
+# If building the tcl core then we need additional package versions
+!if "$(PROJECT)" == "tcl"
+!if [echo PKG_HTTP_VER = \>> versions.vc] \
+ && [nmakehlp -V ..\library\http\pkgIndex.tcl http >> versions.vc]
+!endif
+!if [echo PKG_TCLTEST_VER = \>> versions.vc] \
+ && [nmakehlp -V ..\library\tcltest\pkgIndex.tcl tcltest >> versions.vc]
+!endif
+!if [echo PKG_MSGCAT_VER = \>> versions.vc] \
+ && [nmakehlp -V ..\library\msgcat\pkgIndex.tcl msgcat >> versions.vc]
+!endif
+!if [echo PKG_PLATFORM_VER = \>> versions.vc] \
+ && [nmakehlp -V ..\library\platform\pkgIndex.tcl "platform " >> versions.vc]
+!endif
+!if [echo PKG_SHELL_VER = \>> versions.vc] \
+ && [nmakehlp -V ..\library\platform\pkgIndex.tcl "platform::shell" >> versions.vc]
+!endif
+!endif
+
+!include versions.vc
+
+#--------------------------------------------------------------
+# Setup tcl version dependent stuff headers
+#--------------------------------------------------------------
+
+!if "$(PROJECT)" != "tcl"
+
+TCL_VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
!if $(TCL_VERSION) < 81
TCL_DOES_STUBS = 0
@@ -504,16 +546,23 @@ TCL_DOES_STUBS = 1
!endif
!if $(TCLINSTALL)
-TCLSH = "$(_INSTALLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX).exe"
-TCLSTUBLIB = "$(_INSTALLDIR)\lib\tclstub$(TCL_VERSION).lib"
-TCLIMPLIB = "$(_INSTALLDIR)\lib\tcl$(TCL_VERSION)$(SUFX).lib"
-TCL_LIBRARY = $(_INSTALLDIR)\lib
-TCLREGLIB = "$(_INSTALLDIR)\lib\tclreg11$(SUFX:t=).lib"
-TCLDDELIB = "$(_INSTALLDIR)\lib\tcldde12$(SUFX:t=).lib"
+TCLSH = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX).exe"
+!if !exist($(TCLSH)) && $(TCL_THREADS)
+TCLSH = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)t$(SUFX).exe"
+!endif
+TCLSTUBLIB = "$(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib"
+TCLIMPLIB = "$(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX).lib"
+TCL_LIBRARY = $(_TCLDIR)\lib
+TCLREGLIB = "$(_TCLDIR)\lib\tclreg11$(SUFX:t=).lib"
+TCLDDELIB = "$(_TCLDIR)\lib\tcldde12$(SUFX:t=).lib"
COFFBASE = \must\have\tcl\sources\to\build\this\target
TCLTOOLSDIR = \must\have\tcl\sources\to\build\this\target
+TCL_INCLUDES = -I"$(_TCLDIR)\include"
!else
TCLSH = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)$(SUFX).exe"
+!if !exist($(TCLSH)) && $(TCL_THREADS)
+TCLSH = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)t$(SUFX).exe"
+!endif
TCLSTUBLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib"
TCLIMPLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX).lib"
TCL_LIBRARY = $(_TCLDIR)\library
@@ -521,48 +570,84 @@ TCLREGLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg11$(SUFX:t=).lib"
TCLDDELIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde12$(SUFX:t=).lib"
COFFBASE = "$(_TCLDIR)\win\coffbase.txt"
TCLTOOLSDIR = $(_TCLDIR)\tools
+TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win"
!endif
!endif
+#-------------------------------------------------------------------------
+# Locate the Tk headers to build against
+#-------------------------------------------------------------------------
-#--------------------------------------------------------------
-# Extract various version numbers from tcl modules and headers
-# The generated file is then included in the makefile.
-#--------------------------------------------------------------
-
-!if "$(PROJECT)" == "tcl"
-
-!if [echo REM = This file is generated from rules.vc > versions.vc]
+!if "$(PROJECT)" == "tk"
+_TK_H = ..\generic\tk.h
+_INSTALLDIR = $(_INSTALLDIR)\..
!endif
-# Note we can do the Tcl and/or Tk version extraction
-!if [echo TCL_MAJOR_VERSION = \>> versions.vc] \
- && [nmakehlp -V ..\generic\tcl.h TCL_MAJOR_VERSION >> versions.vc]
-!endif
-!if [echo TCL_MINOR_VERSION = \>> versions.vc] \
- && [nmakehlp -V ..\generic\tcl.h TCL_MINOR_VERSION >> versions.vc]
+
+!ifdef PROJECT_REQUIRES_TK
+!if !defined(TKDIR)
+!if exist("$(_INSTALLDIR)\..\include\tk.h")
+TKINSTALL = 1
+_TKDIR = $(_INSTALLDIR)\..
+_TK_H = $(_TKDIR)\include\tk.h
+TKDIR = $(_TKDIR)
+!elseif exist("$(_TCLDIR)\include\tk.h")
+TKINSTALL = 1
+_TKDIR = $(_TCLDIR)
+_TK_H = $(_TKDIR)\include\tk.h
+TKDIR = $(_TKDIR)
!endif
-!if [echo TCL_PATCH_LEVEL = \>> versions.vc] \
- && [nmakehlp -V ..\generic\tcl.h TCL_PATCH_LEVEL >> versions.vc]
+!else
+_TKDIR = $(TKDIR:/=\)
+!if exist("$(_TKDIR)\include\tk.h")
+TKINSTALL = 1
+_TK_H = $(_TKDIR)\include\tk.h
+!elseif exist("$(_TKDIR)\generic\tk.h")
+TKINSTALL = 0
+_TK_H = $(_TKDIR)\generic\tk.h
+!else
+MSG =^
+Failed to find tk.h. The TKDIR macro does not appear correct.
+!error $(MSG)
!endif
-!if [echo PKG_HTTP_VER = \>> versions.vc] \
- && [nmakehlp -V ..\library\http\pkgIndex.tcl http >> versions.vc]
!endif
-!if [echo PKG_TCLTEST_VER = \>> versions.vc] \
- && [nmakehlp -V ..\library\tcltest\pkgIndex.tcl tcltest >> versions.vc]
!endif
-!if [echo PKG_MSGCAT_VER = \>> versions.vc] \
- && [nmakehlp -V ..\library\msgcat\pkgIndex.tcl msgcat >> versions.vc]
+
+#-------------------------------------------------------------------------
+# Extract Tk version numbers
+#-------------------------------------------------------------------------
+
+!if defined(PROJECT_REQUIRES_TK) || "$(PROJECT)" == "tk"
+
+!if [echo TK_MAJOR_VERSION = \>> versions.vc] \
+ && [nmakehlp -V $(_TK_H) TK_MAJOR_VERSION >> versions.vc]
!endif
-!if [echo PKG_PLATFORM_VER = \>> versions.vc] \
- && [nmakehlp -V ..\library\platform\pkgIndex.tcl "platform " >> versions.vc]
+!if [echo TK_MINOR_VERSION = \>> versions.vc] \
+ && [nmakehlp -V $(_TK_H) TK_MINOR_VERSION >> versions.vc]
!endif
-!if [echo PKG_SHELL_VER = \>> versions.vc] \
- && [nmakehlp -V ..\library\platform\pkgIndex.tcl "platform::shell" >> versions.vc]
+!if [echo TK_PATCH_LEVEL = \>> versions.vc] \
+ && [nmakehlp -V $(_TK_H) TK_PATCH_LEVEL >> versions.vc]
!endif
!include versions.vc
+TK_DOTVERSION = $(TK_MAJOR_VERSION).$(TK_MINOR_VERSION)
+TK_VERSION = $(TK_MAJOR_VERSION)$(TK_MINOR_VERSION)
+
+!if "$(PROJECT)" != "tk"
+!if $(TKINSTALL)
+WISH = "$(_TKDIR)\bin\wish$(TK_VERSION)$(SUFX).exe"
+TKSTUBLIB = "$(_TKDIR)\lib\tkstub$(TK_VERSION).lib"
+TKIMPLIB = "$(_TKDIR)\lib\tk$(TK_VERSION)$(SUFX).lib"
+TK_INCLUDES = -I"$(_TKDIR)\include"
+!else
+WISH = "$(_TKDIR)\win\$(BUILDDIRTOP)\wish$(TCL_VERSION)$(SUFX).exe"
+TKSTUBLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tkstub$(TCL_VERSION).lib"
+TKIMPLIB = "$(_TKDIR)\win\$(BUILDDIRTOP)\tk$(TCL_VERSION)$(SUFX).lib"
+TK_INCLUDES = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib"
+!endif
+!endif
+
!endif
#----------------------------------------------------------
@@ -573,8 +658,8 @@ TCLTOOLSDIR = $(_TCLDIR)\tools
!message *** Output directory will be '$(OUT_DIR)'
!message *** Suffix for binaries will be '$(SUFX)'
!message *** Optional defines are '$(OPTDEFINES)'
-!message *** Compiler version $(VCVER)
-!message *** Compiler options '$(OPTIMIZATIONS) $(DEBUGFLAGS)'
+!message *** Compiler version $(VCVER). Target machine is $(MACHINE)
+!message *** Compiler options '$(COMPILERFLAGS) $(OPTIMIZATIONS) $(DEBUGFLAGS) $(WARNINGS)'
!message *** Link options '$(LINKERFLAGS)'
!endif
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index b1765dd..ac53b29 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinPort.h,v 1.48 2005/11/27 02:33:50 das Exp $
+ * RCS: @(#) $Id: tclWinPort.h,v 1.48.8.1 2007/10/15 18:38:09 dgp Exp $
*/
#ifndef _TCLWINPORT
@@ -520,13 +520,6 @@
#define TclpExit exit
-#ifdef TCL_WIDE_INT_TYPE
-MODULE_SCOPE Tcl_WideInt strtoll _ANSI_ARGS_((CONST char *string,
- char **endPtr, int base));
-MODULE_SCOPE Tcl_WideUInt strtoull _ANSI_ARGS_((CONST char *string,
- char **endPtr, int base));
-#endif /* TCL_WIDE_INT_TYPE */
-
#ifndef INVALID_SET_FILE_POINTER
#define INVALID_SET_FILE_POINTER 0xFFFFFFFF
#endif /* INVALID_SET_FILE_POINTER */