summaryrefslogtreecommitdiff
path: root/rts/hooks
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-04-26 16:52:44 +0100
committerIan Lynagh <igloo@earth.li>2012-04-26 16:52:44 +0100
commit1dbe6d59b621ab9bd836241d633b3a8d99812cb3 (patch)
tree6482c2019a3a85f93c9b38c0e985d77f24388692 /rts/hooks
parent3e314cc2060734ade9b82d4da418c119b3a05b4c (diff)
downloadhaskell-1dbe6d59b621ab9bd836241d633b3a8d99812cb3.tar.gz
Fix warnings on Win64
Mostly this meant getting pointer<->int conversions to use the right sizes. lnat is now size_t, rather than unsigned long, as that seems a better match for how it's used.
Diffstat (limited to 'rts/hooks')
-rw-r--r--rts/hooks/MallocFail.c2
-rw-r--r--rts/hooks/OutOfHeap.c2
-rw-r--r--rts/hooks/StackOverflow.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/rts/hooks/MallocFail.c b/rts/hooks/MallocFail.c
index 41c0d2a855..e298c2ee77 100644
--- a/rts/hooks/MallocFail.c
+++ b/rts/hooks/MallocFail.c
@@ -12,6 +12,6 @@
void
MallocFailHook (lnat request_size /* in bytes */, char *msg)
{
- fprintf(stderr, "malloc: failed on request for %lu bytes; message: %s\n", request_size, msg);
+ fprintf(stderr, "malloc: failed on request for %" FMT_SizeT " bytes; message: %s\n", request_size, msg);
}
diff --git a/rts/hooks/OutOfHeap.c b/rts/hooks/OutOfHeap.c
index 30c492dd16..5ed5ed9b96 100644
--- a/rts/hooks/OutOfHeap.c
+++ b/rts/hooks/OutOfHeap.c
@@ -15,7 +15,7 @@ OutOfHeapHook (lnat request_size, lnat heap_size) /* both sizes in bytes */
(void)request_size; /* keep gcc -Wall happy */
if (heap_size > 0) {
- errorBelch("Heap exhausted;\nCurrent maximum heap size is %lu bytes (%lu MB);\nuse `+RTS -M<size>' to increase it.",
+ errorBelch("Heap exhausted;\nCurrent maximum heap size is %" FMT_SizeT " bytes (%" FMT_SizeT " MB);\nuse `+RTS -M<size>' to increase it.",
heap_size, heap_size / (1024*1024));
} else {
errorBelch("out of memory");
diff --git a/rts/hooks/StackOverflow.c b/rts/hooks/StackOverflow.c
index 4313702a84..fe8a059b7f 100644
--- a/rts/hooks/StackOverflow.c
+++ b/rts/hooks/StackOverflow.c
@@ -12,6 +12,6 @@
void
StackOverflowHook (lnat stack_size) /* in bytes */
{
- fprintf(stderr, "Stack space overflow: current size %ld bytes.\nUse `+RTS -Ksize -RTS' to increase it.\n", stack_size);
+ fprintf(stderr, "Stack space overflow: current size %" FMT_SizeT " bytes.\nUse `+RTS -Ksize -RTS' to increase it.\n", stack_size);
}