summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-05-29 16:27:28 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-05-29 16:27:28 (GMT)
commit8091425c93b8846adbfd2667a6b30120241d1552 (patch)
treee54fd2241767a20e454ab3285a63b551d4b62599
parent4c03aeaadd2a7bbc0cb5278b078c60bf5ea95957 (diff)
downloadtcl-8091425c93b8846adbfd2667a6b30120241d1552.zip
tcl-8091425c93b8846adbfd2667a6b30120241d1552.tar.gz
tcl-8091425c93b8846adbfd2667a6b30120241d1552.tar.bz2
int -> Tcl_Size, for full Tcl 9 support
-rw-r--r--unix/tclUnixChan.c15
-rw-r--r--win/tclWinChan.c2
2 files changed, 9 insertions, 8 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index f9a054a..f66e3c4 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -286,7 +286,7 @@ FileInputProc(
*/
do {
- bytesRead = read(fsPtr->fd, buf, (size_t) toRead);
+ bytesRead = read(fsPtr->fd, buf, (size_t)toRead);
} while ((bytesRead < 0) && (errno == EINTR));
if (bytesRead < 0) {
@@ -335,7 +335,7 @@ FileOutputProc(
return 0;
}
- written = write(fsPtr->fd, buf, (size_t) toWrite);
+ written = write(fsPtr->fd, buf, (size_t)toWrite);
if (written >= 0) {
return written;
}
@@ -748,7 +748,7 @@ FileGetOptionProc(
if ((len > 1) && (strncmp(optionName, "-stat", len) == 0)) {
Tcl_Obj *dictObj = StatOpenFile(fsPtr);
const char *dictContents;
- int dictLength;
+ Tcl_Size dictLength;
if (dictObj == NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -836,9 +836,9 @@ TtySetOptionProc(
const char *value) /* New value for option. */
{
TtyState *fsPtr = (TtyState *)instanceData;
- unsigned int len, vlen;
+ size_t len, vlen;
TtyAttrs tty;
- int argc;
+ Tcl_Size argc;
const char **argv;
struct termios iostate;
@@ -973,7 +973,8 @@ TtySetOptionProc(
if ((len > 4) && (strncmp(optionName, "-ttycontrol", len) == 0)) {
#if defined(TIOCMGET) && defined(TIOCMSET)
- int i, control, flag;
+ int control, flag;
+ Tcl_Size i;
if (Tcl_SplitList(interp, value, &argc, &argv) == TCL_ERROR) {
return TCL_ERROR;
@@ -1175,7 +1176,7 @@ TtyGetOptionProc(
Tcl_DString *dsPtr) /* Where to store value(s). */
{
TtyState *fsPtr = (TtyState *)instanceData;
- unsigned int len;
+ size_t len;
char buf[3*TCL_INTEGER_SPACE + 16];
int valid = 0; /* Flag if valid option parsed. */
struct termios iostate;
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index 6774634..545aa2d 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.c
@@ -1010,7 +1010,7 @@ FileGetOptionProc(
if (valid) {
Tcl_Obj *dictObj = StatOpenFile(infoPtr);
const char *dictContents;
- int dictLength;
+ Tcl_Size dictLength;
if (dictObj == NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(