[project @ 2004-01-06 12:40:00 by simonmar]
authorsimonmar <unknown>
Tue, 6 Jan 2004 12:40:01 +0000 (12:40 +0000)
committersimonmar <unknown>
Tue, 6 Jan 2004 12:40:01 +0000 (12:40 +0000)
commitc5b1770b352e3098de3a88fbb94aa55785b49ed5
treee36f7709d0130b8f46b056aebff464dde01e03c8
parentb9f76ae04a6df4e7251e725c381588209773c0b3
[project @ 2004-01-06 12:40:00 by simonmar]
Fix, and simplify, the getting/setting of errno in Foreign.C.Error.

It was previously wrong: although we called a C function to get the
location of errno (correct), we cached the result in a CAF which was
wrong because the location is OS thread dependent.  We must call the C
function every time we need the value of errno.

I also simplified things by making the getter/setter functions inlined
in the same way as the other C fragments in this library, and putting
them in HsBase.h.

MERGE TO STABLE
Foreign/C/Error.hs
cbits/errno.c [deleted file]
include/HsBase.h
include/ghc_errno.h [deleted file]