cvs commit: fptools/libraries/base/Foreign/C Error.hs fptools/libraries/base/cbits errno.c fptools/libraries/base/include HsBase.h ghc_errno.h

Simon Marlow simonmar at glass.cse.ogi.edu
Tue Jan 6 04:40:02 EST 2004


simonmar    2004/01/06 04:40:02 PST

  Modified files:
    libraries/base/Foreign/C Error.hs 
    libraries/base/include HsBase.h 
  Removed files:
    libraries/base/cbits errno.c 
    libraries/base/include ghc_errno.h 
  Log:
  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
  
  Revision  Changes    Path
  1.21      +18 -12    fptools/libraries/base/Foreign/C/Error.hs
  1.38      +3 -3      fptools/libraries/base/include/HsBase.h


More information about the Cvs-libraries mailing list