diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-12-31 11:04:46 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-12-31 11:04:46 -0800 |
commit | 4cf38a5569d937142609441a27abf0edb9023da4 (patch) | |
tree | eb3e9f177bd4f9bbcc15deabc9c764e421c59972 /src/main.c | |
parent | 834266acfdb2aa63e07ae03b08ae11ca21e00dcf (diff) | |
parent | e8a994cddc17eabaa415c73d970205aa489a756c (diff) |
Merge pull request #256 from nwellnhof/windows_fixes
Windows fixes
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -7,6 +7,11 @@ #include "debug.h" #include "bench.h" +#if defined(_WIN32) && !defined(__CYGWIN__) + #include <io.h> + #include <fcntl.h> +#endif + typedef enum { FORMAT_NONE, FORMAT_HTML, @@ -58,6 +63,10 @@ int main(int argc, char *argv[]) writer_format writer = FORMAT_HTML; long options = CMARK_OPT_DEFAULT; +#if defined(_WIN32) && !defined(__CYGWIN__) + _setmode(_fileno(stdout), _O_BINARY); +#endif + parser = cmark_parser_new(); files = (int *)malloc(argc * sizeof(*files)); |