From 7cde555d819ee12a349287737872af0bb89f3902 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 14 Nov 2012 16:30:27 +0000 Subject: Fix botched patch --- unix/tclUnixPipe.c | 15 +++++++++++++-- 1 file 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"); -- cgit v0.12