Use _fdopen on Windows #96
commit56cc7ce8bceb53ce5bf6d7e6950f7df8cbd2776a
authorMichael Snoyman <michael@snoyman.com>
dateFri 9 Sep 2016, 07:06 (10 years ago)
parente6ffcee
ChangeLog.md+4
@@ -1,3 +1,7 @@
1+## 0.8.18.6
2+
3+* s/fdopen/_fdopen on Windows [#96](https://github.com/snoyberg/yaml/issues/96)
4+
15## 0.8.18.5
26
37* Properly fix previous bug (fixes #94)
Text/Libyaml.hs+4
@@ -149,7 +149,11 @@ foreign import ccall unsafe "yaml_parser_set_input_file"
149149data FileStruct
150150type File = Ptr FileStruct
151151
152+#ifdef WINDOWS
153+foreign import ccall unsafe "_fdopen"
154+#else
152155foreign import ccall unsafe "fdopen"
156+#endif
153157 c_fdopen :: CInt
154158 -> Ptr CChar
155159 -> IO File
yaml.cabal+3−1
@@ -1,5 +1,5 @@
11name: yaml
2−version: 0.8.18.5
2+version: 0.8.18.6
33license: BSD3
44license-file: LICENSE
55author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov
@@ -86,6 +86,8 @@ library
8686 libyaml/scanner.c,
8787 libyaml/writer.c
8888 include-dirs: libyaml
89+ if os(windows)
90+ cpp-options: -DWINDOWS
8991
9092executable yaml2json
9193 if flag(no-exe)