On Tue, Oct 08, 2024 at 04:58:11PM +0200, Gustaf Neumann (sslmail) wrote:

> What speaks against using the Tcl scripted approach is that so far, we 
> support NaviServer with tcl8.5. ???file tempfile??? was introduced in Tcl 8.6.

Ah, I hadn't realized 'file tempfile' was that new.  Maybe just wait
until NaviServer requires Tcl 8.6 or later?  Have you heard of anybody
who still really WANTS to stay on Tcl 8.5 for some reason?

> Furthermore, TclUnixOpenTemporaryFile() is just for Unix, and not part of the 
> public API (starting with ???Tcl_???). 

Well you'd never directly call TclUnixOpenTemporaryFile() of course.
That's just how TclFileTemporaryCmd() and TclpOpenTemporaryFile() are
implemented underneath.  The Windows implemenation uses GetTempPathW()
instead of mkstemp(), but presumably works the same at the Tcl level,
and in C when calling TclpOpenTemporaryFile().

> But providing this support is not a big thing, since we have in NaviServer 
> since a while support for mkstemp() also for windows (named ns_mkstemp)), 
> since we use this call internally on several places. I???ll cook something up 
> which is most version and platform independent, backward compatible, 
> providing depreciation messages, which can be turned off for ???hopeless 
> cases??? when admins get annoyed about to many depreciation messages.

That sounds great!  Thanks for taking care of this so proactively.

-- 
Andrew Piskorski <a...@piskorski.com>


_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to