summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixPipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixPipe.c')
-rw-r--r--unix/tclUnixPipe.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index 21a0153..ccb97c2 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.51 2010/01/10 22:58:41 nijtmans Exp $
+ * RCS: @(#) $Id: tclUnixPipe.c,v 1.52 2010/04/02 21:21:06 kennykb Exp $
*/
#include "tclInt.h"
@@ -269,6 +269,40 @@ TclpTempFileName(void)
}
/*
+ *-----------------------------------------------------------------------------
+ *
+ * TclpTempFileNameForLibrary --
+ *
+ * Constructs a file name in the native file system where a
+ * dynamically loaded library may be placed.
+ *
+ * Results:
+ * Returns the constructed file name. If an error occurs,
+ * returns NULL and leaves an error message in the interpreter
+ * result.
+ *
+ * On Unix, it works to load a shared object from a file of any
+ * name, so this function is merely a thin wrapper around
+ * TclpTempFileName().
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+Tcl_Obj*
+TclpTempFileNameForLibrary(Tcl_Interp* interp, /* Tcl interpreter */
+ Tcl_Obj* path) /* Path name of the library
+ * in the VFS */
+{
+ Tcl_Obj* retval;
+ retval = TclpTempFileName();
+ if (retval == NULL) {
+ Tcl_AppendResult(interp, "couldn't create temporary file: ",
+ Tcl_PosixError(interp), NULL);
+ }
+ return retval;
+}
+
+/*
*----------------------------------------------------------------------
*
* TclpCreatePipe --