| author | |
| committer | |
| log | 9a643185540a3bba31e449fdf6f25643a2ea3394 |
| tree | ffbc4462da517a8970fd396faf5bc5a995581ab3 |
| parent | 9bdf1ebe3644ee965aab152dd46534a036deaaa8 |
8 files changed, 19 insertions(+), 19 deletions(-)
lib/std/c.zig+9| ... | @@ -781,6 +781,15 @@ pub const cc_t = switch (native_os) { | ... | @@ -781,6 +781,15 @@ pub const cc_t = switch (native_os) { |
| 781 | else => @compileError("target libc does not have cc_t"), | 781 | else => @compileError("target libc does not have cc_t"), |
| 782 | }; | 782 | }; |
| 783 | 783 | ||
| 784 | pub const NCCS = switch (native_os) { | ||
| 785 | .linux => std.os.linux.NCCS, | ||
| 786 | .macos, .ios, .tvos, .watchos, .freebsd, .kfreebsd, .netbsd, .openbsd, .dragonfly => 20, | ||
| 787 | .haiku => 11, | ||
| 788 | .solaris, .illumos => 19, | ||
| 789 | .emscripten, .wasi => 32, | ||
| 790 | else => @compileError("target libc does not have NCCS"), | ||
| 791 | }; | ||
| 792 | |||
| 784 | pub const whence_t = if (native_os == .wasi) std.os.wasi.whence_t else c_int; | 793 | pub const whence_t = if (native_os == .wasi) std.os.wasi.whence_t else c_int; |
| 785 | 794 | ||
| 786 | // Unix-like systems | 795 | // Unix-like systems |
lib/std/c/darwin.zig+1-3| ... | @@ -2692,8 +2692,6 @@ pub const SHUT = struct { | ... | @@ -2692,8 +2692,6 @@ pub const SHUT = struct { |
| 2692 | pub const RDWR = 2; | 2692 | pub const RDWR = 2; |
| 2693 | }; | 2693 | }; |
| 2694 | 2694 | ||
| 2695 | pub const NCCS = 20; // 2 spares (7, 19) | ||
| 2696 | |||
| 2697 | pub const speed_t = u64; | 2695 | pub const speed_t = u64; |
| 2698 | pub const tcflag_t = u64; | 2696 | pub const tcflag_t = u64; |
| 2699 | 2697 | ||
| ... | @@ -2836,7 +2834,7 @@ pub const termios = extern struct { | ... | @@ -2836,7 +2834,7 @@ pub const termios = extern struct { |
| 2836 | oflag: tcflag_t, // output flags | 2834 | oflag: tcflag_t, // output flags |
| 2837 | cflag: tcflag_t, // control flags | 2835 | cflag: tcflag_t, // control flags |
| 2838 | lflag: tcflag_t, // local flags | 2836 | lflag: tcflag_t, // local flags |
| 2839 | cc: [NCCS]std.c.cc_t, // control chars | 2837 | cc: [std.c.NCCS]std.c.cc_t, // control chars |
| 2840 | ispeed: speed_t align(8), // input speed | 2838 | ispeed: speed_t align(8), // input speed |
| 2841 | ospeed: speed_t, // output speed | 2839 | ospeed: speed_t, // output speed |
| 2842 | }; | 2840 | }; |
lib/std/c/emscripten.zig+1-3| ... | @@ -182,15 +182,13 @@ pub const dirent = struct { | ... | @@ -182,15 +182,13 @@ pub const dirent = struct { |
| 182 | pub const speed_t = u32; | 182 | pub const speed_t = u32; |
| 183 | pub const tcflag_t = u32; | 183 | pub const tcflag_t = u32; |
| 184 | 184 | ||
| 185 | pub const NCCS = 32; | ||
| 186 | |||
| 187 | pub const termios = extern struct { | 185 | pub const termios = extern struct { |
| 188 | iflag: tcflag_t, | 186 | iflag: tcflag_t, |
| 189 | oflag: tcflag_t, | 187 | oflag: tcflag_t, |
| 190 | cflag: tcflag_t, | 188 | cflag: tcflag_t, |
| 191 | lflag: tcflag_t, | 189 | lflag: tcflag_t, |
| 192 | line: std.c.cc_t, | 190 | line: std.c.cc_t, |
| 193 | cc: [NCCS]std.c.cc_t, | 191 | cc: [std.c.NCCS]std.c.cc_t, |
| 194 | ispeed: speed_t, | 192 | ispeed: speed_t, |
| 195 | ospeed: speed_t, | 193 | ospeed: speed_t, |
| 196 | }; | 194 | }; |
lib/std/c/haiku.zig+1-3| ... | @@ -953,8 +953,6 @@ pub const directory_which = enum(c_int) { | ... | @@ -953,8 +953,6 @@ pub const directory_which = enum(c_int) { |
| 953 | pub const speed_t = u8; | 953 | pub const speed_t = u8; |
| 954 | pub const tcflag_t = u32; | 954 | pub const tcflag_t = u32; |
| 955 | 955 | ||
| 956 | pub const NCCS = 11; | ||
| 957 | |||
| 958 | pub const termios = extern struct { | 956 | pub const termios = extern struct { |
| 959 | c_iflag: tcflag_t, | 957 | c_iflag: tcflag_t, |
| 960 | c_oflag: tcflag_t, | 958 | c_oflag: tcflag_t, |
| ... | @@ -963,7 +961,7 @@ pub const termios = extern struct { | ... | @@ -963,7 +961,7 @@ pub const termios = extern struct { |
| 963 | c_line: std.c.cc_t, | 961 | c_line: std.c.cc_t, |
| 964 | c_ispeed: speed_t, | 962 | c_ispeed: speed_t, |
| 965 | c_ospeed: speed_t, | 963 | c_ospeed: speed_t, |
| 966 | cc_t: [NCCS]std.c.cc_t, | 964 | cc_t: [std.c.NCCS]std.c.cc_t, |
| 967 | }; | 965 | }; |
| 968 | 966 | ||
| 969 | pub const MSG_NOSIGNAL = 0x0800; | 967 | pub const MSG_NOSIGNAL = 0x0800; |
lib/std/c/netbsd.zig+1-3| ... | @@ -853,14 +853,12 @@ pub const CHWFLOW: tcflag_t = (MDMBUF | CRTSCTS | CDTRCTS); // all types of hw f | ... | @@ -853,14 +853,12 @@ pub const CHWFLOW: tcflag_t = (MDMBUF | CRTSCTS | CDTRCTS); // all types of hw f |
| 853 | pub const tcflag_t = c_uint; | 853 | pub const tcflag_t = c_uint; |
| 854 | pub const speed_t = c_uint; | 854 | pub const speed_t = c_uint; |
| 855 | 855 | ||
| 856 | pub const NCCS = 20; | ||
| 857 | |||
| 858 | pub const termios = extern struct { | 856 | pub const termios = extern struct { |
| 859 | iflag: tcflag_t, // input flags | 857 | iflag: tcflag_t, // input flags |
| 860 | oflag: tcflag_t, // output flags | 858 | oflag: tcflag_t, // output flags |
| 861 | cflag: tcflag_t, // control flags | 859 | cflag: tcflag_t, // control flags |
| 862 | lflag: tcflag_t, // local flags | 860 | lflag: tcflag_t, // local flags |
| 863 | cc: [NCCS]std.c.cc_t, // control chars | 861 | cc: [std.c.NCCS]std.c.cc_t, // control chars |
| 864 | ispeed: c_int, // input speed | 862 | ispeed: c_int, // input speed |
| 865 | ospeed: c_int, // output speed | 863 | ospeed: c_int, // output speed |
| 866 | }; | 864 | }; |
lib/std/c/openbsd.zig+1-3| ... | @@ -771,8 +771,6 @@ pub const AUTH = struct { | ... | @@ -771,8 +771,6 @@ pub const AUTH = struct { |
| 771 | pub const tcflag_t = c_uint; | 771 | pub const tcflag_t = c_uint; |
| 772 | pub const speed_t = c_uint; | 772 | pub const speed_t = c_uint; |
| 773 | 773 | ||
| 774 | pub const NCCS = 20; | ||
| 775 | |||
| 776 | // Input flags - software input processing | 774 | // Input flags - software input processing |
| 777 | pub const IGNBRK: tcflag_t = 0x00000001; // ignore BREAK condition | 775 | pub const IGNBRK: tcflag_t = 0x00000001; // ignore BREAK condition |
| 778 | pub const BRKINT: tcflag_t = 0x00000002; // map BREAK to SIGINT | 776 | pub const BRKINT: tcflag_t = 0x00000002; // map BREAK to SIGINT |
| ... | @@ -823,7 +821,7 @@ pub const termios = extern struct { | ... | @@ -823,7 +821,7 @@ pub const termios = extern struct { |
| 823 | oflag: tcflag_t, // output flags | 821 | oflag: tcflag_t, // output flags |
| 824 | cflag: tcflag_t, // control flags | 822 | cflag: tcflag_t, // control flags |
| 825 | lflag: tcflag_t, // local flags | 823 | lflag: tcflag_t, // local flags |
| 826 | cc: [NCCS]std.c.cc_t, // control chars | 824 | cc: [std.c.NCCS]std.c.cc_t, // control chars |
| 827 | ispeed: c_int, // input speed | 825 | ispeed: c_int, // input speed |
| 828 | ospeed: c_int, // output speed | 826 | ospeed: c_int, // output speed |
| 829 | }; | 827 | }; |
lib/std/c/solaris.zig+1-3| ... | @@ -701,14 +701,12 @@ pub const SEEK = struct { | ... | @@ -701,14 +701,12 @@ pub const SEEK = struct { |
| 701 | pub const tcflag_t = c_uint; | 701 | pub const tcflag_t = c_uint; |
| 702 | pub const speed_t = c_uint; | 702 | pub const speed_t = c_uint; |
| 703 | 703 | ||
| 704 | pub const NCCS = 19; | ||
| 705 | |||
| 706 | pub const termios = extern struct { | 704 | pub const termios = extern struct { |
| 707 | c_iflag: tcflag_t, | 705 | c_iflag: tcflag_t, |
| 708 | c_oflag: tcflag_t, | 706 | c_oflag: tcflag_t, |
| 709 | c_cflag: tcflag_t, | 707 | c_cflag: tcflag_t, |
| 710 | c_lflag: tcflag_t, | 708 | c_lflag: tcflag_t, |
| 711 | c_cc: [NCCS]std.c.cc_t, | 709 | c_cc: [std.c.NCCS]std.c.cc_t, |
| 712 | }; | 710 | }; |
| 713 | 711 | ||
| 714 | fn tioc(t: u16, num: u8) u16 { | 712 | fn tioc(t: u16, num: u8) u16 { |
lib/std/os/linux.zig+4-1| ... | @@ -5006,7 +5006,10 @@ pub const rusage = extern struct { | ... | @@ -5006,7 +5006,10 @@ pub const rusage = extern struct { |
| 5006 | 5006 | ||
| 5007 | pub const speed_t = u32; | 5007 | pub const speed_t = u32; |
| 5008 | 5008 | ||
| 5009 | pub const NCCS = 32; | 5009 | pub const NCCS = switch (native_arch) { |
| 5010 | .powerpc, .powerpcle, .powerpc64, .powerpc64le => 19, | ||
| 5011 | else => 32, | ||
| 5012 | }; | ||
| 5010 | 5013 | ||
| 5011 | pub const B0 = 0o0000000; | 5014 | pub const B0 = 0o0000000; |
| 5012 | pub const B50 = 0o0000001; | 5015 | pub const B50 = 0o0000001; |