diff --git a/ghc/hschooks.c b/ghc/hschooks.c
index fbcfda7c355df6a5aa3a87fb023dd1cb26853801..232ac08045cb644d35cdc466f0c77e0558952be1 100644
--- a/ghc/hschooks.c
+++ b/ghc/hschooks.c
@@ -32,7 +32,7 @@ defaultsHook (void)
 }
 
 void
-StackOverflowHook (StgWord stack_size)    /* in bytes */
+StackOverflowHook (lnat stack_size)    /* in bytes */
 {
     fprintf(stderr, "GHC stack-space overflow: current limit is %zu bytes.\nUse the `-K<size>' option to increase it.\n", (size_t)stack_size);
 }
diff --git a/includes/rts/Hooks.h b/includes/rts/Hooks.h
index f536afaa099b7b9c097e73813e1bd3d733fc870e..f409205b8787428f118e3fecfd780fb2cf2df994 100644
--- a/includes/rts/Hooks.h
+++ b/includes/rts/Hooks.h
@@ -18,9 +18,9 @@ extern char *ghc_rts_opts;
 
 extern void OnExitHook (void);
 extern int  NoRunnableThreadsHook (void);
-extern void StackOverflowHook (W_ stack_size);
-extern void OutOfHeapHook (W_ request_size, W_ heap_size);
-extern void MallocFailHook (W_ request_size /* in bytes */, char *msg);
+extern void StackOverflowHook (lnat stack_size);
+extern void OutOfHeapHook (lnat request_size, lnat heap_size);
+extern void MallocFailHook (lnat request_size /* in bytes */, char *msg);
 extern void defaultsHook (void);
 
 #endif /* RTS_HOOKS_H */
diff --git a/rts/hooks/MallocFail.c b/rts/hooks/MallocFail.c
index 6c3a1a0faf9c08911c0dc93c8df7488ae413e308..19874234d0a812f0b4a3c46d3f02ba652759a553 100644
--- a/rts/hooks/MallocFail.c
+++ b/rts/hooks/MallocFail.c
@@ -10,7 +10,7 @@
 #include <stdio.h>
 
 void
-MallocFailHook (W_ request_size /* in bytes */, char *msg)
+MallocFailHook (lnat request_size /* in bytes */, char *msg)
 {
     fprintf(stderr, "malloc: failed on request for %" FMT_Word " bytes; message: %s\n", request_size, msg);
 }
diff --git a/rts/hooks/OutOfHeap.c b/rts/hooks/OutOfHeap.c
index ec4697b54711dd870e1650f042daa91cc5e2fdbf..271c6a1ecde18906c358e703305dda637369a4bf 100644
--- a/rts/hooks/OutOfHeap.c
+++ b/rts/hooks/OutOfHeap.c
@@ -9,7 +9,7 @@
 #include <stdio.h>
 
 void
-OutOfHeapHook (W_ request_size, W_ heap_size) /* both sizes in bytes */
+OutOfHeapHook (lnat request_size, lnat heap_size) /* both sizes in bytes */
 {
   /*    fprintf(stderr, "Heap exhausted;\nwhile trying to allocate %lu bytes in a %lu-byte heap;\nuse `+RTS -H<size>' to increase the total heap size.\n", */
 
diff --git a/rts/hooks/StackOverflow.c b/rts/hooks/StackOverflow.c
index 407293902d87f9fa9a5ec7ae19b3007f89cc27af..135e40857dd2992831bb59c9933d235c174c3cbf 100644
--- a/rts/hooks/StackOverflow.c
+++ b/rts/hooks/StackOverflow.c
@@ -10,7 +10,7 @@
 #include <stdio.h>
 
 void
-StackOverflowHook (W_ stack_size)    /* in bytes */
+StackOverflowHook (lnat stack_size)    /* in bytes */
 {
     fprintf(stderr, "Stack space overflow: current size %" FMT_Word " bytes.\nUse `+RTS -Ksize -RTS' to increase it.\n", stack_size);
 }