diff mbox series

[01/12] termios: Define TIOCSER_TEMT with __USE_MISC (BZ#17783)

Message ID 20181015204956.25558-1-adhemerval.zanella@linaro.org
State Superseded
Headers show
Series [01/12] termios: Define TIOCSER_TEMT with __USE_MISC (BZ#17783) | expand

Commit Message

Adhemerval Zanella Netto Oct. 15, 2018, 8:49 p.m. UTC
This patch defines TIOCSER_TEMT on all architectures using the __USE_MISC
guards similar to BZ#17782 fix.  Latest Linux UAPI defines TIOCSER_TEMT
with the same value for all architectures, so it is safe to use the value
as default for all ABIs.

Checked on x86_64linux-gnu and build against sparc64-linux-gnu and
powerpc64le-linux-gnu.

	* sysdeps/unix/sysv/linux/bits/termios.h [__USE_MISC] (TIOCSER_TEMT):
	Define.
	* sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_MISC]
	(TIOCSER_TEMT): Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_MISC]
	(TEOCSER_TEMT): Likewise.
---
 sysdeps/unix/sysv/linux/bits/termios.h         | 5 +++++
 sysdeps/unix/sysv/linux/powerpc/bits/termios.h | 4 +++-
 sysdeps/unix/sysv/linux/sparc/bits/termios.h   | 4 ++--
 3 files changed, 10 insertions(+), 3 deletions(-)

-- 
2.17.1

Comments

Adhemerval Zanella Netto Nov. 6, 2018, 5:14 p.m. UTC | #1
Ping.

On 15/10/2018 17:49, Adhemerval Zanella wrote:
> This patch defines TIOCSER_TEMT on all architectures using the __USE_MISC

> guards similar to BZ#17782 fix.  Latest Linux UAPI defines TIOCSER_TEMT

> with the same value for all architectures, so it is safe to use the value

> as default for all ABIs.

> 

> Checked on x86_64linux-gnu and build against sparc64-linux-gnu and

> powerpc64le-linux-gnu.

> 

> 	* sysdeps/unix/sysv/linux/bits/termios.h [__USE_MISC] (TIOCSER_TEMT):

> 	Define.

> 	* sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_MISC]

> 	(TIOCSER_TEMT): Likewise.

> 	* sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_MISC]

> 	(TEOCSER_TEMT): Likewise.

> ---

>  sysdeps/unix/sysv/linux/bits/termios.h         | 5 +++++

>  sysdeps/unix/sysv/linux/powerpc/bits/termios.h | 4 +++-

>  sysdeps/unix/sysv/linux/sparc/bits/termios.h   | 4 ++--

>  3 files changed, 10 insertions(+), 3 deletions(-)

> 

> diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h

> index 35efa97576..1e567affc3 100644

> --- a/sysdeps/unix/sysv/linux/bits/termios.h

> +++ b/sysdeps/unix/sysv/linux/bits/termios.h

> @@ -198,6 +198,11 @@ struct termios

>  # define EXTPROC 0200000

>  #endif

>  

> +#ifdef __USE_MISC

> +/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */

> +# define TIOCSER_TEMT    0x01   /* Transmitter physically empty */

> +#endif

> +

>  /* tcflow() and TCXONC use these */

>  #define	TCOOFF		0

>  #define	TCOON		1

> diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h

> index 1362cce551..afe592d5e4 100644

> --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h

> +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h

> @@ -273,7 +273,9 @@ struct ltchars {

>  #define _VEOL2	8

>  #define _VSWTC	9

>  

> +#ifdef __USE_MISC

>  /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */

> -#define TIOCSER_TEMT    0x01	/* Transmitter physically empty */

> +# define TIOCSER_TEMT    0x01	/* Transmitter physically empty */

> +#endif

>  

>  #endif /* __USE_MISC  */

> diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h

> index 4489b6c2fd..ffe8483694 100644

> --- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h

> +++ b/sysdeps/unix/sysv/linux/sparc/bits/termios.h

> @@ -203,9 +203,9 @@ struct termios

>  # define EXTPROC 0x00010000

>  #endif

>  

> -# if defined __USE_GNU

> +#ifdef __USE_MISC

>  /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */

> -#define TIOCSER_TEMT    0x01	/* Transmitter physically empty */

> +# define TIOCSER_TEMT    0x01	/* Transmitter physically empty */

>  #endif

>  

>  /* tcflow() and TCXONC use these */

>
Adhemerval Zanella Netto Dec. 19, 2018, 10:15 p.m. UTC | #2
Ping x2.

On 06/11/2018 15:14, Adhemerval Zanella wrote:
> Ping.

> 

> On 15/10/2018 17:49, Adhemerval Zanella wrote:

>> This patch defines TIOCSER_TEMT on all architectures using the __USE_MISC

>> guards similar to BZ#17782 fix.  Latest Linux UAPI defines TIOCSER_TEMT

>> with the same value for all architectures, so it is safe to use the value

>> as default for all ABIs.

>>

>> Checked on x86_64linux-gnu and build against sparc64-linux-gnu and

>> powerpc64le-linux-gnu.

>>

>> 	* sysdeps/unix/sysv/linux/bits/termios.h [__USE_MISC] (TIOCSER_TEMT):

>> 	Define.

>> 	* sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_MISC]

>> 	(TIOCSER_TEMT): Likewise.

>> 	* sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_MISC]

>> 	(TEOCSER_TEMT): Likewise.

>> ---

>>  sysdeps/unix/sysv/linux/bits/termios.h         | 5 +++++

>>  sysdeps/unix/sysv/linux/powerpc/bits/termios.h | 4 +++-

>>  sysdeps/unix/sysv/linux/sparc/bits/termios.h   | 4 ++--

>>  3 files changed, 10 insertions(+), 3 deletions(-)

>>

>> diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h

>> index 35efa97576..1e567affc3 100644

>> --- a/sysdeps/unix/sysv/linux/bits/termios.h

>> +++ b/sysdeps/unix/sysv/linux/bits/termios.h

>> @@ -198,6 +198,11 @@ struct termios

>>  # define EXTPROC 0200000

>>  #endif

>>  

>> +#ifdef __USE_MISC

>> +/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */

>> +# define TIOCSER_TEMT    0x01   /* Transmitter physically empty */

>> +#endif

>> +

>>  /* tcflow() and TCXONC use these */

>>  #define	TCOOFF		0

>>  #define	TCOON		1

>> diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h

>> index 1362cce551..afe592d5e4 100644

>> --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h

>> +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h

>> @@ -273,7 +273,9 @@ struct ltchars {

>>  #define _VEOL2	8

>>  #define _VSWTC	9

>>  

>> +#ifdef __USE_MISC

>>  /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */

>> -#define TIOCSER_TEMT    0x01	/* Transmitter physically empty */

>> +# define TIOCSER_TEMT    0x01	/* Transmitter physically empty */

>> +#endif

>>  

>>  #endif /* __USE_MISC  */

>> diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h

>> index 4489b6c2fd..ffe8483694 100644

>> --- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h

>> +++ b/sysdeps/unix/sysv/linux/sparc/bits/termios.h

>> @@ -203,9 +203,9 @@ struct termios

>>  # define EXTPROC 0x00010000

>>  #endif

>>  

>> -# if defined __USE_GNU

>> +#ifdef __USE_MISC

>>  /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */

>> -#define TIOCSER_TEMT    0x01	/* Transmitter physically empty */

>> +# define TIOCSER_TEMT    0x01	/* Transmitter physically empty */

>>  #endif

>>  

>>  /* tcflow() and TCXONC use these */

>>
diff mbox series

Patch

diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h
index 35efa97576..1e567affc3 100644
--- a/sysdeps/unix/sysv/linux/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/bits/termios.h
@@ -198,6 +198,11 @@  struct termios
 # define EXTPROC 0200000
 #endif
 
+#ifdef __USE_MISC
+/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
+# define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
+#endif
+
 /* tcflow() and TCXONC use these */
 #define	TCOOFF		0
 #define	TCOON		1
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
index 1362cce551..afe592d5e4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
@@ -273,7 +273,9 @@  struct ltchars {
 #define _VEOL2	8
 #define _VSWTC	9
 
+#ifdef __USE_MISC
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-#define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
+# define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
+#endif
 
 #endif /* __USE_MISC  */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
index 4489b6c2fd..ffe8483694 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
@@ -203,9 +203,9 @@  struct termios
 # define EXTPROC 0x00010000
 #endif
 
-# if defined __USE_GNU
+#ifdef __USE_MISC
 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-#define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
+# define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
 #endif
 
 /* tcflow() and TCXONC use these */