mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 17:53:37 +08:00
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.
This commit is contained in:
parent
f69c5cb2a5
commit
51f4beb081
10
ChangeLog
10
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.
|
||||
|
@ -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
|
||||
|
72
sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h
Normal file
72
sysdeps/unix/sysv/linux/powerpc/bits/termios-misc.h
Normal file
@ -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 */
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user