Ticket #5167: 0001-Make-ProcessGroupID-a-newtype-of-CPid.patch

File 0001-Make-ProcessGroupID-a-newtype-of-CPid.patch, 1.6 KB (added by Favonia, 2 years ago)

patch to the package base

  • NHC/PosixTypes.hsc

    From 8fac3cbbe2bc6b4aca23e8044e3f1fe68a641368 Mon Sep 17 00:00:00 2001
    From: Favonia <favonia@gmail.com>
    Date: Wed, 4 May 2011 07:03:42 -0400
    Subject: [PATCH] Make ProcessGroupID a newtype of CPid.
    
    ---
     NHC/PosixTypes.hsc    |    2 ++
     System/Posix/Types.hs |    3 ++-
     2 files changed, 4 insertions(+), 1 deletions(-)
    
    diff --git a/NHC/PosixTypes.hsc b/NHC/PosixTypes.hsc
    index efae04e..5313099 100644
    a b  
    8383 
    8484-- Make an Fd type rather than using CInt everywhere 
    8585INTEGRAL_TYPE(Fd,tyConFd,"Fd",CInt) 
     86-- Make a ProcessGroupID new type to avoid misuse of setProcessGroupIDOf 
     87INTEGRAL_TYPE(ProcessGroupID,tyConProccessGroupID,"ProcessGroupID",CPid) 
    8688 
    8789-- nicer names, and backwards compatibility with POSIX library: 
    8890type LinkCount      = CNlink 
  • System/Posix/Types.hs

    diff --git a/System/Posix/Types.hs b/System/Posix/Types.hs
    index 9bb85e2..2f0878b 100644
    a b  
    182182 
    183183-- Make an Fd type rather than using CInt everywhere 
    184184INTEGRAL_TYPE(Fd,tyConFd,"Fd",CInt) 
     185-- Make a ProcessGroupID new type to avoid misuse of setProcessGroupIDOf 
     186INTEGRAL_TYPE(ProcessGroupID,tyConProccessGroupID,"ProcessGroupID",CPid) 
    185187 
    186188-- nicer names, and backwards compatibility with POSIX library: 
    187189#if defined(HTYPE_NLINK_T) 
     
    204206type FileMode       = CMode 
    205207type ProcessID      = CPid 
    206208type FileOffset     = COff 
    207 type ProcessGroupID = CPid 
    208209type Limit          = CLong 
    209210