diff options
Diffstat (limited to 'ghc/lib/std/cbits/writeError.c')
| -rw-r--r-- | ghc/lib/std/cbits/writeError.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/ghc/lib/std/cbits/writeError.c b/ghc/lib/std/cbits/writeError.c deleted file mode 100644 index e5d2d0e673..0000000000 --- a/ghc/lib/std/cbits/writeError.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * (c) The GRASP/AQUA Project, Glasgow University, 1998 - * - * $Id: writeError.c,v 1.9 2001/11/07 18:26:27 sof Exp $ - * - * hPutStr Runtime Support - */ - -/* -Writing out error messages. This is done outside Haskell -(i.e., no use of the IO implementation is made), since it -might be in an unstable state (e.g., hClose stderr >> error "foo") - -(A secondary reason is that ``error'' is used by the IO -implementation in one or two places.) - -*/ - -#include "Rts.h" -#include "RtsUtils.h" -#include "HsStd.h" - -#include "PrelIOUtils.h" - -void -writeErrString__(HsAddr msg_hdr, HsAddr msg, HsInt len) -{ - int count = 0; - char* p = (char*)msg; - char nl = '\n'; - -#ifndef DLLized - resetNonBlockingFd(2); -#endif - - /* Print error msg header */ - if (msg_hdr) { - ((void (*)(int))msg_hdr)(2/*stderr*/); - } - - while ( (count = write(2,p,len)) < len) { - if (errno != EINTR ) { - return; - } - len -= count; - p += count; - } - write(2, &nl, 1); -} |
