summaryrefslogtreecommitdiffstats
path: root/generic/tclIOUtil.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-02-18 10:56:12 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-02-18 10:56:12 (GMT)
commit340a361ed19847861c47b986eb8d522c1a6cc700 (patch)
tree6b6bdfeebd073f7857ec4893ca9bb3a9b008b3aa /generic/tclIOUtil.c
parente810c9099a64e6af0d3aad22f673de6edcb68cd7 (diff)
parentecc126bc275141ebdaa83e74dd87645d1680d01c (diff)
downloadtcl-340a361ed19847861c47b986eb8d522c1a6cc700.zip
tcl-340a361ed19847861c47b986eb8d522c1a6cc700.tar.gz
tcl-340a361ed19847861c47b986eb8d522c1a6cc700.tar.bz2
merge novem
Diffstat (limited to 'generic/tclIOUtil.c')
-rw-r--r--generic/tclIOUtil.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index ab40b7b..edcb3e0 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -19,7 +19,7 @@
*/
#include "tclInt.h"
-#ifdef __WIN32__
+#ifdef _WIN32
# include "tclWinInt.h"
#endif
#include "tclFileSystem.h"
@@ -267,6 +267,7 @@ Tcl_Stat(
ret = Tcl_FSStat(pathPtr, &buf);
Tcl_DecrRefCount(pathPtr);
if (ret != -1) {
+#ifndef TCL_WIDE_INT_IS_LONG
Tcl_WideInt tmp1, tmp2, tmp3 = 0;
# define OUT_OF_RANGE(x) \
@@ -304,6 +305,7 @@ Tcl_Stat(
# undef OUT_OF_RANGE
# undef OUT_OF_URANGE
+#endif /* !TCL_WIDE_INT_IS_LONG */
/*
* Copy across all supported fields, with possible type coercions on
@@ -774,7 +776,7 @@ TclFinalizeFilesystem(void)
* filesystem is likely to fail.
*/
-#ifdef __WIN32__
+#ifdef _WIN32
TclWinEncodingsCleanup();
#endif
}
@@ -801,7 +803,7 @@ TclResetFilesystem(void)
filesystemList = &nativeFilesystemRecord;
theFilesystemEpoch++;
-#ifdef __WIN32__
+#ifdef _WIN32
/*
* Cleans up the win32 API filesystem proc lookup table. This must happen
* very late in finalization so that deleting of copied dlls can occur.
@@ -3207,6 +3209,9 @@ Tcl_LoadFile(
*/
copyToPtr = TclpTempFileNameForLibrary(interp, pathPtr);
+ if (copyToPtr == NULL) {
+ return TCL_ERROR;
+ }
Tcl_IncrRefCount(copyToPtr);
copyFsPtr = Tcl_FSGetFileSystemForPath(copyToPtr);
@@ -3234,7 +3239,7 @@ Tcl_LoadFile(
return TCL_ERROR;
}
-#ifndef __WIN32__
+#ifndef _WIN32
/*
* Do we need to set appropriate permissions on the file? This may be
* required on some systems. On Unix we could loop over the file