kazu-yamamoto/logger

Build fails on Windows using GHC 7.8

Closed this issue · 2 comments

The fix for #119 fails on older versions of GHC (7.8.* and I assume lower, though I haven't checked) with the following errors:

Duplicate type signatures for `fILE_APPEND_DATA'
        at System\Log\FastLogger\FileIO.hs:17:1-16
           System\Log\FastLogger\FileIO.hs:22:1-16

Multiple declarations of `fILE_APPEND_DATA'
        Declared at: System\Log\FastLogger\FileIO.hs:18:1
                     System\Log\FastLogger\FileIO.hs:23:1

Issue's probably here

Here's my understanding: Please let me know if I've made a mistake.

It looks like fILE_APPEND_DATA was being defined twice, but wasn't a problem on newer versions of GHC using Win32 > 2.4. The fILE_APPEND_DATA AccessMode was added to Win32 between 2.3.1.1 and 2.4.0.0, so when we removed the 2nd, extra local definition on anything using version 2.3.1.1, the earlier CPP pragma wasn't kicking in either, and there was no definition in Win32.

I'll be sending a PR I tested on GHC 7.8.4 and 8.0.2. Let me know if there's anything else you want tested.

Let's close.