This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.28.9000-535-g6f343c1
- From: azanella at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 3 Jan 2019 13:38:53 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.28.9000-535-g6f343c1
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 6f343c1f338ca70411772309a3bbb1d67c71f419 (commit)
via 51f4beb0812fa407fb9638637c81b4f303e2241f (commit)
via f69c5cb2a53c242e24f41145f64e3480856a4dd6 (commit)
via 3aa4a07ec1b2b6b2ba90d2fb54eaefe194b210f1 (commit)
via 22679ddf10487fe419c07de46427cf0173d008e3 (commit)
via 72eb6ecc7efeab35554d54c64dc3358edd1db822 (commit)
via 9c5d0d02c1122d10c2407333eeecd1ee2285084b (commit)
via 7b832018881cbc860c70b7a768dae9cfb7b55663 (commit)
via 3127003e756f3202462a11d8e5bd2b994b056c91 (commit)
via 48c1dd963233930f55c48fe3f38ce6c2362fc373 (commit)
via e5a50db36eaa6e8c6427b3a971563240b633ca85 (commit)
via 8083afa55d8c68abc02902e9a6ff16be5f301940 (commit)
from 4d7d7dc6fe52216bab2a1a171966028276b0dde3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f343c1f338ca70411772309a3bbb1d67c71f419
commit 6f343c1f338ca70411772309a3bbb1d67c71f419
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Oct 9 18:57:53 2018 -0300
termios: Consolidate termios.h
This patch consolidates the Linux termios.h by removing the arch-specific
one.
No semantic change is expected, checked on a build against x86_64-linux-gnu,
alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu.
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
bits/termios-misc.h.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Remove file.
* sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/bits/termios-misc.h: New file.
* sysdeps/unix/sysv/linux/bits/termios.h: Include termios-misc.h.
diff --git a/ChangeLog b/ChangeLog
index 77275a1..c446abc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2019-01-03 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
+ bits/termios-misc.h.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Remove file.
+ * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/termios-misc.h: New file.
+ * sysdeps/unix/sysv/linux/bits/termios.h: Include termios-misc.h.
+
* sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h: New file.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_MISC]
(struct sgtty, struct tchars, struct ltchars, TIOCPKT_DATA,
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index feddcab..5f8c2c7 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -47,7 +47,8 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
bits/termios-struct.h bits/termios-c_cc.h \
bits/termios-c_iflag.h bits/termios-c_oflag.h \
bits/termios-baud.h bits/termios-c_cflag.h \
- bits/termios-c_lflag.h bits/termios-tcflow.h
+ bits/termios-c_lflag.h bits/termios-tcflow.h \
+ bits/termios-misc.h
tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
deleted file mode 100644
index 24b2c52..0000000
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* termios type and macro definitions. Linux version.
- Copyright (C) 1993-2019 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _TERMIOS_H
-# error "Never include <bits/termios.h> directly; use <termios.h> instead."
-#endif
-
-typedef unsigned char cc_t;
-typedef unsigned int speed_t;
-typedef unsigned int tcflag_t;
-
-#include <bits/termios-struct.h>
-#include <bits/termios-c_cc.h>
-#include <bits/termios-c_iflag.h>
-#include <bits/termios-c_oflag.h>
-
-/* c_cflag bit meaning */
-#define B0 0000000 /* hang up */
-#define B50 0000001
-#define B75 0000002
-#define B110 0000003
-#define B134 0000004
-#define B150 0000005
-#define B200 0000006
-#define B300 0000007
-#define B600 0000010
-#define B1200 0000011
-#define B1800 0000012
-#define B2400 0000013
-#define B4800 0000014
-#define B9600 0000015
-#define B19200 0000016
-#define B38400 0000017
-#ifdef __USE_MISC
-# define EXTA B19200
-# define EXTB B38400
-#endif
-#include <bits/termios-baud.h>
-
-#include <bits/termios-c_cflag.h>
-#include <bits/termios-c_lflag.h>
-
-/* Values for the ACTION argument to `tcflow'. */
-#define TCOOFF 0
-#define TCOON 1
-#define TCIOFF 2
-#define TCION 3
-
-/* Values for the QUEUE_SELECTOR argument to `tcflush'. */
-#define TCIFLUSH 0
-#define TCOFLUSH 1
-#define TCIOFLUSH 2
-
-#include <bits/termios-tcflow.h>
diff --git a/sysdeps/unix/sysv/linux/bits/termios-misc.h b/sysdeps/unix/sysv/linux/bits/termios-misc.h
new file mode 100644
index 0000000..8a151fa
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/bits/termios-misc.h
@@ -0,0 +1,21 @@
+/* termios baud platform specific definitions. Linux/generic version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-misc.h> directly; use <termios.h> instead."
+#endif
diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h
index 158f58b..997231c 100644
--- a/sysdeps/unix/sysv/linux/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/bits/termios.h
@@ -72,3 +72,5 @@ typedef unsigned int tcflag_t;
#define TCIOFLUSH 2
#include <bits/termios-tcflow.h>
+
+#include <bits/termios-misc.h>
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
deleted file mode 100644
index b024f5e..0000000
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* termios type and macro definitions. Linux/MIPS version.
- Copyright (C) 1993-2019 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _TERMIOS_H
-# error "Never include <bits/termios.h> directly; use <termios.h> instead."
-#endif
-
-typedef unsigned char cc_t;
-typedef unsigned int speed_t;
-typedef unsigned int tcflag_t;
-
-#include <bits/termios-struct.h>
-#include <bits/termios-c_cc.h>
-#include <bits/termios-c_iflag.h>
-#include <bits/termios-c_oflag.h>
-
-/* c_cflag bit meaning */
-#define B0 0000000 /* hang up */
-#define B50 0000001
-#define B75 0000002
-#define B110 0000003
-#define B134 0000004
-#define B150 0000005
-#define B200 0000006
-#define B300 0000007
-#define B600 0000010
-#define B1200 0000011
-#define B1800 0000012
-#define B2400 0000013
-#define B4800 0000014
-#define B9600 0000015
-#define B19200 0000016
-#define B38400 0000017
-#ifdef __USE_MISC
-# define EXTA B19200
-# define EXTB B38400
-#endif
-#include <bits/termios-baud.h>
-
-#include <bits/termios-c_cflag.h>
-#include <bits/termios-c_lflag.h>
-
-#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 /* Suspend output. */
-#define TCOON 1 /* Restart suspended output. */
-#define TCIOFF 2 /* Send a STOP character. */
-#define TCION 3 /* Send a START character. */
-
-/* tcflush() and TCFLSH use these */
-#define TCIFLUSH 0 /* Discard data received but not yet read. */
-#define TCOFLUSH 1 /* Discard data written but not yet sent. */
-#define TCIOFLUSH 2 /* Discard all pending data. */
-
-#include <bits/termios-tcflow.h>
diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile
index 7712428..19ac59d 100644
--- a/sysdeps/unix/sysv/linux/powerpc/Makefile
+++ b/sysdeps/unix/sysv/linux/powerpc/Makefile
@@ -23,7 +23,7 @@ LDFLAGS-tst-tlsmod2.so += -Wl,--no-tls-get-addr-optimize
endif
ifeq ($(subdir),misc)
-sysdep_headers += bits/ppc.h bits/termios-misc.h
+sysdep_headers += bits/ppc.h
sysdep_routines += get_timebase_freq
tests += test-gettimebasefreq
tests += test-powerpc-linux-sysconf
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
deleted file mode 100644
index fea7965..0000000
--- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _TERMIOS_H
-# error "Never include <bits/termios.h> directly; use <termios.h> instead."
-#endif
-
-typedef unsigned char cc_t;
-typedef unsigned int speed_t;
-typedef unsigned int tcflag_t;
-
-#include <bits/termios-struct.h>
-#include <bits/termios-c_cc.h>
-#include <bits/termios-c_iflag.h>
-#include <bits/termios-c_oflag.h>
-
-/* c_cflag bit meaning */
-#define B0 0000000 /* hang up */
-#define B50 0000001
-#define B75 0000002
-#define B110 0000003
-#define B134 0000004
-#define B150 0000005
-#define B200 0000006
-#define B300 0000007
-#define B600 0000010
-#define B1200 0000011
-#define B1800 0000012
-#define B2400 0000013
-#define B4800 0000014
-#define B9600 0000015
-#define B19200 0000016
-#define B38400 0000017
-#ifdef __USE_MISC
-# define EXTA B19200
-# define EXTB B38400
-#endif
-#include <bits/termios-baud.h>
-
-#include <bits/termios-c_cflag.h>
-#include <bits/termios-c_lflag.h>
-
-/* Values for the ACTION argument to `tcflow'. */
-#define TCOOFF 0
-#define TCOON 1
-#define TCIOFF 2
-#define TCION 3
-
-/* Values for the QUEUE_SELECTOR argument to `tcflush'. */
-#define TCIFLUSH 0
-#define TCOFLUSH 1
-#define TCIOFLUSH 2
-
-#include <bits/termios-tcflow.h>
-
-#include <bits/termios-misc.h>
-
-#ifdef __USE_MISC
-/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
-#endif
-
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
deleted file mode 100644
index 71d3c6e..0000000
--- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* termios type and macro definitions. Linux/SPARC version.
- Copyright (C) 1993-2019 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _TERMIOS_H
-# error "Never include <bits/termios.h> directly; use <termios.h> instead."
-#endif
-
-typedef unsigned char cc_t;
-typedef unsigned int speed_t;
-typedef unsigned int tcflag_t;
-
-#include <bits/termios-struct.h>
-#include <bits/termios-c_cc.h>
-#include <bits/termios-c_iflag.h>
-#include <bits/termios-c_oflag.h>
-
-/* c_cflag bit meaning */
-#define B0 0x00000000 /* hang up */
-#define B50 0x00000001
-#define B75 0x00000002
-#define B110 0x00000003
-#define B134 0x00000004
-#define B150 0x00000005
-#define B200 0x00000006
-#define B300 0x00000007
-#define B600 0x00000008
-#define B1200 0x00000009
-#define B1800 0x0000000a
-#define B2400 0x0000000b
-#define B4800 0x0000000c
-#define B9600 0x0000000d
-#define B19200 0x0000000e
-#define B38400 0x0000000f
-#ifdef __USE_MISC
-# define EXTA B19200
-# define EXTB B38400
-#endif
-#include <bits/termios-baud.h>
-
-#include <bits/termios-c_cflag.h>
-#include <bits/termios-c_lflag.h>
-
-#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
-#define TCIOFF 2
-#define TCION 3
-
-/* tcflush() and TCFLSH use these */
-#define TCIFLUSH 0
-#define TCOFLUSH 1
-#define TCIOFLUSH 2
-
-#include <bits/termios-tcflow.h>
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51f4beb0812fa407fb9638637c81b4f303e2241f
commit 51f4beb0812fa407fb9638637c81b4f303e2241f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Oct 9 17:41:28 2018 -0300
termios: Add powerpc termios-misc
PowerPC termios.h header contains additional BSD terminal mode definitions
(sgttyb, tchars, ltchars, and associated TIOCPKT_* symbolic constants).
This patch moves all powerpc termios specific definition to its own header.
No semantic change is expected, checked on a build against a
powerpc64le-linux-gnu build.
* sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h: New file.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_MISC]
(struct sgtty, struct tchars, struct ltchars, TIOCPKT_DATA,
TIOCPKT_FLUSHREAD, TIOCPKT_FLUSHWRITE, TIOCPKT_STOP, TIOCPKT_START,
TIOCPKT_NOSTOP, TIOCPKT_DOSTOP, _VINTR, _VQUIT, _VERASE, _VKILL,
_VEOF, _VMIN, _VEOL, _VTIME, _VEOL2, _VSWTC): Move to
termios-misc.h.
* sysdeps/unix/sysv/linux/powerpc/Makefile [$subdir == misc]
(sysdep_headers): Add termios-misc.h.
diff --git a/ChangeLog b/ChangeLog
index 562cfae..77275a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2019-01-03 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h: New file.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_MISC]
+ (struct sgtty, struct tchars, struct ltchars, TIOCPKT_DATA,
+ TIOCPKT_FLUSHREAD, TIOCPKT_FLUSHWRITE, TIOCPKT_STOP, TIOCPKT_START,
+ TIOCPKT_NOSTOP, TIOCPKT_DOSTOP, _VINTR, _VQUIT, _VERASE, _VKILL,
+ _VEOF, _VMIN, _VEOL, _VTIME, _VEOL2, _VSWTC): Move to
+ termios-misc.h.
+ * sysdeps/unix/sysv/linux/powerpc/Makefile [$subdir == misc]
+ (sysdep_headers): Add termios-misc.h.
+
* sysdeps/unix/sysv/linux/bits/termios.h (_IOT_termios): Remove.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile
index 19ac59d..7712428 100644
--- a/sysdeps/unix/sysv/linux/powerpc/Makefile
+++ b/sysdeps/unix/sysv/linux/powerpc/Makefile
@@ -23,7 +23,7 @@ LDFLAGS-tst-tlsmod2.so += -Wl,--no-tls-get-addr-optimize
endif
ifeq ($(subdir),misc)
-sysdep_headers += bits/ppc.h
+sysdep_headers += bits/ppc.h bits/termios-misc.h
sysdep_routines += get_timebase_freq
tests += test-gettimebasefreq
tests += test-powerpc-linux-sysconf
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h
new file mode 100644
index 0000000..596439a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h
@@ -0,0 +1,72 @@
+/* termios baud platform specific definitions. Linux/powerpc version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-misc.h> directly; use <termios.h> instead."
+#endif
+
+#ifdef __USE_MISC
+
+struct sgttyb {
+ char sg_ispeed;
+ char sg_ospeed;
+ char sg_erase;
+ char sg_kill;
+ short sg_flags;
+};
+
+struct tchars {
+ char t_intrc;
+ char t_quitc;
+ char t_startc;
+ char t_stopc;
+ char t_eofc;
+ char t_brkc;
+};
+
+struct ltchars {
+ char t_suspc;
+ char t_dsuspc;
+ char t_rprntc;
+ char t_flushc;
+ char t_werasc;
+ char t_lnextc;
+};
+
+/* Used for packet mode */
+#define TIOCPKT_DATA 0
+#define TIOCPKT_FLUSHREAD 1
+#define TIOCPKT_FLUSHWRITE 2
+#define TIOCPKT_STOP 4
+#define TIOCPKT_START 8
+#define TIOCPKT_NOSTOP 16
+#define TIOCPKT_DOSTOP 32
+
+/* c_cc characters */
+#define _VINTR 0
+#define _VQUIT 1
+#define _VERASE 2
+#define _VKILL 3
+#define _VEOF 4
+#define _VMIN 5
+#define _VEOL 6
+#define _VTIME 7
+#define _VEOL2 8
+#define _VSWTC 9
+
+#endif /* __USE_MISC */
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
index 18c27fe..fea7965 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
@@ -67,58 +67,10 @@ typedef unsigned int tcflag_t;
#include <bits/termios-tcflow.h>
-#ifdef __USE_MISC
-
-struct sgttyb {
- char sg_ispeed;
- char sg_ospeed;
- char sg_erase;
- char sg_kill;
- short sg_flags;
-};
-
-struct tchars {
- char t_intrc;
- char t_quitc;
- char t_startc;
- char t_stopc;
- char t_eofc;
- char t_brkc;
-};
-
-struct ltchars {
- char t_suspc;
- char t_dsuspc;
- char t_rprntc;
- char t_flushc;
- char t_werasc;
- char t_lnextc;
-};
-
-/* Used for packet mode */
-#define TIOCPKT_DATA 0
-#define TIOCPKT_FLUSHREAD 1
-#define TIOCPKT_FLUSHWRITE 2
-#define TIOCPKT_STOP 4
-#define TIOCPKT_START 8
-#define TIOCPKT_NOSTOP 16
-#define TIOCPKT_DOSTOP 32
-
-/* c_cc characters */
-#define _VINTR 0
-#define _VQUIT 1
-#define _VERASE 2
-#define _VKILL 3
-#define _VEOF 4
-#define _VMIN 5
-#define _VEOL 6
-#define _VTIME 7
-#define _VEOL2 8
-#define _VSWTC 9
+#include <bits/termios-misc.h>
#ifdef __USE_MISC
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
#endif
-#endif /* __USE_MISC */
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f69c5cb2a53c242e24f41145f64e3480856a4dd6
commit f69c5cb2a53c242e24f41145f64e3480856a4dd6
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Oct 9 17:28:27 2018 -0300
termios: Remove Linux _IOT_termios
It is used only on hurd.
No semantic change is expected, checked on a build against x86_64-linux-gnu,
alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu.
* sysdeps/unix/sysv/linux/bits/termios.h (_IOT_termios): Remove.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
diff --git a/ChangeLog b/ChangeLog
index c6c1d2c..562cfae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2019-01-03 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * sysdeps/unix/sysv/linux/bits/termios.h (_IOT_termios): Remove.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
+
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
termios-tcflow.h.
* sysdeps/unix/sysv/linux/bits/termios-tcflow.h: New file.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index fc47547..24b2c52 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -67,6 +67,3 @@ typedef unsigned int tcflag_t;
#define TCIOFLUSH 2
#include <bits/termios-tcflow.h>
-
-#define _IOT_termios /* Hurd ioctl type field. */ \
- _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h
index a2ce092..158f58b 100644
--- a/sysdeps/unix/sysv/linux/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/bits/termios.h
@@ -72,6 +72,3 @@ typedef unsigned int tcflag_t;
#define TCIOFLUSH 2
#include <bits/termios-tcflow.h>
-
-#define _IOT_termios /* Hurd ioctl type field. */ \
- _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index 7f38f85..b024f5e 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -72,6 +72,3 @@ typedef unsigned int tcflag_t;
#define TCIOFLUSH 2 /* Discard all pending data. */
#include <bits/termios-tcflow.h>
-
-#define _IOT_termios /* Hurd ioctl type field. */ \
- _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3aa4a07ec1b2b6b2ba90d2fb54eaefe194b210f1
commit 3aa4a07ec1b2b6b2ba90d2fb54eaefe194b210f1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Oct 9 15:54:16 2018 -0300
termios: Consolidate tcflow symbolic constants
This patch consolidates the termios symbolic constants for use with tcflow
in its own header. The Linux generic implementation values match the
kernel UAPI and each architecture with deviate values have their own
implementation (currently only mips).
No semantic change is expected, checked on a build against x86_64-linux-gnu,
alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu.
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
termios-tcflow.h.
* sysdeps/unix/sysv/linux/bits/termios-tcflow.h: New file.
* sysdeps/unix/sysv/linux/mips/bits/termios-tcflow.h: Likewise.
* sysdeps/unix/sysv/linux/bits/termios.h (TCSANOW, TCSADRAIN,
TCSAFLUSH): Move to termios-tcflow.h.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
diff --git a/ChangeLog b/ChangeLog
index d9eb674..c6c1d2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,17 @@
2019-01-03 Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
+ termios-tcflow.h.
+ * sysdeps/unix/sysv/linux/bits/termios-tcflow.h: New file.
+ * sysdeps/unix/sysv/linux/mips/bits/termios-tcflow.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/termios.h (TCSANOW, TCSADRAIN,
+ TCSAFLUSH): Move to termios-tcflow.h.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
+
+ * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
termios-c_lflag.h.
* sysdeps/unix/sysv/linux/bits/termios-c_lflag.h: New file.
* sysdeps/unix/sysv/linux/alpha/bits/termios-c_lflag.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index bd17a57..feddcab 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -47,7 +47,7 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
bits/termios-struct.h bits/termios-c_cc.h \
bits/termios-c_iflag.h bits/termios-c_oflag.h \
bits/termios-baud.h bits/termios-c_cflag.h \
- bits/termios-c_lflag.h
+ bits/termios-c_lflag.h bits/termios-tcflow.h
tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index 95e40d8..fc47547 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -66,11 +66,7 @@ typedef unsigned int tcflag_t;
#define TCOFLUSH 1
#define TCIOFLUSH 2
-/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
-#define TCSANOW 0
-#define TCSADRAIN 1
-#define TCSAFLUSH 2
-
+#include <bits/termios-tcflow.h>
#define _IOT_termios /* Hurd ioctl type field. */ \
_IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
diff --git a/sysdeps/unix/sysv/linux/bits/termios-tcflow.h b/sysdeps/unix/sysv/linux/bits/termios-tcflow.h
new file mode 100644
index 0000000..3832d50
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/bits/termios-tcflow.h
@@ -0,0 +1,26 @@
+/* termios tcflag symbolic contants definitions. Linux/generic version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead."
+#endif
+
+/* tcsetattr uses these. */
+#define TCSANOW 0
+#define TCSADRAIN 1
+#define TCSAFLUSH 2
diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h
index e74618d..a2ce092 100644
--- a/sysdeps/unix/sysv/linux/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/bits/termios.h
@@ -71,11 +71,7 @@ typedef unsigned int tcflag_t;
#define TCOFLUSH 1
#define TCIOFLUSH 2
-/* tcsetattr uses these */
-#define TCSANOW 0
-#define TCSADRAIN 1
-#define TCSAFLUSH 2
-
+#include <bits/termios-tcflow.h>
#define _IOT_termios /* Hurd ioctl type field. */ \
_IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios-tcflow.h b/sysdeps/unix/sysv/linux/mips/bits/termios-tcflow.h
new file mode 100644
index 0000000..68b2972
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios-tcflow.h
@@ -0,0 +1,26 @@
+/* termios local mode definitions. Linux/mips version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead."
+#endif
+
+/* tcsetattr uses these */
+#define TCSANOW 0x540e /* Same as TCSETS; change immediately. */
+#define TCSADRAIN 0x540f /* Same as TCSETSW; change when pending output is written. */
+#define TCSAFLUSH 0x5410 /* Same as TCSETSF; flush pending input before changing. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index 8f6c918..7f38f85 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -71,10 +71,7 @@ typedef unsigned int tcflag_t;
#define TCOFLUSH 1 /* Discard data written but not yet sent. */
#define TCIOFLUSH 2 /* Discard all pending data. */
-/* tcsetattr uses these */
-#define TCSANOW 0x540e /* Same as TCSETS; change immediately. */
-#define TCSADRAIN 0x540f /* Same as TCSETSW; change when pending output is written. */
-#define TCSAFLUSH 0x5410 /* Same as TCSETSF; flush pending input before changing. */
+#include <bits/termios-tcflow.h>
#define _IOT_termios /* Hurd ioctl type field. */ \
_IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
index 65dad31..18c27fe 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
@@ -65,10 +65,7 @@ typedef unsigned int tcflag_t;
#define TCOFLUSH 1
#define TCIOFLUSH 2
-/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
-#define TCSANOW 0
-#define TCSADRAIN 1
-#define TCSAFLUSH 2
+#include <bits/termios-tcflow.h>
#ifdef __USE_MISC
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
index 12dc706..71d3c6e 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
@@ -71,7 +71,4 @@ typedef unsigned int tcflag_t;
#define TCOFLUSH 1
#define TCIOFLUSH 2
-/* tcsetattr uses these */
-#define TCSANOW 0
-#define TCSADRAIN 1
-#define TCSAFLUSH 2
+#include <bits/termios-tcflow.h>
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22679ddf10487fe419c07de46427cf0173d008e3
commit 22679ddf10487fe419c07de46427cf0173d008e3
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Oct 9 15:34:31 2018 -0300
termios: Consolidate local mode definitions
This patch consolidates the termios symbolic constants used for local
mode with c_lflag 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, mips, and powerpc).
No semantic change is expected, checked on a build against x86_64-linux-gnu,
alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu.
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
termios-c_lflag.h.
* sysdeps/unix/sysv/linux/bits/termios-c_lflag.h: New file.
* sysdeps/unix/sysv/linux/alpha/bits/termios-c_lflag.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios-c_lflag.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios-c_lflag.h: Likewise.
* sysdeps/unix/sysv/linux/bits/termios.h (ISIG, ISCANON, ECHO, ECHOE,
ECHOK, ECHONL, NOFLSH, TOSTOP, IEXTEN): Move to termios-c_lflag.h.
[__USE_MISC || (__USE_XOPEN && !__USE_XOPEN2K)] (XCASE): Likewise.
[__USE_MISC] (ECHOCTL, ECHOPRT, ECHOKE, FLUSHO, PENDIN, EXTPROC):
Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
diff --git a/ChangeLog b/ChangeLog
index 47d1010..d9eb674 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,22 @@
2019-01-03 Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
+ termios-c_lflag.h.
+ * sysdeps/unix/sysv/linux/bits/termios-c_lflag.h: New file.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios-c_lflag.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/termios-c_lflag.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios-c_lflag.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/termios.h (ISIG, ISCANON, ECHO, ECHOE,
+ ECHOK, ECHONL, NOFLSH, TOSTOP, IEXTEN): Move to termios-c_lflag.h.
+ [__USE_MISC || (__USE_XOPEN && !__USE_XOPEN2K)] (XCASE): Likewise.
+ [__USE_MISC] (ECHOCTL, ECHOPRT, ECHOKE, FLUSHO, PENDIN, EXTPROC):
+ Likewise.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
+
+ * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
termios-c_cflag.h.
* sysdeps/unix/sysv/linux/bits/termios-c_cflag.h: New file.
* sysdeps/unix/sysv/linux/alpha/bits/termios-c_cflag.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 9186e3a..bd17a57 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -46,7 +46,8 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
bits/msq-pad.h bits/sem-pad.h bits/shmlba.h bits/shm-pad.h \
bits/termios-struct.h bits/termios-c_cc.h \
bits/termios-c_iflag.h bits/termios-c_oflag.h \
- bits/termios-baud.h bits/termios-c_cflag.h
+ bits/termios-baud.h bits/termios-c_cflag.h \
+ bits/termios-c_lflag.h
tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios-c_lflag.h b/sysdeps/unix/sysv/linux/alpha/bits/termios-c_lflag.h
new file mode 100644
index 0000000..7b12d7e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios-c_lflag.h
@@ -0,0 +1,42 @@
+/* termios local mode definitions. Linux/alpha version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
+#endif
+
+/* c_lflag bits */
+#define ISIG 0x00000080
+#define ICANON 0x00000100
+#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
+# define XCASE 0x00004000
+#endif
+#define ECHO 0x00000008
+#define ECHOE 0x00000002
+#define ECHOK 0x00000004
+#define ECHONL 0x00000010
+#define NOFLSH 0x80000000
+#define TOSTOP 0x00400000
+#ifdef __USE_MISC
+# define ECHOCTL 0x00000040
+# define ECHOPRT 0x00000020
+# define ECHOKE 0x00000001
+# define FLUSHO 0x00800000
+# define PENDIN 0x20000000
+#endif
+#define IEXTEN 0x00000400
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index 59cb224..95e40d8 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -53,27 +53,7 @@ typedef unsigned int tcflag_t;
#include <bits/termios-baud.h>
#include <bits/termios-c_cflag.h>
-
-/* c_lflag bits */
-#define ISIG 0x00000080
-#define ICANON 0x00000100
-#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
-# define XCASE 0x00004000
-#endif
-#define ECHO 0x00000008
-#define ECHOE 0x00000002
-#define ECHOK 0x00000004
-#define ECHONL 0x00000010
-#define NOFLSH 0x80000000
-#define TOSTOP 0x00400000
-#ifdef __USE_MISC
-# define ECHOCTL 0x00000040
-# define ECHOPRT 0x00000020
-# define ECHOKE 0x00000001
-# define FLUSHO 0x00800000
-# define PENDIN 0x20000000
-#endif
-#define IEXTEN 0x00000400
+#include <bits/termios-c_lflag.h>
/* Values for the ACTION argument to `tcflow'. */
#define TCOOFF 0
diff --git a/sysdeps/unix/sysv/linux/bits/termios-c_lflag.h b/sysdeps/unix/sysv/linux/bits/termios-c_lflag.h
new file mode 100644
index 0000000..6e17708
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/bits/termios-c_lflag.h
@@ -0,0 +1,58 @@
+/* termios local mode definitions. Linux/generic version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
+#endif
+
+/* c_lflag bits */
+#define ISIG 0000001 /* Enable signals. */
+#define ICANON 0000002 /* Canonical input (erase and kill processing). */
+#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
+# define XCASE 0000004
+#endif
+#define ECHO 0000010 /* Enable echo. */
+#define ECHOE 0000020 /* Echo erase character as error-correcting
+ backspace. */
+#define ECHOK 0000040 /* Echo KILL. */
+#define ECHONL 0000100 /* Echo NL. */
+#define NOFLSH 0000200 /* Disable flush after interrupt or quit. */
+#define TOSTOP 0000400 /* Send SIGTTOU for background output. */
+#ifdef __USE_MISC
+# define ECHOCTL 0001000 /* If ECHO is also set, terminal special characters
+ other than TAB, NL, START, and STOP are echoed as
+ ^X, where X is the character with ASCII code 0x40
+ greater than the special character
+ (not in POSIX). */
+# define ECHOPRT 0002000 /* If ICANON and ECHO are also set, characters are
+ printed as they are being erased
+ (not in POSIX). */
+# define ECHOKE 0004000 /* If ICANON is also set, KILL is echoed by erasing
+ each character on the line, as specified by ECHOE
+ and ECHOPRT (not in POSIX). */
+# define FLUSHO 0010000 /* Output is being flushed. This flag is toggled by
+ typing the DISCARD character (not in POSIX). */
+# define PENDIN 0040000 /* All characters in the input queue are reprinted
+ when the next character is read
+ (not in POSIX). */
+#endif
+#define IEXTEN 0100000 /* Enable implementation-defined input
+ processing. */
+#ifdef __USE_MISC
+# define EXTPROC 0200000
+#endif
diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h
index 0ec195d..e74618d 100644
--- a/sysdeps/unix/sysv/linux/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/bits/termios.h
@@ -53,30 +53,7 @@ typedef unsigned int tcflag_t;
#include <bits/termios-baud.h>
#include <bits/termios-c_cflag.h>
-
-/* c_lflag bits */
-#define ISIG 0000001
-#define ICANON 0000002
-#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
-# define XCASE 0000004
-#endif
-#define ECHO 0000010
-#define ECHOE 0000020
-#define ECHOK 0000040
-#define ECHONL 0000100
-#define NOFLSH 0000200
-#define TOSTOP 0000400
-#ifdef __USE_MISC
-# define ECHOCTL 0001000
-# define ECHOPRT 0002000
-# define ECHOKE 0004000
-# define FLUSHO 0010000
-# define PENDIN 0040000
-#endif
-#define IEXTEN 0100000
-#ifdef __USE_MISC
-# define EXTPROC 0200000
-#endif
+#include <bits/termios-c_lflag.h>
#ifdef __USE_MISC
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios-c_lflag.h b/sysdeps/unix/sysv/linux/mips/bits/termios-c_lflag.h
new file mode 100644
index 0000000..25fcd38
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios-c_lflag.h
@@ -0,0 +1,46 @@
+/* termios local mode definitions. Linux/mips version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
+#endif
+
+/* c_lflag bits */
+#define ISIG 0000001 /* Enable signals. */
+#define ICANON 0000002 /* Do erase and kill processing. */
+#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
+# define XCASE 0000004
+#endif
+#define ECHO 0000010 /* Enable echo. */
+#define ECHOE 0000020 /* Visual erase for ERASE. */
+#define ECHOK 0000040 /* Echo NL after KILL. */
+#define ECHONL 0000100 /* Echo NL even if ECHO is off. */
+#define NOFLSH 0000200 /* Disable flush after interrupt. */
+#define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */
+#ifdef __USE_MISC
+# define ECHOCTL 0001000 /* Echo control characters as ^X. */
+# define ECHOPRT 0002000 /* Hardcopy visual erase. */
+# define ECHOKE 0004000 /* Visual erase for KILL. */
+# define FLUSHO 0020000
+# define PENDIN 0040000 /* Retype pending input (state). */
+#endif
+#define TOSTOP 0100000 /* Send SIGTTOU for background output. */
+#define ITOSTOP TOSTOP
+#ifdef __USE_MISC
+# define EXTPROC 0200000
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index 443283f..8f6c918 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -53,31 +53,7 @@ typedef unsigned int tcflag_t;
#include <bits/termios-baud.h>
#include <bits/termios-c_cflag.h>
-
-/* c_lflag bits */
-#define ISIG 0000001 /* Enable signals. */
-#define ICANON 0000002 /* Do erase and kill processing. */
-#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
-# define XCASE 0000004
-#endif
-#define ECHO 0000010 /* Enable echo. */
-#define ECHOE 0000020 /* Visual erase for ERASE. */
-#define ECHOK 0000040 /* Echo NL after KILL. */
-#define ECHONL 0000100 /* Echo NL even if ECHO is off. */
-#define NOFLSH 0000200 /* Disable flush after interrupt. */
-#define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */
-#ifdef __USE_MISC
-# define ECHOCTL 0001000 /* Echo control characters as ^X. */
-# define ECHOPRT 0002000 /* Hardcopy visual erase. */
-# define ECHOKE 0004000 /* Visual erase for KILL. */
-# define FLUSHO 0020000
-# define PENDIN 0040000 /* Retype pending input (state). */
-#endif
-#define TOSTOP 0100000 /* Send SIGTTOU for background output. */
-#define ITOSTOP TOSTOP
-#ifdef __USE_MISC
-# define EXTPROC 0200000
-#endif
+#include <bits/termios-c_lflag.h>
#ifdef __USE_MISC
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_lflag.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_lflag.h
new file mode 100644
index 0000000..e553787
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_lflag.h
@@ -0,0 +1,45 @@
+/* termios local mode definitions. Linux/powerpc version.
+ Copyright (C) 2019i Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
+#endif
+
+/* c_lflag bits */
+#define ISIG 0x00000080
+#define ICANON 0x00000100
+#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
+# define XCASE 0x00004000
+#endif
+#define ECHO 0x00000008
+#define ECHOE 0x00000002
+#define ECHOK 0x00000004
+#define ECHONL 0x00000010
+#define NOFLSH 0x80000000
+#define TOSTOP 0x00400000
+#ifdef __USE_MISC
+# define ECHOCTL 0x00000040
+# define ECHOPRT 0x00000020
+# define ECHOKE 0x00000001
+# define FLUSHO 0x00800000
+# define PENDIN 0x20000000
+#endif
+#define IEXTEN 0x00000400
+#ifdef __USE_MISC
+# define EXTPROC 0x10000000
+#endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
index 8b6cbf5..65dad31 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
@@ -52,30 +52,7 @@ typedef unsigned int tcflag_t;
#include <bits/termios-baud.h>
#include <bits/termios-c_cflag.h>
-
-/* c_lflag bits */
-#define ISIG 0x00000080
-#define ICANON 0x00000100
-#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
-# define XCASE 0x00004000
-#endif
-#define ECHO 0x00000008
-#define ECHOE 0x00000002
-#define ECHOK 0x00000004
-#define ECHONL 0x00000010
-#define NOFLSH 0x80000000
-#define TOSTOP 0x00400000
-#ifdef __USE_MISC
-# define ECHOCTL 0x00000040
-# define ECHOPRT 0x00000020
-# define ECHOKE 0x00000001
-# define FLUSHO 0x00800000
-# define PENDIN 0x20000000
-#endif
-#define IEXTEN 0x00000400
-#ifdef __USE_MISC
-# define EXTPROC 0x10000000
-#endif
+#include <bits/termios-c_lflag.h>
/* Values for the ACTION argument to `tcflow'. */
#define TCOOFF 0
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
index 32d9424..12dc706 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
@@ -53,31 +53,7 @@ typedef unsigned int tcflag_t;
#include <bits/termios-baud.h>
#include <bits/termios-c_cflag.h>
-
-/* c_lflag bits */
-#define ISIG 0x00000001
-#define ICANON 0x00000002
-#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
-# define XCASE 0x00000004
-#endif
-#define ECHO 0x00000008
-#define ECHOE 0x00000010
-#define ECHOK 0x00000020
-#define ECHONL 0x00000040
-#define NOFLSH 0x00000080
-#define TOSTOP 0x00000100
-#ifdef __USE_MISC
-# define ECHOCTL 0x00000200
-# define ECHOPRT 0x00000400
-# define ECHOKE 0x00000800
-# define DEFECHO 0x00001000 /* SUNOS thing, what is it? */
-# define FLUSHO 0x00002000
-# define PENDIN 0x00004000
-#endif
-#define IEXTEN 0x00008000
-#ifdef __USE_MISC
-# define EXTPROC 0x00010000
-#endif
+#include <bits/termios-c_lflag.h>
#ifdef __USE_MISC
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=72eb6ecc7efeab35554d54c64dc3358edd1db822
commit 72eb6ecc7efeab35554d54c64dc3358edd1db822
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Oct 9 15:03:30 2018 -0300
termios: Consolidate control mode definitions
This patch consolidates the termios symbolic constants used for output
mode with c_cflag memver 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).
No semantic change is expected, checked on a build against x86_64-linux-gnu,
alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu.
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
termios-c_cflag.h.
* sysdeps/unix/sysv/linux/bits/termios-c_cflag.h: New file.
* sysdeps/unix/sysv/linux/alpha/bits/termios-c_cflag.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cflag.h: Likewise.
* sysdeps/unix/sysv/linux/bits/termios.h (CSIZE, CS5, CS6, CS7, CS8,
CSTOPB, CREAD, PARENB, PARODD, HUPCL, CLOCAL): Move to
termios-c_cflag.h.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
diff --git a/ChangeLog b/ChangeLog
index a3a5495..47d1010 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2019-01-03 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
+ termios-c_cflag.h.
+ * sysdeps/unix/sysv/linux/bits/termios-c_cflag.h: New file.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios-c_cflag.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cflag.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/termios.h (CSIZE, CS5, CS6, CS7, CS8,
+ CSTOPB, CREAD, PARENB, PARODD, HUPCL, CLOCAL): Move to
+ termios-c_cflag.h.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
+
[BZ #23783]
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
termios-baud.h.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index e1ddbf9..9186e3a 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -46,7 +46,7 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
bits/msq-pad.h bits/sem-pad.h bits/shmlba.h bits/shm-pad.h \
bits/termios-struct.h bits/termios-c_cc.h \
bits/termios-c_iflag.h bits/termios-c_oflag.h \
- bits/termios-baud.h
+ bits/termios-baud.h bits/termios-c_cflag.h
tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios-c_cflag.h b/sysdeps/unix/sysv/linux/alpha/bits/termios-c_cflag.h
new file mode 100644
index 0000000..8f97063
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios-c_cflag.h
@@ -0,0 +1,35 @@
+/* termios control mode definitions. Linux/alpha version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_cflag.h> directly; use <termios.h> instead."
+#endif
+
+#define CSIZE 00001400
+#define CS5 00000000
+#define CS6 00000400
+#define CS7 00001000
+#define CS8 00001400
+
+#define CSTOPB 00002000
+#define CREAD 00004000
+#define PARENB 00010000
+#define PARODD 00020000
+#define HUPCL 00040000
+
+#define CLOCAL 00100000
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index 69a436b..59cb224 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -52,19 +52,7 @@ typedef unsigned int tcflag_t;
#endif
#include <bits/termios-baud.h>
-#define CSIZE 00001400
-#define CS5 00000000
-#define CS6 00000400
-#define CS7 00001000
-#define CS8 00001400
-
-#define CSTOPB 00002000
-#define CREAD 00004000
-#define PARENB 00010000
-#define PARODD 00020000
-#define HUPCL 00040000
-
-#define CLOCAL 00100000
+#include <bits/termios-c_cflag.h>
/* c_lflag bits */
#define ISIG 0x00000080
diff --git a/sysdeps/unix/sysv/linux/bits/termios-c_cflag.h b/sysdeps/unix/sysv/linux/bits/termios-c_cflag.h
new file mode 100644
index 0000000..1da79b7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/bits/termios-c_cflag.h
@@ -0,0 +1,34 @@
+/* termios control mode definitions. Linux/generic version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_cflag.h> directly; use <termios.h> instead."
+#endif
+
+/* c_cflag bits. */
+#define CSIZE 0000060
+#define CS5 0000000
+#define CS6 0000020
+#define CS7 0000040
+#define CS8 0000060
+#define CSTOPB 0000100
+#define CREAD 0000200
+#define PARENB 0000400
+#define PARODD 0001000
+#define HUPCL 0002000
+#define CLOCAL 0004000
diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h
index 2267418..0ec195d 100644
--- a/sysdeps/unix/sysv/linux/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/bits/termios.h
@@ -52,17 +52,7 @@ typedef unsigned int tcflag_t;
#endif
#include <bits/termios-baud.h>
-#define CSIZE 0000060
-#define CS5 0000000
-#define CS6 0000020
-#define CS7 0000040
-#define CS8 0000060
-#define CSTOPB 0000100
-#define CREAD 0000200
-#define PARENB 0000400
-#define PARODD 0001000
-#define HUPCL 0002000
-#define CLOCAL 0004000
+#include <bits/termios-c_cflag.h>
/* c_lflag bits */
#define ISIG 0000001
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index ac316ba..443283f 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -52,17 +52,7 @@ typedef unsigned int tcflag_t;
#endif
#include <bits/termios-baud.h>
-#define CSIZE 0000060 /* Number of bits per byte (mask). */
-#define CS5 0000000 /* 5 bits per byte. */
-#define CS6 0000020 /* 6 bits per byte. */
-#define CS7 0000040 /* 7 bits per byte. */
-#define CS8 0000060 /* 8 bits per byte. */
-#define CSTOPB 0000100 /* Two stop bits instead of one. */
-#define CREAD 0000200 /* Enable receiver. */
-#define PARENB 0000400 /* Parity enable. */
-#define PARODD 0001000 /* Odd parity instead of even. */
-#define HUPCL 0002000 /* Hang up on last close. */
-#define CLOCAL 0004000 /* Ignore modem status lines. */
+#include <bits/termios-c_cflag.h>
/* c_lflag bits */
#define ISIG 0000001 /* Enable signals. */
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cflag.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cflag.h
new file mode 100644
index 0000000..5742359
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cflag.h
@@ -0,0 +1,35 @@
+/* termios control mode definitions. Linux/powerpc version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_cflag.h> directly; use <termios.h> instead."
+#endif
+
+#define CSIZE 00001400
+#define CS5 00000000
+#define CS6 00000400
+#define CS7 00001000
+#define CS8 00001400
+
+#define CSTOPB 00002000
+#define CREAD 00004000
+#define PARENB 00010000
+#define PARODD 00020000
+#define HUPCL 00040000
+
+#define CLOCAL 00100000
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
index e35de92..8b6cbf5 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
@@ -51,19 +51,7 @@ typedef unsigned int tcflag_t;
#endif
#include <bits/termios-baud.h>
-#define CSIZE 00001400
-#define CS5 00000000
-#define CS6 00000400
-#define CS7 00001000
-#define CS8 00001400
-
-#define CSTOPB 00002000
-#define CREAD 00004000
-#define PARENB 00010000
-#define PARODD 00020000
-#define HUPCL 00040000
-
-#define CLOCAL 00100000
+#include <bits/termios-c_cflag.h>
/* c_lflag bits */
#define ISIG 0x00000080
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
index 38128e7..32d9424 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
@@ -52,17 +52,7 @@ typedef unsigned int tcflag_t;
#endif
#include <bits/termios-baud.h>
-#define CSIZE 0x00000030
-#define CS5 0x00000000
-#define CS6 0x00000010
-#define CS7 0x00000020
-#define CS8 0x00000030
-#define CSTOPB 0x00000040
-#define CREAD 0x00000080
-#define PARENB 0x00000100
-#define PARODD 0x00000200
-#define HUPCL 0x00000400
-#define CLOCAL 0x00000800
+#include <bits/termios-c_cflag.h>
/* c_lflag bits */
#define ISIG 0x00000001
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9c5d0d02c1122d10c2407333eeecd1ee2285084b
commit 9c5d0d02c1122d10c2407333eeecd1ee2285084b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Oct 9 14:35:03 2018 -0300
termios: Consolidate Baud Rate Selection definitions (BZ#23783)
This patch consolidates the termios symbolic constants used for baud rates
selection used along with speed_t 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).
No semantic change is expected, checked on a build against x86_64-linux-gnu,
alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu.
[BZ #23783]
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
termios-baud.h.
* sysdeps/unix/sysv/linux/bits/termios-baud.h: New file.
* sysdeps/unix/sysv/linux/alpha/bits/termios-baud.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios-baud.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios-baud.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h (B57600, B115200,
B230400, B460800, B500000, B576000, B921600, B1000000, B1152000,
B1500000, B2000000, B2500000, B3000000, B3500000, B4000000,
__MAX_BAUD): Move to termios-baud.h.
[__USE_MISC] (CBAUD, CBAUDEX): Likewise.
* sysdeps/unix/sysv/linux/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
diff --git a/ChangeLog b/ChangeLog
index 9edf6ca..a3a5495 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
2019-01-03 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ [BZ #23783]
+ * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
+ termios-baud.h.
+ * sysdeps/unix/sysv/linux/bits/termios-baud.h: New file.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios-baud.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios-baud.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/termios-baud.h: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios.h (B57600, B115200,
+ B230400, B460800, B500000, B576000, B921600, B1000000, B1152000,
+ B1500000, B2000000, B2500000, B3000000, B3500000, B4000000,
+ __MAX_BAUD): Move to termios-baud.h.
+ [__USE_MISC] (CBAUD, CBAUDEX): Likewise.
+ * sysdeps/unix/sysv/linux/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
+
* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
termios-c_oflag.h.
* sysdeps/unix/sysv/linux/bits/termios-c_oflag.h: New file.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 686b3e2..e1ddbf9 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -45,7 +45,8 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
bits/procfs-prregset.h bits/mman-map-flags-generic.h \
bits/msq-pad.h bits/sem-pad.h bits/shmlba.h bits/shm-pad.h \
bits/termios-struct.h bits/termios-c_cc.h \
- bits/termios-c_iflag.h bits/termios-c_oflag.h
+ bits/termios-c_iflag.h bits/termios-c_oflag.h \
+ bits/termios-baud.h
tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios-baud.h b/sysdeps/unix/sysv/linux/alpha/bits/termios-baud.h
new file mode 100644
index 0000000..24efd3d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios-baud.h
@@ -0,0 +1,46 @@
+/* termios baud rate selection definitions. Linux/alpha version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
+#endif
+
+#ifdef __USE_MISC
+# define CBAUD 0000037
+# define CBAUDEX 0000000
+# define CMSPAR 010000000000 /* mark or space (stick) parity */
+# define CRTSCTS 020000000000 /* flow control */
+#endif
+
+#define B57600 00020
+#define B115200 00021
+#define B230400 00022
+#define B460800 00023
+#define B500000 00024
+#define B576000 00025
+#define B921600 00026
+#define B1000000 00027
+#define B1152000 00030
+#define B1500000 00031
+#define B2000000 00032
+#define B2500000 00033
+#define B3000000 00034
+#define B3500000 00035
+#define B4000000 00036
+
+#define __MAX_BAUD B4000000
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index 9f39f75..69a436b 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -30,9 +30,6 @@ typedef unsigned int tcflag_t;
#include <bits/termios-c_oflag.h>
/* c_cflag bit meaning */
-#ifdef __USE_MISC
-# define CBAUD 0000037
-#endif
#define B0 0000000 /* hang up */
#define B50 0000001
#define B75 0000002
@@ -52,25 +49,8 @@ typedef unsigned int tcflag_t;
#ifdef __USE_MISC
# define EXTA B19200
# define EXTB B38400
-# define CBAUDEX 0000000
#endif
-#define B57600 00020
-#define B115200 00021
-#define B230400 00022
-#define B460800 00023
-#define B500000 00024
-#define B576000 00025
-#define B921600 00026
-#define B1000000 00027
-#define B1152000 00030
-#define B1500000 00031
-#define B2000000 00032
-#define B2500000 00033
-#define B3000000 00034
-#define B3500000 00035
-#define B4000000 00036
-
-#define __MAX_BAUD B4000000
+#include <bits/termios-baud.h>
#define CSIZE 00001400
#define CS5 00000000
@@ -85,10 +65,6 @@ typedef unsigned int tcflag_t;
#define HUPCL 00040000
#define CLOCAL 00100000
-#ifdef __USE_MISC
-# define CMSPAR 010000000000 /* mark or space (stick) parity */
-# define CRTSCTS 020000000000 /* flow control */
-#endif
/* c_lflag bits */
#define ISIG 0x00000080
diff --git a/sysdeps/unix/sysv/linux/bits/termios-baud.h b/sysdeps/unix/sysv/linux/bits/termios-baud.h
new file mode 100644
index 0000000..7258d67
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/bits/termios-baud.h
@@ -0,0 +1,48 @@
+/* termios baud rate selection definitions. Linux/generic version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
+#endif
+
+#ifdef __USE_MISC
+# define CBAUD 000000010017 /* Baud speed mask (not in POSIX). */
+# define CBAUDEX 000000010000 /* Extra baud speed mask, included in CBAUD.
+ (not in POSIX). */
+# define CIBAUD 002003600000 /* Input baud rate (not used). */
+# define CMSPAR 010000000000 /* Mark or space (stick) parity. */
+# define CRTSCTS 020000000000 /* Flow control. */
+#endif
+
+/* Extra output baud rates (not in POSIX). */
+#define B57600 0010001
+#define B115200 0010002
+#define B230400 0010003
+#define B460800 0010004
+#define B500000 0010005
+#define B576000 0010006
+#define B921600 0010007
+#define B1000000 0010010
+#define B1152000 0010011
+#define B1500000 0010012
+#define B2000000 0010013
+#define B2500000 0010014
+#define B3000000 0010015
+#define B3500000 0010016
+#define B4000000 0010017
+#define __MAX_BAUD B4000000
diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h
index d8af5f4..2267418 100644
--- a/sysdeps/unix/sysv/linux/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/bits/termios.h
@@ -30,9 +30,6 @@ typedef unsigned int tcflag_t;
#include <bits/termios-c_oflag.h>
/* c_cflag bit meaning */
-#ifdef __USE_MISC
-# define CBAUD 0010017
-#endif
#define B0 0000000 /* hang up */
#define B50 0000001
#define B75 0000002
@@ -53,6 +50,8 @@ typedef unsigned int tcflag_t;
# define EXTA B19200
# define EXTB B38400
#endif
+#include <bits/termios-baud.h>
+
#define CSIZE 0000060
#define CS5 0000000
#define CS6 0000020
@@ -64,30 +63,6 @@ typedef unsigned int tcflag_t;
#define PARODD 0001000
#define HUPCL 0002000
#define CLOCAL 0004000
-#ifdef __USE_MISC
-# define CBAUDEX 0010000
-#endif
-#define B57600 0010001
-#define B115200 0010002
-#define B230400 0010003
-#define B460800 0010004
-#define B500000 0010005
-#define B576000 0010006
-#define B921600 0010007
-#define B1000000 0010010
-#define B1152000 0010011
-#define B1500000 0010012
-#define B2000000 0010013
-#define B2500000 0010014
-#define B3000000 0010015
-#define B3500000 0010016
-#define B4000000 0010017
-#define __MAX_BAUD B4000000
-#ifdef __USE_MISC
-# define CIBAUD 002003600000 /* input baud rate (not used) */
-# define CMSPAR 010000000000 /* mark or space (stick) parity */
-# define CRTSCTS 020000000000 /* flow control */
-#endif
/* c_lflag bits */
#define ISIG 0000001
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index cb01929..ac316ba 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -30,9 +30,6 @@ typedef unsigned int tcflag_t;
#include <bits/termios-c_oflag.h>
/* c_cflag bit meaning */
-#ifdef __USE_MISC
-# define CBAUD 0010017
-#endif
#define B0 0000000 /* hang up */
#define B50 0000001
#define B75 0000002
@@ -53,6 +50,8 @@ typedef unsigned int tcflag_t;
# define EXTA B19200
# define EXTB B38400
#endif
+#include <bits/termios-baud.h>
+
#define CSIZE 0000060 /* Number of bits per byte (mask). */
#define CS5 0000000 /* 5 bits per byte. */
#define CS6 0000020 /* 6 bits per byte. */
@@ -64,29 +63,6 @@ typedef unsigned int tcflag_t;
#define PARODD 0001000 /* Odd parity instead of even. */
#define HUPCL 0002000 /* Hang up on last close. */
#define CLOCAL 0004000 /* Ignore modem status lines. */
-#ifdef __USE_MISC
-# define CBAUDEX 0010000
-#endif
-#define B57600 0010001
-#define B115200 0010002
-#define B230400 0010003
-#define B460800 0010004
-#define B500000 0010005
-#define B576000 0010006
-#define B921600 0010007
-#define B1000000 0010010
-#define B1152000 0010011
-#define B1500000 0010012
-#define B2000000 0010013
-#define B2500000 0010014
-#define B3000000 0010015
-#define B3500000 0010016
-#define B4000000 0010017
-#define __MAX_BAUD B4000000
-#ifdef __USE_MISC
-# define CIBAUD 002003600000 /* input baud rate (not used) */
-# define CRTSCTS 020000000000 /* flow control */
-#endif
/* c_lflag bits */
#define ISIG 0000001 /* Enable signals. */
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-baud.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-baud.h
new file mode 100644
index 0000000..fc16e63
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-baud.h
@@ -0,0 +1,45 @@
+/* termios baud rate selection definitions. Linux/powerpc version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
+#endif
+
+#ifdef __USE_MISC
+# define CBAUD 0000377
+# define CBAUDEX 0000020
+# define CMSPAR 010000000000 /* mark or space (stick) parity */
+# define CRTSCTS 020000000000 /* flow control */
+#endif
+
+#define B57600 00020
+#define B115200 00021
+#define B230400 00022
+#define B460800 00023
+#define B500000 00024
+#define B576000 00025
+#define B921600 00026
+#define B1000000 00027
+#define B1152000 00030
+#define B1500000 00031
+#define B2000000 00032
+#define B2500000 00033
+#define B3000000 00034
+#define B3500000 00035
+#define B4000000 00036
+#define __MAX_BAUD B4000000
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
index d89fad8..e35de92 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
@@ -29,9 +29,6 @@ typedef unsigned int tcflag_t;
#include <bits/termios-c_oflag.h>
/* c_cflag bit meaning */
-#ifdef __USE_MISC
-# define CBAUD 0000377
-#endif
#define B0 0000000 /* hang up */
#define B50 0000001
#define B75 0000002
@@ -51,24 +48,8 @@ typedef unsigned int tcflag_t;
#ifdef __USE_MISC
# define EXTA B19200
# define EXTB B38400
-# define CBAUDEX 0000020
#endif
-#define B57600 00020
-#define B115200 00021
-#define B230400 00022
-#define B460800 00023
-#define B500000 00024
-#define B576000 00025
-#define B921600 00026
-#define B1000000 00027
-#define B1152000 00030
-#define B1500000 00031
-#define B2000000 00032
-#define B2500000 00033
-#define B3000000 00034
-#define B3500000 00035
-#define B4000000 00036
-#define __MAX_BAUD B4000000
+#include <bits/termios-baud.h>
#define CSIZE 00001400
#define CS5 00000000
@@ -83,10 +64,6 @@ typedef unsigned int tcflag_t;
#define HUPCL 00040000
#define CLOCAL 00100000
-#ifdef __USE_MISC
-# define CMSPAR 010000000000 /* mark or space (stick) parity */
-# define CRTSCTS 020000000000 /* flow control */
-#endif
/* c_lflag bits */
#define ISIG 0x00000080
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios-baud.h b/sysdeps/unix/sysv/linux/sparc/bits/termios-baud.h
new file mode 100644
index 0000000..3803e12
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/bits/termios-baud.h
@@ -0,0 +1,46 @@
+/* termios baud rate selection definitions. Linux/sparc version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
+#endif
+
+#ifdef __USE_MISC
+# define CBAUD 0x0000100f
+# define CBAUDEX 0x00001000
+# define CIBAUD 0x100f0000 /* input baud rate (not used) */
+# define CMSPAR 0x40000000 /* mark or space (stick) parity */
+# define CRTSCTS 0x80000000 /* flow control */
+#endif
+
+#define B57600 0x00001001
+#define B115200 0x00001002
+#define B230400 0x00001003
+#define B460800 0x00001004
+#define B76800 0x00001005
+#define B153600 0x00001006
+#define B307200 0x00001007
+#define B614400 0x00001008
+#define B921600 0x00001009
+#define B500000 0x0000100a
+#define B576000 0x0000100b
+#define B1000000 0x0000100c
+#define B1152000 0x0000100d
+#define B1500000 0x0000100e
+#define B2000000 0x0000100f
+#define __MAX_BAUD B2000000
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
index df278b6..38128e7 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
@@ -30,9 +30,6 @@ typedef unsigned int tcflag_t;
#include <bits/termios-c_oflag.h>
/* c_cflag bit meaning */
-#ifdef __USE_MISC
-# define CBAUD 0x0000100f
-#endif
#define B0 0x00000000 /* hang up */
#define B50 0x00000001
#define B75 0x00000002
@@ -53,6 +50,8 @@ typedef unsigned int tcflag_t;
# define EXTA B19200
# define EXTB B38400
#endif
+#include <bits/termios-baud.h>
+
#define CSIZE 0x00000030
#define CS5 0x00000000
#define CS6 0x00000010
@@ -64,31 +63,6 @@ typedef unsigned int tcflag_t;
#define PARODD 0x00000200
#define HUPCL 0x00000400
#define CLOCAL 0x00000800
-#ifdef __USE_MISC
-# define CBAUDEX 0x00001000
-#endif
-#define B57600 0x00001001
-#define B115200 0x00001002
-#define B230400 0x00001003
-#define B460800 0x00001004
-#define B76800 0x00001005
-#define B153600 0x00001006
-#define B307200 0x00001007
-#define B614400 0x00001008
-#define B921600 0x00001009
-#define B500000 0x0000100a
-#define B576000 0x0000100b
-#define B1000000 0x0000100c
-#define B1152000 0x0000100d
-#define B1500000 0x0000100e
-#define B2000000 0x0000100f
-#define __MAX_BAUD B2000000
-
-#ifdef __USE_MISC
-# define CIBAUD 0x100f0000 /* input baud rate (not used) */
-# define CMSPAR 0x40000000 /* mark or space (stick) parity */
-# define CRTSCTS 0x80000000 /* flow control */
-#endif
/* c_lflag bits */
#define ISIG 0x00000001
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7b832018881cbc860c70b7a768dae9cfb7b55663
commit 7b832018881cbc860c70b7a768dae9cfb7b55663
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Oct 9 11:56:06 2018 -0300
termios: Consolidate Output Modes definitions
This patch consolidates the termios symbolic constants used for ouput
modes with c_oflag 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, powerpc, and sparc).
No semantic change is expected, checked on a build against x86_64-linux-gnu,
alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu.
* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
termios-c_oflag.h.
* sysdeps/unix/sysv/linux/bits/termios-c_oflag.h: New file.
* sysdeps/unix/sysv/linux/alpha/bits/termios-c_oflag.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios-c_oflag.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios-c_oflag.h: Likewise.
* sysdeps/unix/sysv/linux/bits/termios.h (OPOST, OLCUC, ONLCR, OCRNL,
ONOCR, ONLRET, OFILL, OFDEL, VTDLY, VT0, VT1): Move to
termios-c_oflag.h.
[__USE_MISC || __USE_XOPEN] (NLDLY, NL0, NL1, CRDLY, CR0, CR1, CR2,
CR3, TABDLY, TAB0, TAB1, TAB2, TAB3, BSDLY, BS0, BS1, FFDLY, FF0,
FFR1): Likewise.
[USE_MISC] (XTABS): Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios.h Likewise.
diff --git a/ChangeLog b/ChangeLog
index 5b5bca4..9edf6ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
2019-01-03 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
+ termios-c_oflag.h.
+ * sysdeps/unix/sysv/linux/bits/termios-c_oflag.h: New file.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios-c_oflag.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios-c_oflag.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/termios-c_oflag.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/termios.h (OPOST, OLCUC, ONLCR, OCRNL,
+ ONOCR, ONLRET, OFILL, OFDEL, VTDLY, VT0, VT1): Move to
+ termios-c_oflag.h.
+ [__USE_MISC || __USE_XOPEN] (NLDLY, NL0, NL1, CRDLY, CR0, CR1, CR2,
+ CR3, TABDLY, TAB0, TAB1, TAB2, TAB3, BSDLY, BS0, BS1, FFDLY, FF0,
+ FFR1): Likewise.
+ [USE_MISC] (XTABS): Likewise.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/termios.h Likewise.
+
* sysdeps/unix/sysv/linux/Makefile (sysdeps_headers): Add
termios-c_iflag.h.
* sysdeps/unix/sysv/linux/bits/termios-c_iflag.h: New file.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 242eef1..686b3e2 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -45,7 +45,7 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
bits/procfs-prregset.h bits/mman-map-flags-generic.h \
bits/msq-pad.h bits/sem-pad.h bits/shmlba.h bits/shm-pad.h \
bits/termios-struct.h bits/termios-c_cc.h \
- bits/termios-c_iflag.h
+ bits/termios-c_iflag.h bits/termios-c_oflag.h
tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios-c_oflag.h b/sysdeps/unix/sysv/linux/alpha/bits/termios-c_oflag.h
new file mode 100644
index 0000000..8961792
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios-c_oflag.h
@@ -0,0 +1,66 @@
+/* termios output mode definitions. Linux/alpha version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead."
+#endif
+
+/* c_oflag bits */
+#define OPOST 0000001
+#define ONLCR 0000002
+#define OLCUC 0000004
+
+#define OCRNL 0000010
+#define ONOCR 0000020
+#define ONLRET 0000040
+
+#define OFILL 00000100
+#define OFDEL 00000200
+#if defined __USE_MISC || defined __USE_XOPEN
+# define NLDLY 00001400
+# define NL0 00000000
+# define NL1 00000400
+# if defined __USE_MISC
+# define NL2 00001000
+# define NL3 00001400
+# endif
+# define TABDLY 00006000
+# define TAB0 00000000
+# define TAB1 00002000
+# define TAB2 00004000
+# define TAB3 00006000
+# define CRDLY 00030000
+# define CR0 00000000
+# define CR1 00010000
+# define CR2 00020000
+# define CR3 00030000
+# define FFDLY 00040000
+# define FF0 00000000
+# define FF1 00040000
+# define BSDLY 00100000
+# define BS0 00000000
+# define BS1 00100000
+#endif
+
+#define VTDLY 00200000
+#define VT0 00000000
+#define VT1 00200000
+
+#ifdef __USE_MISC
+# define XTABS TAB3
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index a48a4b4..9f39f75 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -27,51 +27,7 @@ typedef unsigned int tcflag_t;
#include <bits/termios-struct.h>
#include <bits/termios-c_cc.h>
#include <bits/termios-c_iflag.h>
-
-/* c_oflag bits */
-#define OPOST 0000001
-#define ONLCR 0000002
-#define OLCUC 0000004
-
-#define OCRNL 0000010
-#define ONOCR 0000020
-#define ONLRET 0000040
-
-#define OFILL 00000100
-#define OFDEL 00000200
-#if defined __USE_MISC || defined __USE_XOPEN
-# define NLDLY 00001400
-# define NL0 00000000
-# define NL1 00000400
-# if defined __USE_MISC
-# define NL2 00001000
-# define NL3 00001400
-# endif
-# define TABDLY 00006000
-# define TAB0 00000000
-# define TAB1 00002000
-# define TAB2 00004000
-# define TAB3 00006000
-# define CRDLY 00030000
-# define CR0 00000000
-# define CR1 00010000
-# define CR2 00020000
-# define CR3 00030000
-# define FFDLY 00040000
-# define FF0 00000000
-# define FF1 00040000
-# define BSDLY 00100000
-# define BS0 00000000
-# define BS1 00100000
-#endif
-
-#define VTDLY 00200000
-#define VT0 00000000
-#define VT1 00200000
-
-#ifdef __USE_MISC
-# define XTABS TAB3
-#endif
+#include <bits/termios-c_oflag.h>
/* c_cflag bit meaning */
#ifdef __USE_MISC
diff --git a/sysdeps/unix/sysv/linux/bits/termios-c_oflag.h b/sysdeps/unix/sysv/linux/bits/termios-c_oflag.h
new file mode 100644
index 0000000..0b90f81
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/bits/termios-c_oflag.h
@@ -0,0 +1,61 @@
+/* termios output mode definitions. Linux/generic version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead."
+#endif
+
+/* c_oflag bits */
+#define OPOST 0000001 /* Post-process output. */
+#define OLCUC 0000002 /* Map lowercase characters to uppercase on output.
+ (not in POSIX). */
+#define ONLCR 0000004 /* Map NL to CR-NL on output. */
+#define OCRNL 0000010 /* Map CR to NL on output. */
+#define ONOCR 0000020 /* No CR output at column 0. */
+#define ONLRET 0000040 /* NL performs CR function. */
+#define OFILL 0000100 /* Use fill characters for delay. */
+#define OFDEL 0000200 /* Fill is DEL. */
+#if defined __USE_MISC || defined __USE_XOPEN
+# define NLDLY 0000400 /* Select newline delays: */
+# define NL0 0000000 /* Newline type 0. */
+# define NL1 0000400 /* Newline type 1. */
+# define CRDLY 0003000 /* Select carriage-return delays: */
+# define CR0 0000000 /* Carriage-return delay type 0. */
+# define CR1 0001000 /* Carriage-return delay type 1. */
+# define CR2 0002000 /* Carriage-return delay type 2. */
+# define CR3 0003000 /* Carriage-return delay type 3. */
+# define TABDLY 0014000 /* Select horizontal-tab delays: */
+# define TAB0 0000000 /* Horizontal-tab delay type 0. */
+# define TAB1 0004000 /* Horizontal-tab delay type 1. */
+# define TAB2 0010000 /* Horizontal-tab delay type 2. */
+# define TAB3 0014000 /* Expand tabs to spaces. */
+# define BSDLY 0020000 /* Select backspace delays: */
+# define BS0 0000000 /* Backspace-delay type 0. */
+# define BS1 0020000 /* Backspace-delay type 1. */
+# define FFDLY 0100000 /* Select form-feed delays: */
+# define FF0 0000000 /* Form-feed delay type 0. */
+# define FF1 0100000 /* Form-feed delay type 1. */
+#endif
+
+#define VTDLY 0040000 /* Select vertical-tab delays: */
+#define VT0 0000000 /* Vertical-tab delay type 0. */
+#define VT1 0040000 /* Vertical-tab delay type 1. */
+
+#ifdef __USE_MISC
+# define XTABS 0014000
+#endif
diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h
index c4e8fed..d8af5f4 100644
--- a/sysdeps/unix/sysv/linux/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/bits/termios.h
@@ -27,45 +27,7 @@ typedef unsigned int tcflag_t;
#include <bits/termios-struct.h>
#include <bits/termios-c_cc.h>
#include <bits/termios-c_iflag.h>
-
-/* c_oflag bits */
-#define OPOST 0000001
-#define OLCUC 0000002
-#define ONLCR 0000004
-#define OCRNL 0000010
-#define ONOCR 0000020
-#define ONLRET 0000040
-#define OFILL 0000100
-#define OFDEL 0000200
-#if defined __USE_MISC || defined __USE_XOPEN
-# define NLDLY 0000400
-# define NL0 0000000
-# define NL1 0000400
-# define CRDLY 0003000
-# define CR0 0000000
-# define CR1 0001000
-# define CR2 0002000
-# define CR3 0003000
-# define TABDLY 0014000
-# define TAB0 0000000
-# define TAB1 0004000
-# define TAB2 0010000
-# define TAB3 0014000
-# define BSDLY 0020000
-# define BS0 0000000
-# define BS1 0020000
-# define FFDLY 0100000
-# define FF0 0000000
-# define FF1 0100000
-#endif
-
-#define VTDLY 0040000
-#define VT0 0000000
-#define VT1 0040000
-
-#ifdef __USE_MISC
-# define XTABS 0014000
-#endif
+#include <bits/termios-c_oflag.h>
/* c_cflag bit meaning */
#ifdef __USE_MISC
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index 5ee7a76..cb01929 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -27,45 +27,7 @@ typedef unsigned int tcflag_t;
#include <bits/termios-struct.h>
#include <bits/termios-c_cc.h>
#include <bits/termios-c_iflag.h>
-
-/* c_oflag bits */
-#define OPOST 0000001 /* Perform output processing. */
-#define OLCUC 0000002 /* Map lower case to upper case on output. */
-#define ONLCR 0000004 /* Map NL to CR-NL on output. */
-#define OCRNL 0000010
-#define ONOCR 0000020
-#define ONLRET 0000040
-#define OFILL 0000100
-#define OFDEL 0000200
-#if defined __USE_MISC || defined __USE_XOPEN
-# define NLDLY 0000400
-# define NL0 0000000
-# define NL1 0000400
-# define CRDLY 0003000
-# define CR0 0000000
-# define CR1 0001000
-# define CR2 0002000
-# define CR3 0003000
-# define TABDLY 0014000
-# define TAB0 0000000
-# define TAB1 0004000
-# define TAB2 0010000
-# define TAB3 0014000
-# define BSDLY 0020000
-# define BS0 0000000
-# define BS1 0020000
-# define FFDLY 0100000
-# define FF0 0000000
-# define FF1 0100000
-#endif
-
-#define VTDLY 0040000
-#define VT0 0000000
-#define VT1 0040000
-
-#ifdef __USE_MISC
-# define XTABS 0014000
-#endif
+#include <bits/termios-c_oflag.h>
/* c_cflag bit meaning */
#ifdef __USE_MISC
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_oflag.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_oflag.h
new file mode 100644
index 0000000..5f479d2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_oflag.h
@@ -0,0 +1,65 @@
+/* termios output mode definitions. Linux/powerpc version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead."
+#endif
+
+/* c_oflag bits */
+#define OPOST 0000001
+#define ONLCR 0000002
+#define OLCUC 0000004
+
+#define OCRNL 0000010
+#define ONOCR 0000020
+#define ONLRET 0000040
+
+#define OFILL 00000100
+#define OFDEL 00000200
+#if defined __USE_MISC || defined __USE_XOPEN
+# define NLDLY 00001400
+# define NL0 00000000
+# define NL1 00000400
+# if defined __USE_MISC
+# define NL2 00001000
+# define NL3 00001400
+# endif
+# define TABDLY 00006000
+# define TAB0 00000000
+# define TAB1 00002000
+# define TAB2 00004000
+# define TAB3 00006000
+# define CRDLY 00030000
+# define CR0 00000000
+# define CR1 00010000
+# define CR2 00020000
+# define CR3 00030000
+# define FFDLY 00040000
+# define FF0 00000000
+# define FF1 00040000
+# define BSDLY 00100000
+# define BS0 00000000
+# define BS1 00100000
+#endif
+#define VTDLY 00200000
+#define VT0 00000000
+#define VT1 00200000
+
+#ifdef __USE_MISC
+# define XTABS 00006000
+#endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
index c7aac19..d89fad8 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
@@ -26,50 +26,7 @@ typedef unsigned int tcflag_t;
#include <bits/termios-struct.h>
#include <bits/termios-c_cc.h>
#include <bits/termios-c_iflag.h>
-
-/* c_oflag bits */
-#define OPOST 0000001
-#define ONLCR 0000002
-#define OLCUC 0000004
-
-#define OCRNL 0000010
-#define ONOCR 0000020
-#define ONLRET 0000040
-
-#define OFILL 00000100
-#define OFDEL 00000200
-#if defined __USE_MISC || defined __USE_XOPEN
-# define NLDLY 00001400
-# define NL0 00000000
-# define NL1 00000400
-# if defined __USE_MISC
-# define NL2 00001000
-# define NL3 00001400
-# endif
-# define TABDLY 00006000
-# define TAB0 00000000
-# define TAB1 00002000
-# define TAB2 00004000
-# define TAB3 00006000
-# define CRDLY 00030000
-# define CR0 00000000
-# define CR1 00010000
-# define CR2 00020000
-# define CR3 00030000
-# define FFDLY 00040000
-# define FF0 00000000
-# define FF1 00040000
-# define BSDLY 00100000
-# define BS0 00000000
-# define BS1 00100000
-#endif
-#define VTDLY 00200000
-#define VT0 00000000
-#define VT1 00200000
-
-#ifdef __USE_MISC
-# define XTABS 00006000
-#endif
+#include <bits/termios-c_oflag.h>
/* c_cflag bit meaning */
#ifdef __USE_MISC
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios-c_oflag.h b/sysdeps/unix/sysv/linux/sparc/bits/termios-c_oflag.h
new file mode 100644
index 0000000..fa7bf66
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/bits/termios-c_oflag.h
@@ -0,0 +1,64 @@
+/* termios output mode definitions. Linux/sparc version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead."
+#endif
+
+/* c_oflag bits */
+#define OPOST 0x00000001
+#define OLCUC 0x00000002
+#define ONLCR 0x00000004
+#define OCRNL 0x00000008
+#define ONOCR 0x00000010
+#define ONLRET 0x00000020
+#define OFILL 0x00000040
+#define OFDEL 0x00000080
+#if defined __USE_MISC || defined __USE_XOPEN
+# define NLDLY 0x00000100
+# define NL0 0x00000000
+# define NL1 0x00000100
+# define CRDLY 0x00000600
+# define CR0 0x00000000
+# define CR1 0x00000200
+# define CR2 0x00000400
+# define CR3 0x00000600
+# define TABDLY 0x00001800
+# define TAB0 0x00000000
+# define TAB1 0x00000800
+# define TAB2 0x00001000
+# define TAB3 0x00001800
+# define BSDLY 0x00002000
+# define BS0 0x00000000
+# define BS1 0x00002000
+#define FFDLY 0x00008000
+#define FF0 0x00000000
+#define FF1 0x00008000
+#endif
+#define VTDLY 0x00004000
+#define VT0 0x00000000
+#define VT1 0x00004000
+
+# if defined __USE_GNU
+#define PAGEOUT 0x00010000 /* SUNOS specific */
+#define WRAP 0x00020000 /* SUNOS specific */
+# endif
+
+#ifdef __USE_MISC
+# define XTABS 0x00001800
+#endif
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
index d76e318..df278b6 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
@@ -27,49 +27,7 @@ typedef unsigned int tcflag_t;
#include <bits/termios-struct.h>
#include <bits/termios-c_cc.h>
#include <bits/termios-c_iflag.h>
-
-/* c_oflag bits */
-#define OPOST 0x00000001
-#define OLCUC 0x00000002
-#define ONLCR 0x00000004
-#define OCRNL 0x00000008
-#define ONOCR 0x00000010
-#define ONLRET 0x00000020
-#define OFILL 0x00000040
-#define OFDEL 0x00000080
-#if defined __USE_MISC || defined __USE_XOPEN
-# define NLDLY 0x00000100
-# define NL0 0x00000000
-# define NL1 0x00000100
-# define CRDLY 0x00000600
-# define CR0 0x00000000
-# define CR1 0x00000200
-# define CR2 0x00000400
-# define CR3 0x00000600
-# define TABDLY 0x00001800
-# define TAB0 0x00000000
-# define TAB1 0x00000800
-# define TAB2 0x00001000
-# define TAB3 0x00001800
-# define BSDLY 0x00002000
-# define BS0 0x00000000
-# define BS1 0x00002000
-#define FFDLY 0x00008000
-#define FF0 0x00000000
-#define FF1 0x00008000
-#endif
-#define VTDLY 0x00004000
-#define VT0 0x00000000
-#define VT1 0x00004000
-
-# if defined __USE_GNU
-#define PAGEOUT 0x00010000 /* SUNOS specific */
-#define WRAP 0x00020000 /* SUNOS specific */
-# endif
-
-#ifdef __USE_MISC
-# define XTABS 0x00001800
-#endif
+#include <bits/termios-c_oflag.h>
/* c_cflag bit meaning */
#ifdef __USE_MISC
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3127003e756f3202462a11d8e5bd2b994b056c91
commit 3127003e756f3202462a11d8e5bd2b994b056c91
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Oct 9 11:02:40 2018 -0300
termios: Consolidate Input Modes definitions.
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).
No semantic change is expected, checked on a build against x86_64-linux-gnu,
alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu.
* sysdeps/unix/sysv/linux/Makefile (sysdeps_headers): Add
termios-c_iflag.h.
* sysdeps/unix/sysv/linux/bits/termios-c_iflag.h: New file.
* sysdeps/unix/sysv/linux/alpha/bits/termios-c_iflag.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios-c_iflag.h: Likewise.
* sysdeps/unix/sysv/linux/bits/termios.h (IGNBRK, BRKINT, IGNPAR, PARMRK,
INPCK, ISTRIP, INLCR, IGNCR, ICRNL, IXON, IXOFF, IXANY, IUCLC, IMAXBEL,
IUTF8): Move to termios-c_iflag.h.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
diff --git a/ChangeLog b/ChangeLog
index cb28b1c..5b5bca4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,19 @@
2019-01-03 Adhemerval Zanella <adhemerval.zanella@linaro.org>
* sysdeps/unix/sysv/linux/Makefile (sysdeps_headers): Add
+ termios-c_iflag.h.
+ * sysdeps/unix/sysv/linux/bits/termios-c_iflag.h: New file.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios-c_iflag.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios-c_iflag.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/termios.h (IGNBRK, BRKINT, IGNPAR, PARMRK,
+ INPCK, ISTRIP, INLCR, IGNCR, ICRNL, IXON, IXOFF, IXANY, IUCLC, IMAXBEL,
+ IUTF8): Move to termios-c_iflag.h.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
+
+ * sysdeps/unix/sysv/linux/Makefile (sysdeps_headers): Add
termios-cc.h.
* sysdeps/unix/sysv/linux/bits/termios-c_cc.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/termios-c_cc.h: New file.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 4ef1e03..242eef1 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -44,7 +44,8 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
bits/procfs.h bits/procfs-id.h bits/procfs-extra.h \
bits/procfs-prregset.h bits/mman-map-flags-generic.h \
bits/msq-pad.h bits/sem-pad.h bits/shmlba.h bits/shm-pad.h \
- bits/termios-struct.h bits/termios-c_cc.h
+ bits/termios-struct.h bits/termios-c_cc.h \
+ bits/termios-c_iflag.h
tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios-c_iflag.h b/sysdeps/unix/sysv/linux/alpha/bits/termios-c_iflag.h
new file mode 100644
index 0000000..4c9d101
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios-c_iflag.h
@@ -0,0 +1,38 @@
+/* termios input mode definitions. Linux/alpha version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_iflags.h> directly; use <termios.h> instead."
+#endif
+
+/* c_iflag bits */
+#define IGNBRK 0000001
+#define BRKINT 0000002
+#define IGNPAR 0000004
+#define PARMRK 0000010
+#define INPCK 0000020
+#define ISTRIP 0000040
+#define INLCR 0000100
+#define IGNCR 0000200
+#define ICRNL 0000400
+#define IXON 0001000
+#define IXOFF 0002000
+#define IXANY 0004000
+#define IUCLC 0010000
+#define IMAXBEL 0020000
+#define IUTF8 0040000
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index fb573f0..a48a4b4 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -26,23 +26,7 @@ typedef unsigned int tcflag_t;
#include <bits/termios-struct.h>
#include <bits/termios-c_cc.h>
-
-/* c_iflag bits */
-#define IGNBRK 0000001
-#define BRKINT 0000002
-#define IGNPAR 0000004
-#define PARMRK 0000010
-#define INPCK 0000020
-#define ISTRIP 0000040
-#define INLCR 0000100
-#define IGNCR 0000200
-#define ICRNL 0000400
-#define IXON 0001000
-#define IXOFF 0002000
-#define IXANY 0004000
-#define IUCLC 0010000
-#define IMAXBEL 0020000
-#define IUTF8 0040000
+#include <bits/termios-c_iflag.h>
/* c_oflag bits */
#define OPOST 0000001
diff --git a/sysdeps/unix/sysv/linux/bits/termios-c_iflag.h b/sysdeps/unix/sysv/linux/bits/termios-c_iflag.h
new file mode 100644
index 0000000..519dc1f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/bits/termios-c_iflag.h
@@ -0,0 +1,40 @@
+/* termios input mode definitions. Linux/generic version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-ciflags.h> directly; use <termios.h> instead."
+#endif
+
+/* 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). */
diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h
index f80ae9d..c4e8fed 100644
--- a/sysdeps/unix/sysv/linux/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/bits/termios.h
@@ -26,23 +26,7 @@ typedef unsigned int tcflag_t;
#include <bits/termios-struct.h>
#include <bits/termios-c_cc.h>
-
-/* c_iflag bits */
-#define IGNBRK 0000001
-#define BRKINT 0000002
-#define IGNPAR 0000004
-#define PARMRK 0000010
-#define INPCK 0000020
-#define ISTRIP 0000040
-#define INLCR 0000100
-#define IGNCR 0000200
-#define ICRNL 0000400
-#define IUCLC 0001000
-#define IXON 0002000
-#define IXANY 0004000
-#define IXOFF 0010000
-#define IMAXBEL 0020000
-#define IUTF8 0040000
+#include <bits/termios-c_iflag.h>
/* c_oflag bits */
#define OPOST 0000001
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index 1ec96fd..5ee7a76 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -26,23 +26,7 @@ typedef unsigned int tcflag_t;
#include <bits/termios-struct.h>
#include <bits/termios-c_cc.h>
-
-/* 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 upper case to lower case on input. */
-#define IXON 0002000 /* Enable start/stop output control. */
-#define IXANY 0004000 /* Any character will restart after stop. */
-#define IXOFF 0010000 /* Enable start/stop input control. */
-#define IMAXBEL 0020000 /* Ring bell when input queue is full. */
-#define IUTF8 0040000 /* Input is UTF8. */
+#include <bits/termios-c_iflag.h>
/* c_oflag bits */
#define OPOST 0000001 /* Perform output processing. */
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_iflag.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_iflag.h
new file mode 100644
index 0000000..e7aea81
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_iflag.h
@@ -0,0 +1,38 @@
+/* termios input mode definitions. Linux/powerpc version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_iflags.h> directly; use <termios.h> instead."
+#endif
+
+/* c_iflag bits */
+#define IGNBRK 0000001
+#define BRKINT 0000002
+#define IGNPAR 0000004
+#define PARMRK 0000010
+#define INPCK 0000020
+#define ISTRIP 0000040
+#define INLCR 0000100
+#define IGNCR 0000200
+#define ICRNL 0000400
+#define IXON 0001000
+#define IXOFF 0002000
+#define IXANY 0004000
+#define IUCLC 0010000
+#define IMAXBEL 0020000
+#define IUTF8 0040000
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
index 5a0bce6..c7aac19 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
@@ -25,23 +25,7 @@ typedef unsigned int tcflag_t;
#include <bits/termios-struct.h>
#include <bits/termios-c_cc.h>
-
-/* c_iflag bits */
-#define IGNBRK 0000001
-#define BRKINT 0000002
-#define IGNPAR 0000004
-#define PARMRK 0000010
-#define INPCK 0000020
-#define ISTRIP 0000040
-#define INLCR 0000100
-#define IGNCR 0000200
-#define ICRNL 0000400
-#define IXON 0001000
-#define IXOFF 0002000
-#define IXANY 0004000
-#define IUCLC 0010000
-#define IMAXBEL 0020000
-#define IUTF8 0040000
+#include <bits/termios-c_iflag.h>
/* c_oflag bits */
#define OPOST 0000001
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
index 40f1d6d..d76e318 100644
--- 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;
#include <bits/termios-struct.h>
#include <bits/termios-c_cc.h>
-
-/* 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>
/* c_oflag bits */
#define OPOST 0x00000001
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=48c1dd963233930f55c48fe3f38ce6c2362fc373
commit 48c1dd963233930f55c48fe3f38ce6c2362fc373
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Oct 9 10:26:14 2018 -0300
termios: Consolidate termios c_cc symbolic constants
This patch consolidates the termios symbolic constants used as subscript
for the array c_cc 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, mips64, sparc64, and
powerpc).
No semantic change is expected, checked on a build against x86_64-linux-gnu,
alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu.
* sysdeps/unix/sysv/linux/Makefile (sysdeps_headers): Add
termios-cc.h.
* sysdeps/unix/sysv/linux/bits/termios-c_cc.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/termios-c_cc.h: New file.
* sysdeps/unix/sysv/linux/mips/bits/termios-c_cc.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cc.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios-c_cc.h: Likewise.
* sysdeps/unix/sysv/linux/bits/termios.h (VINTR, VQUIT, VERASE,
VKILL, VEOF, VTIME, VMIN, VSWTC, VSTART, VSTOP, VSUSP, VEOL,
VREPRINT, VDISCARD, VWERASE, VLNEXT, VEOLF2): Move to termios-cc.h.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
diff --git a/ChangeLog b/ChangeLog
index f369fd0..cb28b1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2019-01-03 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * sysdeps/unix/sysv/linux/Makefile (sysdeps_headers): Add
+ termios-cc.h.
+ * sysdeps/unix/sysv/linux/bits/termios-c_cc.h: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios-c_cc.h: New file.
+ * sysdeps/unix/sysv/linux/mips/bits/termios-c_cc.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cc.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/termios-c_cc.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/termios.h (VINTR, VQUIT, VERASE,
+ VKILL, VEOF, VTIME, VMIN, VSWTC, VSTART, VSTOP, VSUSP, VEOL,
+ VREPRINT, VDISCARD, VWERASE, VLNEXT, VEOLF2): Move to termios-cc.h.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/termios.h: Likewise.
+
* sysdeps/unix/sysv/linux/alpha/bits/termios-struct.h: New file.
* sysdeps/unix/sysv/linux/bits/termios-struct.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios-struct.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index f9c8864..4ef1e03 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -44,7 +44,7 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
bits/procfs.h bits/procfs-id.h bits/procfs-extra.h \
bits/procfs-prregset.h bits/mman-map-flags-generic.h \
bits/msq-pad.h bits/sem-pad.h bits/shmlba.h bits/shm-pad.h \
- bits/termios-struct.h
+ bits/termios-struct.h bits/termios-c_cc.h
tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios-c_cc.h b/sysdeps/unix/sysv/linux/alpha/bits/termios-c_cc.h
new file mode 100644
index 0000000..db3aed8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios-c_cc.h
@@ -0,0 +1,40 @@
+/* termios c_cc symbolic constant definitions. Linux/alpha version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
+#endif
+
+/* c_cc characters */
+#define VEOF 0
+#define VEOL 1
+#define VEOL2 2
+#define VERASE 3
+#define VWERASE 4
+#define VKILL 5
+#define VREPRINT 6
+#define VSWTC 7
+#define VINTR 8
+#define VQUIT 9
+#define VSUSP 10
+#define VSTART 12
+#define VSTOP 13
+#define VLNEXT 14
+#define VDISCARD 15
+#define VMIN 16
+#define VTIME 17
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index 6b6fdfb..fb573f0 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -25,25 +25,7 @@ typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
#include <bits/termios-struct.h>
-
-/* c_cc characters */
-#define VEOF 0
-#define VEOL 1
-#define VEOL2 2
-#define VERASE 3
-#define VWERASE 4
-#define VKILL 5
-#define VREPRINT 6
-#define VSWTC 7
-#define VINTR 8
-#define VQUIT 9
-#define VSUSP 10
-#define VSTART 12
-#define VSTOP 13
-#define VLNEXT 14
-#define VDISCARD 15
-#define VMIN 16
-#define VTIME 17
+#include <bits/termios-c_cc.h>
/* c_iflag bits */
#define IGNBRK 0000001
diff --git a/sysdeps/unix/sysv/linux/bits/termios-c_cc.h b/sysdeps/unix/sysv/linux/bits/termios-c_cc.h
new file mode 100644
index 0000000..9f587c5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/bits/termios-c_cc.h
@@ -0,0 +1,40 @@
+/* termios c_cc symbolic constant definitions. Linux/generic version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios_c_cc.h> directly; use <termios.h> instead."
+#endif
+
+/* c_cc characters */
+#define VINTR 0
+#define VQUIT 1
+#define VERASE 2
+#define VKILL 3
+#define VEOF 4
+#define VTIME 5
+#define VMIN 6
+#define VSWTC 7
+#define VSTART 8
+#define VSTOP 9
+#define VSUSP 10
+#define VEOL 11
+#define VREPRINT 12
+#define VDISCARD 13
+#define VWERASE 14
+#define VLNEXT 15
+#define VEOL2 16
diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h
index 74468db..f80ae9d 100644
--- a/sysdeps/unix/sysv/linux/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/bits/termios.h
@@ -25,25 +25,7 @@ typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
#include <bits/termios-struct.h>
-
-/* c_cc characters */
-#define VINTR 0
-#define VQUIT 1
-#define VERASE 2
-#define VKILL 3
-#define VEOF 4
-#define VTIME 5
-#define VMIN 6
-#define VSWTC 7
-#define VSTART 8
-#define VSTOP 9
-#define VSUSP 10
-#define VEOL 11
-#define VREPRINT 12
-#define VDISCARD 13
-#define VWERASE 14
-#define VLNEXT 15
-#define VEOL2 16
+#include <bits/termios-c_cc.h>
/* c_iflag bits */
#define IGNBRK 0000001
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios-c_cc.h b/sysdeps/unix/sysv/linux/mips/bits/termios-c_cc.h
new file mode 100644
index 0000000..4913a96
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios-c_cc.h
@@ -0,0 +1,43 @@
+/* termios c_cc symbolic constant definitions. Linux/mips version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
+#endif
+
+/* c_cc characters */
+#define VINTR 0 /* Interrupt character [ISIG]. */
+#define VQUIT 1 /* Quit character [ISIG]. */
+#define VERASE 2 /* Erase character [ICANON]. */
+#define VKILL 3 /* Kill-line character [ICANON]. */
+#define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */
+#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */
+#define VEOL2 6 /* Second EOL character [ICANON]. */
+#define VSWTC 7
+#define VSWTCH VSWTC
+#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */
+#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */
+#define VSUSP 10 /* Suspend character [ISIG]. */
+ /* VDSUSP is not supported on Linux. */
+/* #define VDSUSP 11 / * Delayed suspend character [ISIG]. */
+#define VREPRINT 12 /* Reprint-line character [ICANON]. */
+#define VDISCARD 13 /* Discard character [IEXTEN]. */
+#define VWERASE 14 /* Word-erase character [ICANON]. */
+#define VLNEXT 15 /* Literal-next character [IEXTEN]. */
+#define VEOF 16 /* End-of-file character [ICANON]. */
+#define VEOL 17 /* End-of-line character [ICANON]. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index 68d771d..1ec96fd 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -25,28 +25,7 @@ typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
#include <bits/termios-struct.h>
-
-/* c_cc characters */
-#define VINTR 0 /* Interrupt character [ISIG]. */
-#define VQUIT 1 /* Quit character [ISIG]. */
-#define VERASE 2 /* Erase character [ICANON]. */
-#define VKILL 3 /* Kill-line character [ICANON]. */
-#define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */
-#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */
-#define VEOL2 6 /* Second EOL character [ICANON]. */
-#define VSWTC 7
-#define VSWTCH VSWTC
-#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */
-#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */
-#define VSUSP 10 /* Suspend character [ISIG]. */
- /* VDSUSP is not supported on Linux. */
-/* #define VDSUSP 11 / * Delayed suspend character [ISIG]. */
-#define VREPRINT 12 /* Reprint-line character [ICANON]. */
-#define VDISCARD 13 /* Discard character [IEXTEN]. */
-#define VWERASE 14 /* Word-erase character [ICANON]. */
-#define VLNEXT 15 /* Literal-next character [IEXTEN]. */
-#define VEOF 16 /* End-of-file character [ICANON]. */
-#define VEOL 17 /* End-of-line character [ICANON]. */
+#include <bits/termios-c_cc.h>
/* c_iflag bits */
#define IGNBRK 0000001 /* Ignore break condition. */
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cc.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cc.h
new file mode 100644
index 0000000..2dbb757
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cc.h
@@ -0,0 +1,41 @@
+/* termios c_cc symbolic constant definitions. Linux/powerpc version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
+#endif
+
+/* c_cc characters */
+#define VINTR 0
+#define VQUIT 1
+#define VERASE 2
+#define VKILL 3
+#define VEOF 4
+#define VMIN 5
+#define VEOL 6
+#define VTIME 7
+#define VEOL2 8
+#define VSWTC 9
+
+#define VWERASE 10
+#define VREPRINT 11
+#define VSUSP 12
+#define VSTART 13
+#define VSTOP 14
+#define VLNEXT 15
+#define VDISCARD 16
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
index 4dafb60..5a0bce6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
@@ -24,26 +24,7 @@ typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
#include <bits/termios-struct.h>
-
-/* c_cc characters */
-#define VINTR 0
-#define VQUIT 1
-#define VERASE 2
-#define VKILL 3
-#define VEOF 4
-#define VMIN 5
-#define VEOL 6
-#define VTIME 7
-#define VEOL2 8
-#define VSWTC 9
-
-#define VWERASE 10
-#define VREPRINT 11
-#define VSUSP 12
-#define VSTART 13
-#define VSTOP 14
-#define VLNEXT 15
-#define VDISCARD 16
+#include <bits/termios-c_cc.h>
/* c_iflag bits */
#define IGNBRK 0000001
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios-c_cc.h b/sysdeps/unix/sysv/linux/sparc/bits/termios-c_cc.h
new file mode 100644
index 0000000..5d90381
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/bits/termios-c_cc.h
@@ -0,0 +1,43 @@
+/* termios c_cc symbolic constant definitions. Linux/sparc version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
+#endif
+
+/* c_cc characters */
+#define VINTR 0
+#define VQUIT 1
+#define VERASE 2
+#define VKILL 3
+#define VEOF 4
+#define VEOL 5
+#define VEOL2 6
+#define VSWTC 7
+#define VSTART 8
+#define VSTOP 9
+#define VSUSP 10
+#define VDSUSP 11 /* SunOS POSIX nicety I do believe... */
+#define VREPRINT 12
+#define VDISCARD 13
+#define VWERASE 14
+#define VLNEXT 15
+
+/* User apps assume vmin/vtime is shared with eof/eol */
+#define VMIN VEOF
+#define VTIME VEOL
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
index a440aeb..40f1d6d 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
@@ -25,28 +25,7 @@ typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
#include <bits/termios-struct.h>
-
-/* c_cc characters */
-#define VINTR 0
-#define VQUIT 1
-#define VERASE 2
-#define VKILL 3
-#define VEOF 4
-#define VEOL 5
-#define VEOL2 6
-#define VSWTC 7
-#define VSTART 8
-#define VSTOP 9
-#define VSUSP 10
-#define VDSUSP 11 /* SunOS POSIX nicety I do believe... */
-#define VREPRINT 12
-#define VDISCARD 13
-#define VWERASE 14
-#define VLNEXT 15
-
-/* User apps assume vmin/vtime is shared with eof/eol */
-#define VMIN VEOF
-#define VTIME VEOL
+#include <bits/termios-c_cc.h>
/* c_iflag bits */
#define IGNBRK 0x00000001
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e5a50db36eaa6e8c6427b3a971563240b633ca85
commit e5a50db36eaa6e8c6427b3a971563240b633ca85
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Oct 9 10:00:14 2018 -0300
termios: Consolidate struct termios
This patch consolidates the struct termios definition on its own header
and adds arch-defined ones for ABIs that deviate from generic
implementation. They are:
- alpha which has a slight different layout than generic one (c_cc
field is defined prior c_line).
- sparc and mips which do not have the c_ispeed/c_ospeed fields.
No semantic change is expected, checked on a build against x86_64-linux-gnu,
alpha-linux-gnu, mips64-linux-gnu, and sparc64-linux-gnu.
* sysdeps/unix/sysv/linux/alpha/bits/termios-struct.h: New file.
* sysdeps/unix/sysv/linux/bits/termios-struct.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios-struct.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios-struct.h: Likewise.
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
termios-struct.h.
* sysdeps/unix/sysv/linux/bits/termios.h (struct termios): Move to
termios-struct.h.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h (struct termios):
Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h (struct termios):
Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h (struct termios):
Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios.h (struct termios):
Likewise.
* sysdeps/unix/sysv/linux/kernel_termios.h (_HAVE_C_ISPEED,
_HAVE_C_OSPEED): Define.
* sysdeps/unix/sysv/linux/mips/kernel_termios.h (_HAVE_C_ISPEED,
_HAVE_C_OSPEED): Likewise.
* sysdeps/unix/sysv/linux/sparc/kernel_termios.h (_HAVE_C_ISPEED,
_HAVE_C_OSPEED): Likewise.
* sysdeps/unix/sysv/linux/speed.c [_HAVE_STRUCT_TERMIOS_C_OSPEED]
(cfsetospeed): Check for define value instead of existence.
[_HAVE_STRUCT_TERMIOS_C_ISPEED] (cfsetispeed): Likewise.
* sysdeps/unix/sysv/linux/tcgetattr.c [_HAVE_STRUCT_TERMIOS_C_ISPEED
&& _HAVE_C_ISPEED] (__tcgetattr): Likewise.
* sysdeps/unix/sysv/linux/tcsetattr.c [_HAVE_STRUCT_TERMIOS_C_ISPEED
&& _HAVE_C_ISPEED] (__tcsetattr): Likewise.
diff --git a/ChangeLog b/ChangeLog
index 8795789..f369fd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,35 @@
2019-01-03 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * sysdeps/unix/sysv/linux/alpha/bits/termios-struct.h: New file.
+ * sysdeps/unix/sysv/linux/bits/termios-struct.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/termios-struct.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/termios-struct.h: Likewise.
+ * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
+ termios-struct.h.
+ * sysdeps/unix/sysv/linux/bits/termios.h (struct termios): Move to
+ termios-struct.h.
+ * sysdeps/unix/sysv/linux/alpha/bits/termios.h (struct termios):
+ Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/termios.h (struct termios):
+ Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/termios.h (struct termios):
+ Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/termios.h (struct termios):
+ Likewise.
+ * sysdeps/unix/sysv/linux/kernel_termios.h (_HAVE_C_ISPEED,
+ _HAVE_C_OSPEED): Define.
+ * sysdeps/unix/sysv/linux/mips/kernel_termios.h (_HAVE_C_ISPEED,
+ _HAVE_C_OSPEED): Likewise.
+ * sysdeps/unix/sysv/linux/sparc/kernel_termios.h (_HAVE_C_ISPEED,
+ _HAVE_C_OSPEED): Likewise.
+ * sysdeps/unix/sysv/linux/speed.c [_HAVE_STRUCT_TERMIOS_C_OSPEED]
+ (cfsetospeed): Check for define value instead of existence.
+ [_HAVE_STRUCT_TERMIOS_C_ISPEED] (cfsetispeed): Likewise.
+ * sysdeps/unix/sysv/linux/tcgetattr.c [_HAVE_STRUCT_TERMIOS_C_ISPEED
+ && _HAVE_C_ISPEED] (__tcgetattr): Likewise.
+ * sysdeps/unix/sysv/linux/tcsetattr.c [_HAVE_STRUCT_TERMIOS_C_ISPEED
+ && _HAVE_C_ISPEED] (__tcsetattr): Likewise.
+
[BZ #17783]
* sysdeps/unix/sysv/linux/bits/termios.h [__USE_MISC] (TIOCSER_TEMT):
Define.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index f827455..f9c8864 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -43,7 +43,8 @@ sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
bits/siginfo-arch.h bits/siginfo-consts-arch.h \
bits/procfs.h bits/procfs-id.h bits/procfs-extra.h \
bits/procfs-prregset.h bits/mman-map-flags-generic.h \
- bits/msq-pad.h bits/sem-pad.h bits/shmlba.h bits/shm-pad.h
+ bits/msq-pad.h bits/sem-pad.h bits/shmlba.h bits/shm-pad.h \
+ bits/termios-struct.h
tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios-struct.h
similarity index 61%
copy from sysdeps/unix/sysv/linux/mips/kernel_termios.h
copy to sysdeps/unix/sysv/linux/alpha/bits/termios-struct.h
index 0200d50..55f9f2e 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios-struct.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
+/* struct termios definition. Linux/alpha version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,20 +16,22 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _KERNEL_TERMIOS_H
-#define _KERNEL_TERMIOS_H 1
-/* The following corresponds to the values from the Linux 2.1.24 kernel. */
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
+#endif
-#define __KERNEL_NCCS 23
-
-struct __kernel_termios
+/* Alpha has C_CC before C_LINE compare to Linux generic definition. */
+#define NCCS 32
+struct termios
{
tcflag_t c_iflag; /* input mode flags */
tcflag_t c_oflag; /* output mode flags */
tcflag_t c_cflag; /* control mode flags */
tcflag_t c_lflag; /* local mode flags */
- cc_t c_line; /* line discipline */
- cc_t c_cc[__KERNEL_NCCS]; /* control characters */
+ cc_t c_cc[NCCS]; /* control characters */
+ cc_t c_line; /* line discipline (== c_cc[33]) */
+ speed_t c_ispeed; /* input speed */
+ speed_t c_ospeed; /* output speed */
+#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
+#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
};
-
-#endif /* kernel_termios.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index 8fb3931..6b6fdfb 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -24,20 +24,7 @@ typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
-#define NCCS 32
-struct termios
- {
- tcflag_t c_iflag; /* input mode flags */
- tcflag_t c_oflag; /* output mode flags */
- tcflag_t c_cflag; /* control mode flags */
- tcflag_t c_lflag; /* local mode flags */
- cc_t c_cc[NCCS]; /* control characters */
- cc_t c_line; /* line discipline (== c_cc[33]) */
- speed_t c_ispeed; /* input speed */
- speed_t c_ospeed; /* output speed */
-#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
-#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
- };
+#include <bits/termios-struct.h>
/* c_cc characters */
#define VEOF 0
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_termios.h b/sysdeps/unix/sysv/linux/bits/termios-struct.h
similarity index 65%
copy from sysdeps/unix/sysv/linux/mips/kernel_termios.h
copy to sysdeps/unix/sysv/linux/bits/termios-struct.h
index 0200d50..af5c1b1 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_termios.h
+++ b/sysdeps/unix/sysv/linux/bits/termios-struct.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
+/* struct termios definition. Linux/generic version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,20 +16,21 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _KERNEL_TERMIOS_H
-#define _KERNEL_TERMIOS_H 1
-/* The following corresponds to the values from the Linux 2.1.24 kernel. */
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
+#endif
-#define __KERNEL_NCCS 23
-
-struct __kernel_termios
+#define NCCS 32
+struct termios
{
tcflag_t c_iflag; /* input mode flags */
tcflag_t c_oflag; /* output mode flags */
tcflag_t c_cflag; /* control mode flags */
tcflag_t c_lflag; /* local mode flags */
- cc_t c_line; /* line discipline */
- cc_t c_cc[__KERNEL_NCCS]; /* control characters */
+ cc_t c_line; /* line discipline */
+ cc_t c_cc[NCCS]; /* control characters */
+ speed_t c_ispeed; /* input speed */
+ speed_t c_ospeed; /* output speed */
+#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
+#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
};
-
-#endif /* kernel_termios.h */
diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h
index 96b68a0..74468db 100644
--- a/sysdeps/unix/sysv/linux/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/bits/termios.h
@@ -24,20 +24,7 @@ typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
-#define NCCS 32
-struct termios
- {
- tcflag_t c_iflag; /* input mode flags */
- tcflag_t c_oflag; /* output mode flags */
- tcflag_t c_cflag; /* control mode flags */
- tcflag_t c_lflag; /* local mode flags */
- cc_t c_line; /* line discipline */
- cc_t c_cc[NCCS]; /* control characters */
- speed_t c_ispeed; /* input speed */
- speed_t c_ospeed; /* output speed */
-#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
-#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
- };
+#include <bits/termios-struct.h>
/* c_cc characters */
#define VINTR 0
diff --git a/sysdeps/unix/sysv/linux/kernel_termios.h b/sysdeps/unix/sysv/linux/kernel_termios.h
index 3159e03..bc42947 100644
--- a/sysdeps/unix/sysv/linux/kernel_termios.h
+++ b/sysdeps/unix/sysv/linux/kernel_termios.h
@@ -31,4 +31,7 @@ struct __kernel_termios
cc_t c_cc[__KERNEL_NCCS]; /* control characters */
};
+#define _HAVE_C_ISPEED 0
+#define _HAVE_C_OSPEED 0
+
#endif /* kernel_termios.h */
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios-struct.h
similarity index 72%
copy from sysdeps/unix/sysv/linux/mips/kernel_termios.h
copy to sysdeps/unix/sysv/linux/mips/bits/termios-struct.h
index 0200d50..ca89009 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios-struct.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
+/* struct termios definition. Linux/mips version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,20 +16,19 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _KERNEL_TERMIOS_H
-#define _KERNEL_TERMIOS_H 1
-/* The following corresponds to the values from the Linux 2.1.24 kernel. */
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
+#endif
-#define __KERNEL_NCCS 23
-
-struct __kernel_termios
+#define NCCS 32
+struct termios
{
tcflag_t c_iflag; /* input mode flags */
tcflag_t c_oflag; /* output mode flags */
tcflag_t c_cflag; /* control mode flags */
tcflag_t c_lflag; /* local mode flags */
cc_t c_line; /* line discipline */
- cc_t c_cc[__KERNEL_NCCS]; /* control characters */
+ cc_t c_cc[NCCS]; /* control characters */
+#define _HAVE_STRUCT_TERMIOS_C_ISPEED 0
+#define _HAVE_STRUCT_TERMIOS_C_OSPEED 0
};
-
-#endif /* kernel_termios.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index dd3470c..68d771d 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -24,16 +24,7 @@ typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
-#define NCCS 32
-struct termios
- {
- tcflag_t c_iflag; /* input mode flags */
- tcflag_t c_oflag; /* output mode flags */
- tcflag_t c_cflag; /* control mode flags */
- tcflag_t c_lflag; /* local mode flags */
- cc_t c_line; /* line discipline */
- cc_t c_cc[NCCS]; /* control characters */
- };
+#include <bits/termios-struct.h>
/* c_cc characters */
#define VINTR 0 /* Interrupt character [ISIG]. */
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_termios.h b/sysdeps/unix/sysv/linux/mips/kernel_termios.h
index 0200d50..a607d78 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_termios.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_termios.h
@@ -31,4 +31,7 @@ struct __kernel_termios
cc_t c_cc[__KERNEL_NCCS]; /* control characters */
};
+#define _HAVE_C_ISPEED 0
+#define _HAVE_C_OSPEED 0
+
#endif /* kernel_termios.h */
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
index 050d947..4dafb60 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
@@ -23,25 +23,7 @@ typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
-/*
- * termios type and macro definitions. Be careful about adding stuff
- * to this file since it's used in GNU libc and there are strict rules
- * concerning namespace pollution.
- */
-
-#define NCCS 32
-struct termios {
- tcflag_t c_iflag; /* input mode flags */
- tcflag_t c_oflag; /* output mode flags */
- tcflag_t c_cflag; /* control mode flags */
- tcflag_t c_lflag; /* local mode flags */
- cc_t c_line; /* line discipline (== c_cc[19]) */
- cc_t c_cc[NCCS]; /* control characters */
- speed_t c_ispeed; /* input speed */
- speed_t c_ospeed; /* output speed */
-#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
-#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
-};
+#include <bits/termios-struct.h>
/* c_cc characters */
#define VINTR 0
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios-struct.h
similarity index 72%
copy from sysdeps/unix/sysv/linux/mips/kernel_termios.h
copy to sysdeps/unix/sysv/linux/sparc/bits/termios-struct.h
index 0200d50..bb51170 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_termios.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/termios-struct.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
+/* struct termios definition. Linux/sparc version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,20 +16,19 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _KERNEL_TERMIOS_H
-#define _KERNEL_TERMIOS_H 1
-/* The following corresponds to the values from the Linux 2.1.24 kernel. */
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
+#endif
-#define __KERNEL_NCCS 23
-
-struct __kernel_termios
+#define NCCS 17
+struct termios
{
tcflag_t c_iflag; /* input mode flags */
tcflag_t c_oflag; /* output mode flags */
tcflag_t c_cflag; /* control mode flags */
tcflag_t c_lflag; /* local mode flags */
cc_t c_line; /* line discipline */
- cc_t c_cc[__KERNEL_NCCS]; /* control characters */
+ cc_t c_cc[NCCS]; /* control characters */
+#define _HAVE_STRUCT_TERMIOS_C_ISPEED 0
+#define _HAVE_STRUCT_TERMIOS_C_OSPEED 0
};
-
-#endif /* kernel_termios.h */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
index 0c35d27..a440aeb 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/termios.h
@@ -24,16 +24,7 @@ typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
-#define NCCS 17
-struct termios
- {
- tcflag_t c_iflag; /* input mode flags */
- tcflag_t c_oflag; /* output mode flags */
- tcflag_t c_cflag; /* control mode flags */
- tcflag_t c_lflag; /* local mode flags */
- cc_t c_line; /* line discipline */
- cc_t c_cc[NCCS]; /* control characters */
- };
+#include <bits/termios-struct.h>
/* c_cc characters */
#define VINTR 0
diff --git a/sysdeps/unix/sysv/linux/sparc/kernel_termios.h b/sysdeps/unix/sysv/linux/sparc/kernel_termios.h
index 03a2ade..b88c1ec 100644
--- a/sysdeps/unix/sysv/linux/sparc/kernel_termios.h
+++ b/sysdeps/unix/sysv/linux/sparc/kernel_termios.h
@@ -34,4 +34,7 @@ struct __kernel_termios
cc_t c_cc[__KERNEL_NCCS]; /* control characters */
};
+#define _HAVE_C_ISPEED 0
+#define _HAVE_C_OSPEED 0
+
#endif /* kernel_termios.h */
diff --git a/sysdeps/unix/sysv/linux/speed.c b/sysdeps/unix/sysv/linux/speed.c
index 83fb540..45dc7f3 100644
--- a/sysdeps/unix/sysv/linux/speed.c
+++ b/sysdeps/unix/sysv/linux/speed.c
@@ -58,7 +58,7 @@ cfsetospeed (struct termios *termios_p, speed_t speed)
&& (speed < B57600 || speed > __MAX_BAUD))
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
-#ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED
+#if _HAVE_STRUCT_TERMIOS_C_OSPEED
termios_p->c_ospeed = speed;
#endif
termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
@@ -80,7 +80,7 @@ cfsetispeed (struct termios *termios_p, speed_t speed)
&& (speed < B57600 || speed > __MAX_BAUD))
return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
-#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
+#if _HAVE_STRUCT_TERMIOS_C_ISPEED
termios_p->c_ispeed = speed;
#endif
if (speed == 0)
diff --git a/sysdeps/unix/sysv/linux/tcgetattr.c b/sysdeps/unix/sysv/linux/tcgetattr.c
index f933fe6..c0f8102 100644
--- a/sysdeps/unix/sysv/linux/tcgetattr.c
+++ b/sysdeps/unix/sysv/linux/tcgetattr.c
@@ -44,15 +44,15 @@ __tcgetattr (int fd, struct termios *termios_p)
termios_p->c_cflag = k_termios.c_cflag;
termios_p->c_lflag = k_termios.c_lflag;
termios_p->c_line = k_termios.c_line;
-#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
-# ifdef _HAVE_C_ISPEED
+#if _HAVE_STRUCT_TERMIOS_C_ISPEED
+# if _HAVE_C_ISPEED
termios_p->c_ispeed = k_termios.c_ispeed;
# else
termios_p->c_ispeed = k_termios.c_cflag & (CBAUD | CBAUDEX);
# endif
#endif
-#ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED
-# ifdef _HAVE_C_OSPEED
+#if _HAVE_STRUCT_TERMIOS_C_OSPEED
+# if _HAVE_C_OSPEED
termios_p->c_ospeed = k_termios.c_ospeed;
# else
termios_p->c_ospeed = k_termios.c_cflag & (CBAUD | CBAUDEX);
diff --git a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcsetattr.c
index 3988532..3fb474e 100644
--- a/sysdeps/unix/sysv/linux/tcsetattr.c
+++ b/sysdeps/unix/sysv/linux/tcsetattr.c
@@ -66,10 +66,10 @@ __tcsetattr (int fd, int optional_actions, const struct termios *termios_p)
k_termios.c_cflag = termios_p->c_cflag;
k_termios.c_lflag = termios_p->c_lflag;
k_termios.c_line = termios_p->c_line;
-#if defined _HAVE_C_ISPEED && defined _HAVE_STRUCT_TERMIOS_C_ISPEED
+#if _HAVE_C_ISPEED && _HAVE_STRUCT_TERMIOS_C_ISPEED
k_termios.c_ispeed = termios_p->c_ispeed;
#endif
-#if defined _HAVE_C_OSPEED && defined _HAVE_STRUCT_TERMIOS_C_OSPEED
+#if _HAVE_C_OSPEED && _HAVE_STRUCT_TERMIOS_C_OSPEED
k_termios.c_ospeed = termios_p->c_ospeed;
#endif
memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8083afa55d8c68abc02902e9a6ff16be5f301940
commit 8083afa55d8c68abc02902e9a6ff16be5f301940
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Mon Oct 8 17:51:32 2018 -0300
termios: Define TIOCSER_TEMT with __USE_MISC (BZ#17783)
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.
[BZ #17783]
* 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.
diff --git a/ChangeLog b/ChangeLog
index 3cf2a50..8795789 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2019-01-03 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+
+ [BZ #17783]
+ * 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.
+
2019-01-02 PanderMusubi <pander@users.sourceforge.net>
[BZ #24011]
diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h
index e0249a5..96b68a0 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 5236dc9..050d947 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 36860e0..0c35d27 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 */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 166 ++++++++++++
sysdeps/unix/sysv/linux/Makefile | 7 +-
sysdeps/unix/sysv/linux/alpha/bits/termios-baud.h | 46 ++++
sysdeps/unix/sysv/linux/alpha/bits/termios-c_cc.h | 40 +++
.../unix/sysv/linux/alpha/bits/termios-c_cflag.h | 35 +++
.../unix/sysv/linux/alpha/bits/termios-c_iflag.h | 38 +++
.../unix/sysv/linux/alpha/bits/termios-c_lflag.h | 42 +++
.../unix/sysv/linux/alpha/bits/termios-c_oflag.h | 66 +++++
.../unix/sysv/linux/alpha/bits/termios-struct.h | 37 +++
sysdeps/unix/sysv/linux/alpha/bits/termios.h | 223 ----------------
sysdeps/unix/sysv/linux/bits/termios-baud.h | 48 ++++
sysdeps/unix/sysv/linux/bits/termios-c_cc.h | 40 +++
sysdeps/unix/sysv/linux/bits/termios-c_cflag.h | 34 +++
sysdeps/unix/sysv/linux/bits/termios-c_iflag.h | 40 +++
sysdeps/unix/sysv/linux/bits/termios-c_lflag.h | 58 ++++
sysdeps/unix/sysv/linux/bits/termios-c_oflag.h | 61 +++++
sysdeps/unix/sysv/linux/bits/termios-misc.h | 21 ++
sysdeps/unix/sysv/linux/bits/termios-struct.h | 36 +++
sysdeps/unix/sysv/linux/bits/termios-tcflow.h | 26 ++
sysdeps/unix/sysv/linux/bits/termios.h | 167 +-----------
sysdeps/unix/sysv/linux/kernel_termios.h | 3 +
sysdeps/unix/sysv/linux/mips/bits/termios-c_cc.h | 43 +++
.../unix/sysv/linux/mips/bits/termios-c_lflag.h | 46 ++++
sysdeps/unix/sysv/linux/mips/bits/termios-struct.h | 34 +++
sysdeps/unix/sysv/linux/mips/bits/termios-tcflow.h | 26 ++
sysdeps/unix/sysv/linux/mips/bits/termios.h | 222 ----------------
sysdeps/unix/sysv/linux/mips/kernel_termios.h | 3 +
.../unix/sysv/linux/powerpc/bits/termios-baud.h | 45 ++++
.../unix/sysv/linux/powerpc/bits/termios-c_cc.h | 41 +++
.../unix/sysv/linux/powerpc/bits/termios-c_cflag.h | 35 +++
.../unix/sysv/linux/powerpc/bits/termios-c_iflag.h | 38 +++
.../unix/sysv/linux/powerpc/bits/termios-c_lflag.h | 45 ++++
.../unix/sysv/linux/powerpc/bits/termios-c_oflag.h | 65 +++++
.../unix/sysv/linux/powerpc/bits/termios-misc.h | 72 +++++
sysdeps/unix/sysv/linux/powerpc/bits/termios.h | 279 --------------------
sysdeps/unix/sysv/linux/sparc/bits/termios-baud.h | 46 ++++
sysdeps/unix/sysv/linux/sparc/bits/termios-c_cc.h | 43 +++
.../unix/sysv/linux/sparc/bits/termios-c_oflag.h | 64 +++++
.../unix/sysv/linux/sparc/bits/termios-struct.h | 34 +++
sysdeps/unix/sysv/linux/sparc/bits/termios.h | 225 ----------------
sysdeps/unix/sysv/linux/sparc/kernel_termios.h | 3 +
sysdeps/unix/sysv/linux/speed.c | 4 +-
sysdeps/unix/sysv/linux/tcgetattr.c | 8 +-
sysdeps/unix/sysv/linux/tcsetattr.c | 4 +-
44 files changed, 1546 insertions(+), 1113 deletions(-)
create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios-baud.h
create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios-c_cc.h
create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios-c_cflag.h
create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios-c_iflag.h
create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios-c_lflag.h
create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios-c_oflag.h
create mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios-struct.h
delete mode 100644 sysdeps/unix/sysv/linux/alpha/bits/termios.h
create mode 100644 sysdeps/unix/sysv/linux/bits/termios-baud.h
create mode 100644 sysdeps/unix/sysv/linux/bits/termios-c_cc.h
create mode 100644 sysdeps/unix/sysv/linux/bits/termios-c_cflag.h
create mode 100644 sysdeps/unix/sysv/linux/bits/termios-c_iflag.h
create mode 100644 sysdeps/unix/sysv/linux/bits/termios-c_lflag.h
create mode 100644 sysdeps/unix/sysv/linux/bits/termios-c_oflag.h
create mode 100644 sysdeps/unix/sysv/linux/bits/termios-misc.h
create mode 100644 sysdeps/unix/sysv/linux/bits/termios-struct.h
create mode 100644 sysdeps/unix/sysv/linux/bits/termios-tcflow.h
create mode 100644 sysdeps/unix/sysv/linux/mips/bits/termios-c_cc.h
create mode 100644 sysdeps/unix/sysv/linux/mips/bits/termios-c_lflag.h
create mode 100644 sysdeps/unix/sysv/linux/mips/bits/termios-struct.h
create mode 100644 sysdeps/unix/sysv/linux/mips/bits/termios-tcflow.h
delete mode 100644 sysdeps/unix/sysv/linux/mips/bits/termios.h
create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-baud.h
create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cc.h
create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-c_cflag.h
create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-c_iflag.h
create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-c_lflag.h
create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-c_oflag.h
create mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h
delete mode 100644 sysdeps/unix/sysv/linux/powerpc/bits/termios.h
create mode 100644 sysdeps/unix/sysv/linux/sparc/bits/termios-baud.h
create mode 100644 sysdeps/unix/sysv/linux/sparc/bits/termios-c_cc.h
create mode 100644 sysdeps/unix/sysv/linux/sparc/bits/termios-c_oflag.h
create mode 100644 sysdeps/unix/sysv/linux/sparc/bits/termios-struct.h
delete mode 100644 sysdeps/unix/sysv/linux/sparc/bits/termios.h
hooks/post-receive
--
GNU C Library master sources