summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-11-14 16:30:27 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-11-14 16:30:27 (GMT)
commit7cde555d819ee12a349287737872af0bb89f3902 (patch)
treed5594fec4f4bb4f7252877a68a6a16c99ec7c5f0
parentc1dd40e848612804dfe4d18f1f687acae3b7b2a6 (diff)
downloadtcl-7cde555d819ee12a349287737872af0bb89f3902.zip
tcl-7cde555d819ee12a349287737872af0bb89f3902.tar.gz
tcl-7cde555d819ee12a349287737872af0bb89f3902.tar.bz2
Fix botched patch
-rw-r--r--unix/tclUnixPipe.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index 4540ae6..33f51c6 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.c
@@ -19,6 +19,16 @@
#endif
/*
+ * Fallback temporary file location the temporary file generation code. Can be
+ * overridden at compile time for when it is known that temp files can't be
+ * written to /tmp (hello, iOS!).
+ */
+
+#ifndef TCL_TEMPORARY_FILE_DIRECTORY
+#define TCL_TEMPORARY_FILE_DIRECTORY "/tmp"
+#endif
+
+/*
* The following macros convert between TclFile's and fd's. The conversion
* simple involves shifting fd's up by one to ensure that no valid fd is ever
* the same as NULL.
@@ -62,6 +72,7 @@ static int PipeOutputProc _ANSI_ARGS_((
static void PipeWatchProc _ANSI_ARGS_((ClientData instanceData, int mask));
static void RestoreSignals _ANSI_ARGS_((void));
static int SetupStdFile _ANSI_ARGS_((TclFile file, int type));
+static CONST char * DefaultTempDir _ANSI_ARGS_((void));
/*
* This structure describes the channel type structure for command pipe
@@ -278,10 +289,10 @@ TclpTempFileName()
*----------------------------------------------------------------------
*/
-static const char *
+static CONST char *
DefaultTempDir(void)
{
- const char *dir;
+ CONST char *dir;
struct stat buf;
dir = getenv("TMPDIR");