summaryrefslogtreecommitdiff
path: root/ghc/lib/std/cbits/setBinaryMode.c
diff options
context:
space:
mode:
Diffstat (limited to 'ghc/lib/std/cbits/setBinaryMode.c')
-rw-r--r--ghc/lib/std/cbits/setBinaryMode.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/ghc/lib/std/cbits/setBinaryMode.c b/ghc/lib/std/cbits/setBinaryMode.c
deleted file mode 100644
index 641e999a55..0000000000
--- a/ghc/lib/std/cbits/setBinaryMode.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * (c) The GRASP/AQUA Project, Glasgow University, 1999
- *
- * $Id: setBinaryMode.c,v 1.1 1999/09/19 19:27:10 sof Exp $
- *
- * hSetBinaryMode runtime support
- */
-
-#include "Rts.h"
-#include "stgio.h"
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#ifdef _WIN32
-#include <io.h>
-#endif
-
-StgInt
-setBinaryMode__(ptr,flg)
-StgForeignPtr ptr;
-StgInt flg;
-{
- IOFileObject* fo = (IOFileObject*)ptr;
- int rc;
-
- rc = flushBuffer(ptr);
- if (rc < 0) return rc;
-
-#ifdef _WIN32
- setmode ( fo->fd, flg ? O_BINARY : O_TEXT );
-#endif
- rc = (fo->flags & FILEOBJ_BINARY ? 1 : 0);
- fo->flags = fo->flags & (flg ? FILEOBJ_BINARY : ~FILEOBJ_BINARY);
-
- return rc;
-}