on master help sign in
Use _fdopen on Windows #96
56cc7ceMichael Snoyman
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+
1## 0.8.18.5
5## 0.8.18.5
2
6
3* Properly fix previous bug (fixes #94)
7* Properly fix previous bug (fixes #94)
Text/Libyaml.hs+4
@@ -149,7 +149,11 @@ foreign import ccall unsafe "yaml_parser_set_input_file"
149data FileStruct
149data FileStruct
150type File = Ptr FileStruct
150type File = Ptr FileStruct
151
151
152+#ifdef WINDOWS
153+foreign import ccall unsafe "_fdopen"
154+#else
152foreign import ccall unsafe "fdopen"
155foreign import ccall unsafe "fdopen"
156+#endif
153 c_fdopen :: CInt
157 c_fdopen :: CInt
154 -> Ptr CChar
158 -> Ptr CChar
155 -> IO File
159 -> IO File
yaml.cabal+3−1
@@ -1,5 +1,5 @@
1name: yaml
1name: yaml
2−version: 0.8.18.5
2+version: 0.8.18.6
3license: BSD3
3license: BSD3
4license-file: LICENSE
4license-file: LICENSE
5author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov
5author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov
@@ -86,6 +86,8 @@ library
86 libyaml/scanner.c,
86 libyaml/scanner.c,
87 libyaml/writer.c
87 libyaml/writer.c
88 include-dirs: libyaml
88 include-dirs: libyaml
89+ if os(windows)
90+ cpp-options: -DWINDOWS
89
91
90executable yaml2json
92executable yaml2json
91 if flag(no-exe)
93 if flag(no-exe)