Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!vsi1!daver!tscs!tct!chip From: chip@tct.uucp (Chip Salzenberg) Newsgroups: comp.unix.programmer Subject: Re: winsize struct Message-ID: <27B95130.5BE4@tct.uucp> Date: 13 Feb 91 14:46:08 GMT References: <1991Feb11.192013.6587@mccc.edu> <1991Feb12.211450.28938@athena.mit.edu> <1991Feb13.032238.11640@athena.mit.edu> Organization: Teltronics/TCT, Sarasota, FL Lines: 34 According to scs@adam.mit.edu: > #ifdef SIGWINCH > #ifdef TIOCSWINSZ Yup. Just what the doctor ordered. >(Of course, figuring out what to #include may be tricky, but here >it really ought to be and , respectively.) Signal, sure. But you can't include on SCO UNIX, even though it has TIOCSWINSZ. Try: #if defined(POSIX) #include #else #if defined(USG) #include #else #include #endif #endif (Macro POSIX and/or USG set from the command line.) >With a bit of creativity, you can use tricks like these for a >number of other OS-dependent features. For future tty mode hacking, I'd like to suggest that all OS-dependent code be implemented, as much as possible, in terms of POSIX functions like tcgetattr(), tcsetattr(), tcflush(), etc. -- Chip Salzenberg at Teltronics/TCT , "I want to mention that my opinions whether real or not are MY opinions." -- the inevitable William "Billy" Steinmetz