Ticket #6109: 0001-Fix-6109-error-Unknown-mingw32-arch.patch

File 0001-Fix-6109-error-Unknown-mingw32-arch.patch, 962 bytes (added by erikd, 2 years ago)

Tested on x86_64 linux and powerpc linux.

  • utils/runghc/runghc.hs

    From a2f57e8cc01e96d36356dca8bc9fdbfe7ff90dfe Mon Sep 17 00:00:00 2001
    From: Erik de Castro Lopo <erikd@mega-nerd.com>
    Date: Fri, 18 May 2012 21:59:17 +1000
    Subject: [PATCH] Fix #6109 : error Unknown mingw32 arch.
    
    ---
     utils/runghc/runghc.hs |   14 +++++++++-----
     1 file changed, 9 insertions(+), 5 deletions(-)
    
    diff --git a/utils/runghc/runghc.hs b/utils/runghc/runghc.hs
    index 6dae543..d5dec28 100644
    a b import Foreign 
    3232import Foreign.C.String 
    3333#endif 
    3434 
    35 #if defined(i386_HOST_ARCH) 
    36 # define WINDOWS_CCONV stdcall 
    37 #elif defined(x86_64_HOST_ARCH) 
    38 # define WINDOWS_CCONV ccall 
     35#if defined(mingw32_HOST_OS) 
     36# if defined(i386_HOST_ARCH) 
     37#  define WINDOWS_CCONV stdcall 
     38# elif defined(x86_64_HOST_ARCH) 
     39#  define WINDOWS_CCONV ccall 
     40# else 
     41#  error Unknown mingw32 arch 
     42# endif 
    3943#else 
    40 # error Unknown mingw32 arch 
     44# define WINDOWS_CCONV 
    4145#endif 
    4246 
    4347main :: IO ()