* [parisc-linux] termios
@ 1999-12-31 23:35 Matthew Wilcox
0 siblings, 0 replies; only message in thread
From: Matthew Wilcox @ 1999-12-31 23:35 UTC (permalink / raw)
To: parisc-linux
I think the best thing to do with struct termios is to define it in a
way which is compatible with HPUX apps:
# define NCCS 16
typedef unsigned int tcflag_t;
typedef unsigned char cc_t;
typedef unsigned int speed_t;
# ifdef _TERMIOS_INCLUDED
struct termios {
tcflag_t c_iflag; /* Input modes */
tcflag_t c_oflag; /* Output modes */
tcflag_t c_cflag; /* Control modes */
tcflag_t c_lflag; /* Local modes */
tcflag_t c_reserved; /* Reserved for future use */
cc_t c_cc[NCCS]; /* Control characters */
};
As you can see, there are 4 bytes reserved before c_cc starts. Linux
defines more than 16 NCCS, and also has a 1-byte field for the line
discipline. So I propose:
struct termios {
tcflag_t c_iflag; /* Input modes */
tcflag_t c_oflag; /* Output modes */
tcflag_t c_cflag; /* Control modes */
tcflag_t c_lflag; /* Local modes */
cc_t c_line; /* Line Discipline */
cc_t c_cc[19]; /* Control characters */
};
and then adjust the symbolic constants for VINTR et al to ensure they
still refer to the same offset within the structure. Any comments?
I hope HP won't mind me using the reserved field in this way.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-12-31 23:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-12-31 23:35 [parisc-linux] termios Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox