From a336a1e790463b53a64b864426919f9982a4607a Mon Sep 17 00:00:00 2001 From: rrt Date: Mon, 19 Feb 2001 16:07:48 +0000 Subject: [PATCH] [project @ 2001-02-19 16:07:48 by rrt] Move if #ifndefs so that no code is compiled on win32; the code that was compiled was doing nothing useful, and probably shouldn't have been. --- ghc/lib/std/cbits/echoAux.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ghc/lib/std/cbits/echoAux.c b/ghc/lib/std/cbits/echoAux.c index 3cc6517..ab7035f 100644 --- a/ghc/lib/std/cbits/echoAux.c +++ b/ghc/lib/std/cbits/echoAux.c @@ -1,7 +1,7 @@ /* * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998 * - * $Id: echoAux.c,v 1.4 2001/01/16 14:06:14 simonmar Exp $ + * $Id: echoAux.c,v 1.5 2001/02/19 16:07:48 rrt Exp $ * * Support functions for changing echoing */ @@ -28,13 +28,13 @@ StgInt setTerminalEcho(StgForeignPtr ptr, StgInt on) { +#ifndef mingw32_TARGET_OS IOFileObject* fo = (IOFileObject*)ptr; struct termios tios; int fd, rc; fd = fo->fd; -#ifndef mingw32_TARGET_OS while ( (rc = tcgetattr(fd,&tios)) == -1) { if (errno != EINTR) { cvtErrno(); @@ -61,16 +61,15 @@ setTerminalEcho(StgForeignPtr ptr, StgInt on) } StgInt -getTerminalEcho(ptr) -StgForeignPtr ptr; +getTerminalEcho(StgForeignPtr ptr) { +#ifndef mingw32_TARGET_OS IOFileObject* fo = (IOFileObject*)ptr; struct termios tios; int fd, rc; fd = fo->fd; -#ifndef mingw32_TARGET_OS while ( (rc = tcgetattr(fd,&tios)) == -1) { if (errno != EINTR) { cvtErrno(); @@ -85,16 +84,15 @@ StgForeignPtr ptr; } StgInt -isTerminalDevice(ptr) -StgForeignPtr ptr; +isTerminalDevice(StgForeignPtr ptr) { +#ifndef mingw32_TARGET_OS IOFileObject* fo = (IOFileObject*)ptr; struct termios tios; int fd, rc; fd = fo -> fd; -#ifndef mingw32_TARGET_OS while ( (rc = tcgetattr(fd,&tios)) == -1) { if (errno == ENOTTY) return 0; if (errno != EINTR) { -- 1.7.10.4