Commit 8b1fd260 authored by Ian Lynagh's avatar Ian Lynagh

A couple of build fixes for Win64

parent 3020e6dc
......@@ -168,7 +168,7 @@ void _assertFail(const char *filename, unsigned int linenum)
#define FMT_Word64 "lu"
#define FMT_Int64 "ld"
#if defined(mingw32_HOST_OS)
#if defined(mingw32_HOST_OS) && defined(i386_HOST_ARCH)
/* mingw doesn't understand %llu/%lld - it treats them as 32-bit
rather than 64-bit */
#define FMT_Word64 "I64u"
......@@ -237,7 +237,10 @@ initEventLogging(void)
// Forked process, eventlog already started by the parent
// before fork
event_log_pid = getpid();
sprintf(event_log_filename, "%s.%d.eventlog", prog, event_log_pid);
// We don't have a FMT* symbol for pid_t, so we go via Word64
// to be sure of not losing range. It would be nicer to have a
// FMT* symbol or similar, though.
sprintf(event_log_filename, "%s.%" FMT_Word64 ".eventlog", prog, (StgWord64)event_log_pid);
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