Hi!

I have applied the TclVFS changes to the CVS tree.
The previous state is tagged as "before-tclvfs"
if you need to wholesale backoff the changes for
some reason.

I have tried (my best) to locate all possible uses
of OS file-related calls and re-writte them with
Tcl_FS counterparts.

Exceptions are: log.c, tclfile.c and nslog/nslog.c
where this was not possible due to interdependence
of channels and threads in Tcl.

Special cases are: adpeval.c, adpreqest.c, fastpath.c
and urlopen.c. I have followed different logic there.
First, the OS call is applied (access, stat, open, read,
write etc). If this call failed, the Tcl_FS conunterpart
is applied. If this also failed, the error is thrown.
This way the VFS is second-class citizen in parts sensible
to performance. I'm pretty sure that you will not hit any
performance problem this way.

The modload.c is entirely rewritten to utilitze Tcl_FSLoadFile
which is *very* clever beast. As a side-effect, some public
C-API calls have been removed, while obsolete (I already
reported that in one of my previous email).

Please test the new code and if you find something awkward,
tell me immediately so I can fix it.

From this point, NS should be able to serve pages from
any Tcl_VFS compatible filesystem. Moreover, it should be
capable of starting out of starpack, etc... This is STILL NOT
supported NOR tested, but I will soon get this done as well.

My target is to be able to wrap-up a distribution consisting
of a single executable file containing all the shared libs
and data needed to run a web-site and/or application.

Cheers
Zoran

Reply via email to