From: Matthew Wilcox <willy@thepuffingroup.com>
To: parisc-linux@thepuffingroup.com
Subject: [parisc-linux] termios
Date: Fri, 31 Dec 1999 18:35:49 -0500 [thread overview]
Message-ID: <19991231183549.D12629@thepuffingroup.com> (raw)
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.
reply other threads:[~1999-12-31 23:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19991231183549.D12629@thepuffingroup.com \
--to=willy@thepuffingroup.com \
--cc=parisc-linux@thepuffingroup.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox