[darcs-users] darcs patch: eliminate HAVE_SIGNALS. (and 1 more)

Eric Kow kowey at darcs.net
Thu Mar 26 08:55:48 UTC 2009


On Thu, Mar 26, 2009 at 16:46:13 +1100, Trent W.Buck wrote:
> Per Eric's lead, I'm pinching bits from David's branch.
> Reducing the number of definitions always sounds like a good idea.
> Hopefully this doesn't break Windows? ;-)

That's exactly what I'm wondering.
Comments, Salvatore?

> Sat Nov 15 05:36:32 EST 2008  David Roundy <droundy at darcs.net>
>   * eliminate HAVE_SIGNALS.
> 
> Thu Mar 26 16:25:39 EST 2009  Trent W. Buck <trentbuck at gmail.com>
>   * Remove obsolete -DHAVE_SIGNALS from Cabal.
> 

eliminate HAVE_SIGNALS.
-----------------------
> David Roundy <droundy at darcs.net>**20081114183632
>  Ignore-this: a806bdb67082e601c2b4a9a6d08c3ff0
> ] hunk ./configure.ac 251
>    dnl if we're not in windows, we need System.Posix.Files
>    GHC_CHECK_MODULE(System.Posix.Files, unix, undefined,,
>                     AC_MSG_ERROR(Cannot find System.Posix.Files; try installing the Haskell package unix?))
> -  dnl Check if we have System.Posix.Signals
> -  GHC_CHECK_MODULE(System.Posix.Signals, unix, installHandler,
> -                   AC_DEFINE(HAVE_SIGNALS),AC_MSG_WARN(Cannot find System.Posix.Signals; interrupt handling disabled))
>  fi
>  
>  dnl Make default to have optimizations on...
> hunk ./src/Workaround.hs 8
>                      installHandler, raiseSignal, Handler(..), Signal,
>                      sigINT, sigHUP, sigABRT, sigALRM, sigTERM, sigPIPE ) where
>  
> -#ifdef HAVE_SIGNALS
> -import System.Posix.Signals(installHandler, raiseSignal, Handler(..), Signal,
> -                         sigINT, sigHUP, sigABRT, sigALRM, sigTERM, sigPIPE,)
> -#endif
> -
>  #ifdef WIN32
>  import qualified System.Directory ( renameFile, getCurrentDirectory, removeFile )
>  import qualified Control.Exception ( block )
> hunk ./src/Workaround.hs 13
>  import qualified System.IO.Error ( isDoesNotExistError, ioError, catch )
>  #else
> +import System.Posix.Signals(installHandler, raiseSignal, Handler(..), Signal,
> +                            sigINT, sigHUP, sigABRT, sigALRM, sigTERM, sigPIPE)
>  import System.Directory ( renameFile, getCurrentDirectory )
>  import System.Posix.Files (fileMode,getFileStatus, setFileMode,
>                             setFileCreationMask,
> hunk ./src/Workaround.hs 24
>  import Data.Bits ( (.&.), (.|.), complement )
>  #endif
>  
> -#ifndef HAVE_SIGNALS
> +#ifdef WIN32
>  -- Dummy implementation of POSIX signals
>  data Handler = Default | Ignore | Catch (IO ())
>  type Signal = Int
> hunk ./src/Workaround.hs 44
>  sigTERM = 0
>  sigPIPE = 0
>  sigALRM = 0
> -#endif
>  
> hunk ./src/Workaround.hs 45
> -#ifdef WIN32
>  {-
>  System.Directory.renameFile incorrectly fails when the new file already
>  exists.  This code works around that bug at the cost of losing atomic


Remove obsolete -DHAVE_SIGNALS from Cabal.
------------------------------------------
> Trent W. Buck <trentbuck at gmail.com>**20090326052539
>  Ignore-this: eb38c54f9c58b8c80ebc536f32ba43c5
> > hunk ./darcs.cabal 322
>  
>    if !os(windows)
>      build-depends: unix >= 1.0 && < 2.4
> -    cpp-options:   -DHAVE_SIGNALS
>  
>    if flag(base3)
>      build-depends: base >= 3,
> hunk ./darcs.cabal 454
>  
>    if !os(windows)
>      build-depends: unix >= 1.0 && < 2.4
> -    cpp-options:   -DHAVE_SIGNALS
>  
>    if flag(base3)
>      build-depends: base >= 3,
> hunk ./darcs.cabal 587
>  
>    if !os(windows)
>      build-depends: unix >= 1.0 && < 2.4
> -    cpp-options:   -DHAVE_SIGNALS
>  
>    if flag(base3)
>      build-depends: base >= 3,
> 

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090326/19998ce1/attachment.pgp>


More information about the darcs-users mailing list