From owner-freebsd-current@FreeBSD.ORG Tue Aug 12 14:47:09 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E32B106566B for ; Tue, 12 Aug 2008 14:47:09 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 3BFFC8FC15 for ; Tue, 12 Aug 2008 14:47:09 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 8ED331CC63; Tue, 12 Aug 2008 16:47:08 +0200 (CEST) Date: Tue, 12 Aug 2008 16:47:08 +0200 From: Ed Schouten To: Alexey Shuvaev Message-ID: <20080812144708.GY99951@hoeg.nl> References: <20080812135142.GA1033@wep4017.physik.uni-wuerzburg.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8fFQOkr0mRRE6sJ/" Content-Disposition: inline In-Reply-To: <20080812135142.GA1033@wep4017.physik.uni-wuerzburg.de> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: FreeBSD Current Subject: Re: POSIX compliant termios.h? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2008 14:47:09 -0000 --8fFQOkr0mRRE6sJ/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Alexey, * Alexey Shuvaev wrote: > I have just tried to unBROKEN cad/brlcad and noticed that FreeBSD > termios.h is missing some POSIX mandatory flags. In this case, > TAB3 output processing flag (expand TABs on output =3D=3D OXTABS). > Are there any plans to fix it in the base? >=20 > Attached is the workaround patch for cad/brlcad. Should I push it > into the ports (via PR, etc...) or it is better to wait a little > for a fix in the base? Until very recently, it wasn't really possible to properly add TAB3 to , because TAB3 was also used inside the interface. Now that is no longer accessible by userspace applications, we could commit the following patch to -CURRENT, but we cannot safely backport it to RELENG_*: | --- sys/sys/termios.h | +++ sys/sys/termios.h | @@ -109,6 +109,9 @@ | #ifndef _POSIX_SOURCE | #define ONLCR 0x00000002 /* map NL to CR-NL (ala CRMOD) */ | #define OXTABS 0x00000004 /* expand tabs to spaces */ | +#ifndef _KERNEL | +#define TAB3 OXTABS | +#endif /* !_KERNEL */ | #define ONOEOT 0x00000008 /* discard EOT's (^D) on output) */ | #define OCRNL 0x00000010 /* map CR to NL on output */ | #define ONOCR 0x00000020 /* no CR output at column 0 */ In the mean time, you'd better use the following cpp tricks: | #ifndef TAB3 | #ifdef OXTABS | #define TAB3 OXTABS | #else | #define TAB3 0 | #endif | #endif --=20 Ed Schouten WWW: http://80386.nl/ --8fFQOkr0mRRE6sJ/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkihomwACgkQ52SDGA2eCwXUdgCfUeyXgfxTT6mODdsdvhN2qk5X 0TAAn0wqz2sKvlhFRHtQX9CD8RFzRfen =QST8 -----END PGP SIGNATURE----- --8fFQOkr0mRRE6sJ/--