Pierre Free Pascal wrote:
  I looked a little on the API declared by Sanos
and I think that it would probably be easier
to use our Unix targets to get a reasonable support
for this OS rather than trying to use the Win32 subset.
  The C API seems to be far more extended than
the small Win32 emulation layer.

  Otherwise you will really need to strip the RTL down a lot:
Do not rely on exported function in DLL's
looking into sources, you will discover that lots
are only pseudo implementations doing nothing.
See for instance
SetConsoleCtrlHandler implementation in:
http://www.jbox.dk/sanos/source/win32/kernel32/kernel32.c.html

SetConsoleCtrlHandler is the central function
used inside Windows RTL to support exceptions on that target...
Using signals.pp unit might help for this particular problem
as thread specific exceptions with thread information block
seems to be supported (but I didn't test it).

I'm tinkering with it at present. If I can get it to the point where an empty program "runs" then I'll be happy for the moment, if it runs a Hello World which also runs on Windows then I'll consider it time well spent.

I don't intend to put much effort into this since I don't know whether Sanos really is useful for anything, but I think it has potential as an upgrade for DOS+Go32. After all, if somebody wants a unix-style OS there's plenty of cut-down Linuxes.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to