summaryrefslogtreecommitdiff
path: root/rts/RtsMessages.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-09-03 10:50:18 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-09-03 10:50:18 +0000
commit63d753d105f0e0c4849631d0494fea69f82c8a41 (patch)
tree606add22d2f89317eb8ab6319ccc52432a8d8aaa /rts/RtsMessages.c
parentb9110541efb85f9489b1f9a0c95445419e61d86d (diff)
downloadhaskell-63d753d105f0e0c4849631d0494fea69f82c8a41.tar.gz
sysErrorBelch: don't put an extra \n on Windows
Diffstat (limited to 'rts/RtsMessages.c')
-rw-r--r--rts/RtsMessages.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/RtsMessages.c b/rts/RtsMessages.c
index 362b369f4f..c263a2cf57 100644
--- a/rts/RtsMessages.c
+++ b/rts/RtsMessages.c
@@ -239,7 +239,12 @@ rtsSysErrorMsgFn(const char *s, va_list ap)
}
vfprintf(stderr, s, ap);
if (syserr) {
+#if defined(cygwin32_HOST_OS) || defined (mingw32_HOST_OS)
+ // Win32 error messages have a terminating \n
+ fprintf(stderr, ": %s", syserr);
+#else
fprintf(stderr, ": %s\n", syserr);
+#endif
} else {
fprintf(stderr, "\n");
}