Commit 6236b660 authored by Tamar Christina's avatar Tamar Christina Committed by Ryan Scott

Fix order of inclusions (#28)

* hsc2hs: fic order of inclusion

* hsc2hs: update changelog formatting
parent dfde1db5
......@@ -28,14 +28,17 @@ withUtilsObject config outDir outBase f = do
possiblyRemove cUtilsName $ do
writeBinaryFile cUtilsName $ unlines $
["#include <stddef.h>",
-- These header will cause a mismatch with any mingw-w64 header by
-- including system headers before user headers in the hsc file.
-- We *MUST* include user headers *BEFORE* automatic ones. */
[outTemplateHeaderCProg (cTemplate config),
"",
"#include <stddef.h>",
"#include <string.h>",
"#include <stdio.h>",
"#include <stdarg.h>",
"#include <ctype.h>",
"",
outTemplateHeaderCProg (cTemplate config),
"",
"int hsc_printf(const char *format, ...) {",
" int r;",
" va_list argp;",
......
## 0.68.6
- Supports generation of response files to avoid system filepath limits (#22, #23).
- Temporary file removals on Windows are not a bit more reliable and should
throw less access denied errors. See #25 and
([#9775](https://gitlab.haskell.org/ghc/ghc/issues/9775))
......@@ -10,6 +10,13 @@
- Support `MonadFail` / base-4.13
- Support GHC 8.10.1
- Include template file as first header in hsc2hs generated C file.
- On Windows define `__USE_MINGW_ANSI_STDIO` to 1 instead of 0 when not already
defined in standard template header. This is a more modern default.
## 0.68.5
- Support response files regardless of which GHC `hsc2hs` was compiled
......
/* This header will cause a mismatch with any mingw-w64 header by including a
system header and then getting included before user headers in the hsc file.
So let's define the default to be mingw-w64 C99 so we have any hope of
getting GHC to compile with GCC 9+. */
#if defined(_WIN32) && !defined(__USE_MINGW_ANSI_STDIO)
# define __USE_MINGW_ANSI_STDIO 1
#endif
/* We need stddef to be able to use size_t. Hopefully this won't cause
any problems along the lines of ghc trac #2897. */
......
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