Commit fff335b6 authored by Tamar Christina's avatar Tamar Christina Committed by Ben Gamari

Fix CPP usage on Darwin

Clang complains about `#define X defined(Y)`
parent 0b44990f
......@@ -14,8 +14,12 @@ module Compat.TempFile (
openTempFile
) where
#define NEEDS_TEMP_WORKAROUND (!MIN_VERSION_base(4,14,0) \
&& defined(mingw32_HOST_OS))
#if (!MIN_VERSION_base(4,14,0) \
&& defined(mingw32_HOST_OS))
#define NEEDS_TEMP_WORKAROUND 1
#else
#define NEEDS_TEMP_WORKAROUND 0
#endif
#if NEEDS_TEMP_WORKAROUND
import Data.Bits
......@@ -148,4 +152,4 @@ output_flags = std_flags
std_flags, output_flags, rw_flags :: CInt
std_flags = o_NONBLOCK .|. o_NOCTTY
rw_flags = output_flags .|. o_RDWR
#endif /* NEEDS_TEMP_WORKAROUND */
\ No newline at end of file
#endif /* NEEDS_TEMP_WORKAROUND */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment