Dear Andrew, We have to be careful on licence mixes. The tcl8.5 version of TclpCreateTempFile uses already mkstemp, but the windows implemetation looks like a slim approach for a win32 implementation (aside of the TclFile handling) using CreateFile* and the appropriate flags to make the file a temp file...
-g On 26.09.14 02:51, Andrew Piskorski wrote: > 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? > ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel