summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2001-09-28 14:29:22 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2001-09-28 14:29:22 (GMT)
commit45a151a70dec0822c0f3b37344b20ee28b9c1460 (patch)
tree3bdf8d1fca25eb2f0076c978df408cd6696c7aec /unix
parent129498a7498a4bf8d13a08e387a847bf26d01d04 (diff)
downloadtcl-45a151a70dec0822c0f3b37344b20ee28b9c1460.zip
tcl-45a151a70dec0822c0f3b37344b20ee28b9c1460.tar.gz
tcl-45a151a70dec0822c0f3b37344b20ee28b9c1460.tar.bz2
Factoring out some more 64/32-bit OS interfaces
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixChan.c4
-rw-r--r--unix/tclUnixFCmd.c14
-rw-r--r--unix/tclUnixFile.c6
-rw-r--r--unix/tclUnixPipe.c4
4 files changed, 14 insertions, 14 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 1a51927..1b43ce7 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -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: tclUnixChan.c,v 1.21.6.4 2001/09/27 15:48:17 dkf Exp $
+ * RCS: @(#) $Id: tclUnixChan.c,v 1.21.6.5 2001/09/28 14:29:23 dkf Exp $
*/
#include "tclInt.h" /* Internal definitions for Tcl. */
@@ -1326,7 +1326,7 @@ TclpOpenFileChannel(interp, pathPtr, modeString, permissions)
if (native == NULL) {
return NULL;
}
- fd = open(native, mode, permissions);
+ fd = Tcl_PlatformOpen(native, mode, permissions);
if (fd < 0) {
if (interp != (Tcl_Interp *) NULL) {
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 8bdbcaa..8be096b 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -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: tclUnixFCmd.c,v 1.12.6.6 2001/09/27 15:48:17 dkf Exp $
+ * RCS: @(#) $Id: tclUnixFCmd.c,v 1.12.6.7 2001/09/28 14:29:23 dkf Exp $
*
* Portions of this code were derived from NetBSD source code which has
* the following copyright notice:
@@ -230,7 +230,7 @@ DoRenameFile(src, dst)
if (errno == EINVAL) {
char srcPath[MAXPATHLEN], dstPath[MAXPATHLEN];
DIR *dirPtr;
- struct dirent *dirEntPtr;
+ Tcl_DirEntry *dirEntPtr;
if ((realpath((char *) src, srcPath) != NULL) /* INTL: Native. */
&& (realpath((char *) dst, dstPath) != NULL) /* INTL: Native. */
@@ -238,7 +238,7 @@ DoRenameFile(src, dst)
dirPtr = opendir(dst); /* INTL: Native. */
if (dirPtr != NULL) {
while (1) {
- dirEntPtr = readdir(dirPtr); /* INTL: Native. */
+ dirEntPtr = Tcl_PlatformReaddir(dirPtr); /* INTL: Native. */
if (dirEntPtr == NULL) {
break;
}
@@ -415,11 +415,11 @@ CopyFile(src, dst, statBufPtr)
char *buffer; /* Data buffer for copy */
size_t nread;
- if ((srcFd = open(src, O_RDONLY, 0)) < 0) { /* INTL: Native. */
+ if ((srcFd = Tcl_PlatformOpen(src,O_RDONLY,0)) < 0) { /* INTL: Native. */
return TCL_ERROR;
}
- dstFd = open(dst, O_CREAT | O_TRUNC | O_WRONLY, /* INTL: Native. */
+ dstFd = Tcl_PlatformOpen(dst, O_CREAT|O_TRUNC|O_WRONLY,/* INTL: Native. */
statBufPtr->st_mode);
if (dstFd < 0) {
close(srcFd);
@@ -772,7 +772,7 @@ TraverseUnixTree(traverseProc, sourcePtr, targetPtr, errorPtr)
CONST char *source, *errfile;
int result, sourceLen;
int targetLen;
- struct dirent *dirEntPtr;
+ Tcl_DirEntry *dirEntPtr;
DIR *dirPtr;
errfile = NULL;
@@ -816,7 +816,7 @@ TraverseUnixTree(traverseProc, sourcePtr, targetPtr, errorPtr)
targetLen = Tcl_DStringLength(targetPtr);
}
- while ((dirEntPtr = readdir(dirPtr)) != NULL) { /* INTL: Native. */
+ while ((dirEntPtr = Tcl_PlatformReaddir(dirPtr)) != NULL) { /* INTL: Native. */
if ((strcmp(dirEntPtr->d_name, ".") == 0)
|| (strcmp(dirEntPtr->d_name, "..") == 0)) {
continue;
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 97e2da5..35d9eb0 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixFile.c,v 1.12.6.5 2001/09/27 15:48:17 dkf Exp $
+ * RCS: @(#) $Id: tclUnixFile.c,v 1.12.6.6 2001/09/28 14:29:23 dkf Exp $
*/
#include "tclInt.h"
@@ -295,9 +295,9 @@ TclpMatchInDirectory(interp, resultPtr, pathPtr, pattern, types)
while (1) {
Tcl_DString utfDs;
char *utf;
- struct dirent *entryPtr;
+ Tcl_DirEntry *entryPtr;
- entryPtr = readdir(d); /* INTL: Native. */
+ entryPtr = Tcl_PlatformReaddir(d); /* INTL: Native. */
if (entryPtr == NULL) {
break;
}
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index 4d82638..23410fc 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.c
@@ -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: tclUnixPipe.c,v 1.15.6.4 2001/09/27 15:48:17 dkf Exp $
+ * RCS: @(#) $Id: tclUnixPipe.c,v 1.15.6.5 2001/09/28 14:29:23 dkf Exp $
*/
#include "tclInt.h"
@@ -140,7 +140,7 @@ TclpOpenFile(fname, mode)
Tcl_DString ds;
native = Tcl_UtfToExternalDString(NULL, fname, -1, &ds);
- fd = open(native, mode, 0666); /* INTL: Native. */
+ fd = Tcl_PlatformOpen(native, mode, 0666); /* INTL: Native. */
Tcl_DStringFree(&ds);
if (fd != -1) {
fcntl(fd, F_SETFD, FD_CLOEXEC);