[Added osicat-devel to the Cc: list.]
On Tue, Dec 22, 2009 at 11:17 AM, Nikodemus Siivola
<nikodemus(a)random-state.net> wrote:
> Assuming someone had the time to do it, would all involved be happy if
> iolib and osicat shared a low-level POSIX/BSD/Linux API with minimal
> deps, or are there reasons not to use a shared layer?
Initially the new Osicat stuff was in a library called CL-POSIX.
However it turns out to be useful to share a bit of code between
posix, windows, mach, etc. In particular, it's nice to have e.g. posix
and windows errors inherit from a common condition.
Thus OSICAT-SYS was born, that includes code shared by OSICAT-POSIX,
OSICAT-WINDOWS and OSICAT-MACH. OSICAT is then implemented on top of
these. Splitting all these into different projects didn't seem worth
the trouble at the time. Still doesn't seem worth the trouble right
now, what do you think?
> Also related to both Osicat and iolib: neither includes the name of
> the failing syscall in the error conditions they signal. I don't quite
> understand the way the CFFI type system works to provide these, but
> assuming you do... would it be hard to add it in?
It was fairly straightforward:
OSICAT> (handler-case (nix:mkdir "/" 0)
(nix:eisdir (c) ; OSX signals this funny error
(nix::posix-error-syscall c)))
OSICAT-POSIX:MKDIR
Is this what you were looking for? If yes, I'll clean up the attached
patch and commit it to Osicat.
--
Luís Oliveira
http://r42.eu/~luis/
I pushed a few additions used by qthemlock to the Osicat master --
mostly termios related.
Even if they qthemlock should move away from Osicat, they still belong
appropriately to NIX.
Cheers,
-- Nikodemus