summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-31 08:51:37 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-31 08:51:37 (GMT)
commitec84d91a805145aa911a00d4b5f53a8e4513276d (patch)
tree31b731828830c63fb6a6dc6e5d32cc74dc5df7f3 /win
parentd4d4aa830739f769c305b523fc4c7000c451845e (diff)
parent3ab4e9ca24a8f7e98e3f7e3040130ba4e3caf2dc (diff)
downloadtcl-ec84d91a805145aa911a00d4b5f53a8e4513276d.zip
tcl-ec84d91a805145aa911a00d4b5f53a8e4513276d.tar.gz
tcl-ec84d91a805145aa911a00d4b5f53a8e4513276d.tar.bz2
Merge 8.6
Diffstat (limited to 'win')
-rw-r--r--win/cat.c6
-rw-r--r--win/makefile.vc4
-rw-r--r--win/rules.vc9
3 files changed, 15 insertions, 4 deletions
diff --git a/win/cat.c b/win/cat.c
index 3a821a4..bd84dd4 100644
--- a/win/cat.c
+++ b/win/cat.c
@@ -28,14 +28,14 @@ _tmain(void)
const char *err;
while (1) {
- n = read(0, buf, sizeof(buf));
+ n = _read(0, buf, sizeof(buf));
if (n <= 0) {
break;
}
- write(1, buf, n);
+ _write(1, buf, n);
}
err = (sizeof(int) == 2) ? "stderr16" : "stderr32";
- write(2, err, (unsigned int)strlen(err));
+ _write(2, err, (unsigned int)strlen(err));
return 0;
}
diff --git a/win/makefile.vc b/win/makefile.vc
index 501121a..c2343a0 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -52,7 +52,7 @@
# turn on the 64-bit compiler, if your SDK has it.
#
# Basic macros and options usable on the commandline (see rules.vc for more info):
-# OPTS=msvcrt,static,staticpkg,symbols,profile,unchecked,time64bit,none
+# OPTS=msvcrt,static,staticpkg,symbols,profile,unchecked,time64bit,utfmax,none
# Sets special options for the core. The default is for none.
# Any combination of the above may be used (comma separated).
# 'none' will over-ride everything to nothing.
@@ -74,6 +74,8 @@
# or libcmt.lib not libcmtd.lib).
# time64bit = Forces a build using 64-bit time_t for 32-bit build
# (CRT library should support this).
+# utfmax = Forces Tcl_UniChar to be a 32-bit quantity in stead
+# of 16-bits
#
# STATS=compdbg,memdbg,none
# Sets optional memory and bytecode compiler debugging code added
diff --git a/win/rules.vc b/win/rules.vc
index a0cf06a..3fa0704 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -688,6 +688,7 @@ LINKERFLAGS = $(LINKERFLAGS) -ltcg
# configuration (ignored for Tcl itself)
# _USE_64BIT_TIME_T - forces a build using 64-bit time_t for 32-bit build
# (CRT library should support this)
+# TCL_UTF_MAX=6 - forces a build using 32-bit Tcl_UniChar in stead of 16-bit.
# Further, LINKERFLAGS are modified based on above.
# Default values for all the above
@@ -752,6 +753,11 @@ TCL_USE_STATIC_PACKAGES = 0
_USE_64BIT_TIME_T = 1
!endif
+!if [nmakehlp -f $(OPTS) "utfmax"]
+!message *** Force 32-bit Tcl_UniChar
+TCL_UTF_MAX = 6
+!endif
+
# Yes, it's weird that the "symbols" option controls DEBUG and
# the "pdbs" option controls SYMBOLS. That's historical.
!if [nmakehlp -f $(OPTS) "symbols"]
@@ -1315,6 +1321,9 @@ OPTDEFINES = $(OPTDEFINES) -DNO_STRTOI64
!if "$(_USE_64BIT_TIME_T)" == "1"
OPTDEFINES = $(OPTDEFINES) -D_USE_64BIT_TIME_T
!endif
+!if "$(TCL_UTF_MAX)" == "6"
+OPTDEFINES = $(OPTDEFINES) -DTCL_UTF_MAX=6
+!endif
# _ATL_XP_TARGETING - Newer SDK's need this to build for XP
COMPILERFLAGS = /D_ATL_XP_TARGETING