Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
cb9eb074
Commit
cb9eb074
authored
Mar 01, 1999
by
sof
Browse files
[project @ 1999-03-01 09:26:45 by sof]
mingw32: stay well clear of any tty stuff - just don't have support for it.
parent
fcc081fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/lib/std/cbits/setBuffering.c
View file @
cb9eb074
/*
* (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
*
* $Id: setBuffering.c,v 1.
3
199
8/12/02 13:27:54 simonm
Exp $
* $Id: setBuffering.c,v 1.
4
199
9/03/01 09:26:45 sof
Exp $
*
* hSetBuffering Runtime Support
*/
...
...
@@ -56,6 +56,7 @@ StgInt size;
fo
->
buf
=
NULL
;
}
#ifndef mingw32_TARGET_OS
while
((
flags
=
fcntl
(
fo
->
fd
,
F_GETFL
))
<
0
)
{
if
(
errno
!=
EINTR
)
{
cvtErrno
();
...
...
@@ -67,11 +68,13 @@ StgInt size;
input
=
flags
==
O_RDONLY
||
flags
==
O_RDWR
;
isaterm
=
input
&&
isatty
(
fo
->
fd
);
#endif
switch
(
size
)
{
case
SB_NB
:
fo
->
flags
&=
~
FILEOBJ_LB
&
~
FILEOBJ_BB
;
#ifndef mingw32_TARGET_OS
if
(
isaterm
)
{
/* Switch over to canonical mode. */
if
(
tcgetattr
(
fo
->
fd
,
&
tio
)
<
0
)
{
...
...
@@ -88,6 +91,7 @@ StgInt size;
return
-
1
;
}
}
#endif
return
0
;
case
SB_LB
:
fo
->
flags
&=
~
FILEOBJ_BB
;
...
...
@@ -123,6 +127,7 @@ StgInt size;
}
fo
->
bufSize
=
size
;
}
#ifndef mingw32_TARGET_OS
if
(
isaterm
)
{
/*
...
...
@@ -141,6 +146,7 @@ StgInt size;
return
-
1
;
}
}
#endif
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment