summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-11 20:02:40 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-11 20:02:40 (GMT)
commitf8c365412ab16261db162c4018b225b1dd096aa8 (patch)
tree02e91e1577770fb368b1db809c5f12096e38d614 /unix
parent9d94ed0d5461f1677bc5483a618768872457b7dc (diff)
parent00268d4ae68741fdbf73a54412cd38648f9d7302 (diff)
downloadtcl-f8c365412ab16261db162c4018b225b1dd096aa8.zip
tcl-f8c365412ab16261db162c4018b225b1dd096aa8.tar.gz
tcl-f8c365412ab16261db162c4018b225b1dd096aa8.tar.bz2
Merge 8.7
In test-cases, don't load Tcltest package if it isn't actually used. Another round of size_t related improvements. Nothing functional. Also improve some comments.
Diffstat (limited to 'unix')
-rw-r--r--unix/tclLoadAix.c4
-rw-r--r--unix/tclUnixPipe.c6
-rw-r--r--unix/tclUnixTest.c2
-rw-r--r--unix/tclUnixTime.c4
4 files changed, 7 insertions, 9 deletions
diff --git a/unix/tclLoadAix.c b/unix/tclLoadAix.c
index 88e6b50..e5d9729 100644
--- a/unix/tclLoadAix.c
+++ b/unix/tclLoadAix.c
@@ -134,7 +134,7 @@ dlopen(
return NULL;
}
- mp->name = malloc((unsigned) (strlen(path) + 1));
+ mp->name = malloc(strlen(path) + 1);
strcpy(mp->name, path);
/*
@@ -541,7 +541,7 @@ readExports(
tmpsym[SYMNMLEN] = '\0';
symname = tmpsym;
}
- ep->name = malloc((unsigned) (strlen(symname) + 1));
+ ep->name = malloc(strlen(symname) + 1);
strcpy(ep->name, symname);
ep->addr = (void *)((unsigned long)
mp->entry + ls->l_value - shdata.s_vaddr);
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index a7cd1c4..c42dfa7 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.c
@@ -872,7 +872,7 @@ TclGetAndDetachPids(
pipePtr = Tcl_GetChannelInstanceData(chan);
TclNewObj(pidsObj);
for (i = 0; i < pipePtr->numPids; i++) {
- Tcl_ListObjAppendElement(NULL, pidsObj, Tcl_NewLongObj(
+ Tcl_ListObjAppendElement(NULL, pidsObj, Tcl_NewWideIntObj(
PTR2INT(pipePtr->pidPtr[i])));
Tcl_DetachPids(1, &pipePtr->pidPtr[i]);
}
@@ -1268,7 +1268,7 @@ Tcl_PidObjCmd(
}
if (objc == 1) {
- Tcl_SetObjResult(interp, Tcl_NewLongObj((long) getpid()));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(getpid()));
} else {
/*
* Get the channel and make sure that it refers to a pipe.
@@ -1290,7 +1290,7 @@ Tcl_PidObjCmd(
resultPtr = Tcl_NewObj();
for (i = 0; i < pipePtr->numPids; i++) {
Tcl_ListObjAppendElement(NULL, resultPtr,
- Tcl_NewLongObj(PTR2INT(TclpGetPid(pipePtr->pidPtr[i]))));
+ Tcl_NewWideIntObj(PTR2INT(TclpGetPid(pipePtr->pidPtr[i]))));
}
Tcl_SetObjResult(interp, resultPtr);
}
diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c
index ceb64d9..ea28e18 100644
--- a/unix/tclUnixTest.c
+++ b/unix/tclUnixTest.c
@@ -761,7 +761,7 @@ TestchmodCmd(
if (translated == NULL) {
return TCL_ERROR;
}
- if (chmod(translated, (unsigned) mode) != 0) {
+ if (chmod(translated, mode) != 0) {
Tcl_AppendResult(interp, translated, ": ", Tcl_PosixError(interp),
NULL);
return TCL_ERROR;
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index 9ae5016..53545f4 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -17,9 +17,7 @@
#endif
/*
- * TclpGetDate is coded to return a pointer to a 'struct tm'. For thread
- * safety, this structure must be in thread-specific data. The 'tmKey'
- * variable is the key to this buffer.
+ * Static functions declared in this file.
*/
static void NativeScaleTime(Tcl_Time *timebuf,