Date: Mon, 6 Mar 1995 11:13:22 +1000 From: Bruce Evans <bde@zeta.org.au> To: current@FreeBSD.org, gibbs@estienne.CS.Berkeley.EDU Subject: Re: Unprotected area of termios.h? Message-ID: <199503060113.LAA08845@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>Why was this done? >/* > * END OF PROTECTED INCLUDE. > */ >#endif /* !_SYS_TERMIOS_H_ */ >#ifndef _POSIX_SOURCE >#include <sys/ttydefaults.h> >#endif It's a hack for some programs wanting to get the definition of ttydefchars[] by including a header twice with TTYDEFCHARS defined the second time, and expecting to get this definition as namespace pollution in <[sys/]termios.h> instead of from <sys/ttydefaults.h>. The new ld has apparently uncovered the bug that sio.c and tty.c both define ttydefchars[] as globals. This was fixed in 1.1.5 by making ttydefchars[] static like it should always have been. See the revision log for the 2.0 <sys/ttydefaults.h> for how the non-idempotency hack was broken and the revision log for the 1.1.5 <sys/ttydefaults.h> for ancient history. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503060113.LAA08845>