From: Andrew P. <at...@pi...> - 2014-09-26 00:51:28
|
mkstemp() does not exist on Windows, and Naviserver uses it in three places: $ find . -name "*.[ch]" -print | xargs grep -in mkstemp ./nsd/adpeval.c:1183: fd = mkstemp(debugfile); ./nsd/tclhttp.c:426: fd = mkstemp(httpPtr->spoolFileName); ./nsd/driver.c:2301: sockPtr->tfd = mkstemp(sockPtr->tfile); We could stick in our own mkstemp() implementation. Some starting points for that may be: http://stackoverflow.com/questions/6036227/mkstemp-implementation-for-win32 http://sourceforge.net/p/mingw/bugs/2003/ But Tcl 8.4 and later already have TclpCreateTempFile() (two separate implementations for Unix and Windows), which seems to solve the same problem. It returns a TclFile object, not a file descriptor. Can/should Naviserver's existing users of mkstemp() be modified to instead work with TclpCreateTempFile()? Or will that not quite work, and we should borrow some of the Windows version of TclpCreateTempFile() for direct use in Naviserver? -- Andrew Piskorski <at...@pi...> |