authorgravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2024-02-15 02:38:20-05:00
committergravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2024-02-15 02:40:11-05:00
log2ff64c7cb235c549f5da60a9d2e785cf2c51c6ba
treec8adfabe812fbff8598b389bb48f8e8af5252286
parent50cdb750346b80ecb50c5454ed99996762b06b96
signaturelock-open Commit is signed but in an unrecognized format.

std.os.termios: add/fix std.c.TCSA for BSDs


4 files changed, 24 insertions(+), 12 deletions(-)

lib/std/c/dragonfly.zig+7
......@@ -557,6 +557,13 @@ pub const NOTE_FFCTRLMASK = 3221225472;
557557pub const NOTE_FFCOPY = 3221225472;
558558pub const NOTE_PCTRLMASK = 4026531840;
559559
560pub const TCSA = enum(c_uint) {
561 NOW,
562 DRAIN,
563 FLUSH,
564 _,
565};
566
560567pub const stack_t = extern struct {
561568 sp: [*]u8,
562569 size: isize,
lib/std/c/freebsd.zig+7
......@@ -1153,6 +1153,13 @@ pub const T = struct {
11531153 pub const IOCSIG = 0x2004745f;
11541154};
11551155
1156pub const TCSA = enum(c_uint) {
1157 NOW,
1158 DRAIN,
1159 FLUSH,
1160 _,
1161};
1162
11561163pub const winsize = extern struct {
11571164 ws_row: u16,
11581165 ws_col: u16,
lib/std/c/netbsd.zig+5-6
......@@ -806,12 +806,11 @@ pub const T = struct {
806806 pub const IOCXMTFRAME = 0x80087444;
807807};
808808
809// Commands passed to tcsetattr() for setting the termios structure.
810pub const TCSA = struct {
811 pub const NOW = 0; // make change immediate
812 pub const DRAIN = 1; // drain output, then chage
813 pub const FLUSH = 2; // drain output, flush input
814 pub const SOFT = 0x10; // flag - don't alter h.w. state
809pub const TCSA = enum(c_uint) {
810 NOW,
811 DRAIN,
812 FLUSH,
813 _,
815814};
816815
817816pub const TCIFLUSH = 1;
lib/std/c/openbsd.zig+5-6
......@@ -768,12 +768,11 @@ pub const AUTH = struct {
768768 pub const ALLOW: c_int = (OKAY | ROOTOKAY | SECURE);
769769};
770770
771// Commands passed to tcsetattr() for setting the termios structure.
772pub const TCSA = struct {
773 pub const NOW = 0; // make change immediate
774 pub const DRAIN = 1; // drain output, then change
775 pub const FLUSH = 2; // drain output, flush input
776 pub const SOFT = 0x10; // flag - don't alter h.w. state
771pub const TCSA = enum(c_uint) {
772 NOW,
773 DRAIN,
774 FLUSH,
775 _,
777776};
778777
779778pub const TCIFLUSH = 1;