[PATCH] PPC termios.h redefined XTABS to match POSIX
Steve Munroe
sjmunroe@us.ibm.com
Wed May 12 19:39:00 GMT 2004
Paul MacKerras wrote:
> It turns out that we are not handling the TABDLY bits of the termios
> c_oflag field correctly on PPC, PPC64 and Alpha. These three
> architectures have a value for XTABS that is different from the TAB3
> value. POSIX specifies that setting the TABDLY field to TAB3 should
> result in tabs being expanded to spaces. In n_tty.c:opost() we check
> for O_TABDLY(tty) == XTABS, which is fine on most architectures
> because they have XTABS == TAB3.
>
> I think the right thing to do is just to change the definition of
> XTABS to be the same as TAB3 on these architectures. The patch below
> does this for PPC and PPC64 (and I suggest the Alpha maintainer should
> do the same). At the moment, applications using either the XTABS or
> TAB3 values won't get the expected behaviour. With this patch, apps
> that use TAB3 will get the expected behaviour. Apps that use XTABS
> will need to be recompiled (but note that the POSIX-specified name to
> use is TAB3 not XTABS).
The concensus is that the PPC kernel never expanded tabs correctly
(until now) so we are not breaking existing applications by changing
this. No need for kernel_features or versioning.
This patch matches glibc termios.h definitions with the lastest kernel.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ppc-termios-20040512.txt
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20040512/f90de48f/attachment.txt>
More information about the Libc-alpha
mailing list