summaryrefslogtreecommitdiff
path: root/ghc/lib/std/cbits/flushFile.lc
diff options
context:
space:
mode:
authorsimonm <unknown>1998-04-10 11:35:02 +0000
committersimonm <unknown>1998-04-10 11:35:02 +0000
commita586fca9b8d54f935babca01e1308ac51840f8ae (patch)
tree8ee77a3c66962628c3993e74c375440705542f89 /ghc/lib/std/cbits/flushFile.lc
parent70563d29fba4a76a788d3fdeb09899c5931a52ee (diff)
downloadhaskell-a586fca9b8d54f935babca01e1308ac51840f8ae.tar.gz
[project @ 1998-04-10 11:33:12 by simonm]
clean up the mess.
Diffstat (limited to 'ghc/lib/std/cbits/flushFile.lc')
-rw-r--r--ghc/lib/std/cbits/flushFile.lc30
1 files changed, 30 insertions, 0 deletions
diff --git a/ghc/lib/std/cbits/flushFile.lc b/ghc/lib/std/cbits/flushFile.lc
new file mode 100644
index 0000000000..6cfd484e74
--- /dev/null
+++ b/ghc/lib/std/cbits/flushFile.lc
@@ -0,0 +1,30 @@
+%
+% (c) The GRASP/AQUA Project, Glasgow University, 1994
+%
+\subsection[flushFile.lc]{hFlush Runtime Support}
+
+\begin{code}
+
+#include "rtsdefs.h"
+#include "stgio.h"
+
+StgInt
+flushFile(fp)
+StgForeignObj fp;
+{
+ int rc;
+
+ while ((rc = fflush((FILE *) fp)) != 0) {
+ if (errno != EINTR) {
+ cvtErrno();
+ stdErrno();
+ return rc;
+ }
+ }
+ return 0;
+}
+
+\end{code}
+
+
+