pre#defines for system and machine (was: RMS comments to X3J11)
news at cit-vax.UUCP
news at cit-vax.UUCP
Tue Jan 27 18:04:29 AEST 1987
Organization : California Institute of Technology
Keywords:
From: jon at oddhack.Caltech.Edu (Jon Leech)
Path: oddhack!jon
In article <556 at omssw2.UUCP> vrs at omssw2.UUCP (Vincent R. Slyngstad) writes:
>I think there is entirely too much emphasis placed on high level symbols
>(like bsd) where low level symbols (like SIGTSTP) are needed. I often
>see code that reads
> #ifdef SYSV
> ioctl(fd, TCGETA, &term);
> #endif
>when it ought (in my opinion) to read
> #ifdef TCGETA
> ioctl(fd, TCGETA, &term);
> #endif
Nothing assures the uniqueness of such symbols across implementations.
TCGETA may exist and mean something entirely different on a non-SYSV machine.
This can lead to really obscure bugs.
-- Jon Leech (jon at csvax.caltech.edu || ...seismo!cit-vax!jon)
Caltech Computer Science Graphics Group
__@/
More information about the Comp.lang.c
mailing list