winsize struct

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Thu Feb 14 06:45:09 AEST 1991


In article <1991Feb13.032238.11640 at athena.mit.edu> scs at adam.mit.edu writes:
  [ use #ifdef SIGWINCH for winsize; use #ifdef S_IFLNK for symlinks ]
> Don't put the
> code for catching SIGTSTP inside #ifdef JOBCONTROL; put it inside
> #ifdef SIGTSTP.  Settable line disciplines?  TIOCSETD.
> Etc.

I have to disagree. There may be occasional cases where the macros
provided by the system exactly match the features you want to use, but
you'll never lose anything by sticking to #ifdef JOBCONTROL and putting

	#ifdef SIGTSTP
	#define JOBCONTROL
	#endif

inside a .h file. This way someone can (1) figure out what you really
meant while reading the code; (2) change the definitions with as little
work as possible in case you messed up.

---Dan



More information about the Comp.unix.programmer mailing list