On Windows 9x I get "Invalid command or file name" when issuing "fossil ui" command and each time browser sends a request to a fossil server.

The problem is in portable_system() -- 9x doesn't like a hack with double quotes around a command string. Since system(string) function on Windows is implemented as %COMSPEC% /c string, on 9x we get: %COMSPEC% /c ""fossil" http "foo"", which does not work, instead of normal: %COMSPEC% /c "fossil" http "foo", which doesn't work on NT etc.

A hack using double quotes around entire command string on Windows NT (2000, XP etc.) documented] and works because
cmd.exe strips the first and the last quote if a command starts with a quote. So there exists another dirty (and IIRC undocumented) hack. We could start command string with something that both cmd.exe and ignore:
<pre>%COMSPEC% /c ="fossil" http "foo"
%COMSPEC% /c ="fossil" http foo
%COMSPEC% /c =fossil http "foo"
%COMSPEC% /c =start

Commands above work just fine both in 9x and NT (up to Windows 7) as long as internal commands like echo or start are NOT quoted (<code>="start" doesn't work nor <code>"start" does). So, maybe <code>mprintf("=%s", zOrigCmd)</code> would be better? Any other ideas? And yes, I know, that it is 2010 now and 98 must be already dead… :-)