This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 04/12] termios: Consolidate Input Modes definitions.



On 09/11/2018 13:07, Gabriel F. T. Gomes wrote:
> On Mon, 15 Oct 2018, Adhemerval Zanella wrote:
> 
>> This patch consolidates the termios symbolic constants used for input
>> modes with c_iflag member on its own header.  The Linux generic implementation
>> values match the kernel UAPI and each architecture with deviate values
>> have their own implementation (in this case alpha and powerpc).
> 
> Doesn't sparc need special treatment, too?
> 
>> --- /dev/null
>> +++ b/sysdeps/unix/sysv/linux/bits/termios-c_iflag.h
>> @@ -0,0 +1,40 @@
>> [...]
>> +/* c_iflag bits */
>> +#define IGNBRK	0000001  /* Ignore break condition.  */
>> +#define BRKINT	0000002  /* Signal interrupt on break.  */
>> +#define IGNPAR	0000004  /* Ignore characters with parity errors.  */
>> +#define PARMRK	0000010  /* Mark parity and framing errors.  */
>> +#define INPCK	0000020  /* Enable input parity check.  */
>> +#define ISTRIP	0000040  /* Strip 8th bit off characters.  */
>> +#define INLCR	0000100  /* Map NL to CR on input.  */
>> +#define IGNCR	0000200  /* Ignore CR.  */
>> +#define ICRNL	0000400  /* Map CR to NL on input.  */
>> +#define IUCLC	0001000  /* Map uppercase characters to lowercase on input
>> +			    (not in POSIX).  */
>> +#define IXON	0002000  /* Enable start/stop output control.  */
>> +#define IXANY	0004000  /* Enable any character to restart output.  */
>> +#define IXOFF	0010000  /* Enable start/stop input control.  */
>> +#define IMAXBEL	0020000  /* Ring bell when input queue is full
>> +			    (not in POSIX).  */
>> +#define IUTF8	0040000  /* Input is UTF8 (not in POSIX).  */
> 
> The generic defines...
> 
>> --- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h
>> +++ b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
>> @@ -26,23 +26,7 @@ typedef unsigned int tcflag_t;
>> [...]
>> -/* c_iflag bits */
>> -#define IGNBRK	0x00000001
>> -#define BRKINT	0x00000002
>> -#define IGNPAR	0x00000004
>> -#define PARMRK	0x00000008
>> -#define INPCK	0x00000010
>> -#define ISTRIP	0x00000020
>> -#define INLCR	0x00000040
>> -#define IGNCR	0x00000080
>> -#define ICRNL	0x00000100
>> -#define IUCLC	0x00000200
>> -#define IXON	0x00000400
>> -#define IXANY	0x00000800
>> -#define IXOFF	0x00001000
>> -#define IMAXBEL	0x00002000
>> -#define IUTF8	0x00004000
>> +#include <bits/termios-c_iflag.h>
> 
> Look different than what sparc used to have.
> 

They are essentially the same values for all constants, sparc just define them
in hexa instead of octal.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]