/*
* (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
*
- * $Id: setBuffering.c,v 1.3 1998/12/02 13:27:54 simonm Exp $
+ * $Id: setBuffering.c,v 1.4 1999/03/01 09:26:45 sof Exp $
*
* hSetBuffering Runtime Support
*/
fo->buf = NULL;
}
+#ifndef mingw32_TARGET_OS
while ((flags = fcntl(fo->fd, F_GETFL)) < 0) {
if (errno != EINTR) {
cvtErrno();
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) {
return -1;
}
}
+#endif
return 0;
case SB_LB:
fo->flags &= ~FILEOBJ_BB;
}
fo->bufSize = size;
}
+#ifndef mingw32_TARGET_OS
if (isaterm) {
/*
return -1;
}
}
+#endif
return 0;
}