Commit 4a0d0d80 authored by Moritz Angermann's avatar Moritz Angermann Committed by Ben Gamari

Various Windows / Cross Compile to Windows fixes

- Adds quick-cross-ncg flavour.
- Fix windows wchar with `_s` for mingw
- Lookup windres, dllwrap and objdump
- Fix type.

Reviewers: bgamari, hvr, Phyx, erikd, simonmar

Reviewed By: bgamari

Subscribers: rwbarton, thomie, erikd, carter

Differential Revision: https://phabricator.haskell.org/D4430
parent aef2b429
......@@ -418,6 +418,10 @@ then
AC_PATH_PROG([DllWrap],[dllwrap])
AC_PATH_PROG([Windres],[windres])
AC_PATH_PROG([Genlib],[genlib])
else
AC_CHECK_TARGET_TOOL([Windres],[windres])
AC_CHECK_TARGET_TOOL([DllWrap],[dllwrap])
AC_CHECK_TARGET_TOOL([OBJDUMP],[objdump])
fi
DllWrapCmd="$DllWrap"
......
......@@ -9,6 +9,8 @@
#include "HsBase.h"
#include <stdbool.h>
#include <stdint.h>
/* Using Secure APIs */
#define MINGW_HAS_SECURE_API 1
#include <wchar.h>
#include <windows.h>
......
......@@ -7,6 +7,11 @@
#include <libgen.h>
#include <ctype.h>
#if defined(mingw32_HOST_OS)
/* Using Secure APIs */
#define MINGW_HAS_SECURE_API 1
#include <wchar.h>
#endif
pathchar* pathdup(pathchar *path)
{
......
......@@ -458,7 +458,7 @@ void *osReserveHeapMemory (void *startAddress, W_ *len)
sysErrorBelch(
"osReserveHeapMemory: VirtualAlloc MEM_RESERVE %llu bytes \
at address %p bytes failed",
len + MBLOCK_SIZE, startAddress);
*len + MBLOCK_SIZE, startAddress);
}
stg_exit(EXIT_FAILURE);
}
......
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