std: update std.builtin.Type fields to follow naming conventions
The compiler actually doesn't need any functional changes for this: Sema does reification based on the tag indices of `std.builtin.Type` already! So, no zig1.wasm update is necessary. This change is necessary to disallow name clashes between fields and decls on a type, which is a prerequisite of #9938.
This commit is contained in:
@@ -1547,7 +1547,7 @@ pub fn seteuid(euid: uid_t) usize {
|
||||
// The setresuid(2) man page says that if -1 is passed the corresponding
|
||||
// id will not be changed. Since uid_t is unsigned, this wraps around to the
|
||||
// max value in C.
|
||||
comptime assert(@typeInfo(uid_t) == .Int and @typeInfo(uid_t).Int.signedness == .unsigned);
|
||||
comptime assert(@typeInfo(uid_t) == .int and @typeInfo(uid_t).int.signedness == .unsigned);
|
||||
return setresuid(std.math.maxInt(uid_t), euid, std.math.maxInt(uid_t));
|
||||
}
|
||||
|
||||
@@ -1558,7 +1558,7 @@ pub fn setegid(egid: gid_t) usize {
|
||||
// The setresgid(2) man page says that if -1 is passed the corresponding
|
||||
// id will not be changed. Since gid_t is unsigned, this wraps around to the
|
||||
// max value in C.
|
||||
comptime assert(@typeInfo(uid_t) == .Int and @typeInfo(uid_t).Int.signedness == .unsigned);
|
||||
comptime assert(@typeInfo(uid_t) == .int and @typeInfo(uid_t).int.signedness == .unsigned);
|
||||
return setresgid(std.math.maxInt(gid_t), egid, std.math.maxInt(gid_t));
|
||||
}
|
||||
|
||||
@@ -1673,7 +1673,7 @@ pub fn sigaction(sig: u6, noalias act: ?*const Sigaction, noalias oact: ?*Sigact
|
||||
return 0;
|
||||
}
|
||||
|
||||
const usize_bits = @typeInfo(usize).Int.bits;
|
||||
const usize_bits = @typeInfo(usize).int.bits;
|
||||
|
||||
pub fn sigaddset(set: *sigset_t, sig: u6) void {
|
||||
const s = sig - 1;
|
||||
@@ -1734,7 +1734,7 @@ pub fn sendmsg(fd: i32, msg: *const msghdr_const, flags: u32) usize {
|
||||
}
|
||||
|
||||
pub fn sendmmsg(fd: i32, msgvec: [*]mmsghdr_const, vlen: u32, flags: u32) usize {
|
||||
if (@typeInfo(usize).Int.bits > @typeInfo(@typeInfo(mmsghdr).Struct.fields[1].type).Int.bits) {
|
||||
if (@typeInfo(usize).int.bits > @typeInfo(@typeInfo(mmsghdr).@"struct".fields[1].type).int.bits) {
|
||||
// workaround kernel brokenness:
|
||||
// if adding up all iov_len overflows a i32 then split into multiple calls
|
||||
// see https://www.openwall.com/lists/musl/2014/06/07/5
|
||||
@@ -4904,7 +4904,7 @@ pub const NSIG = if (is_mips) 128 else 65;
|
||||
|
||||
pub const sigset_t = [1024 / 32]u32;
|
||||
|
||||
pub const all_mask: sigset_t = [_]u32{0xffffffff} ** @typeInfo(sigset_t).Array.len;
|
||||
pub const all_mask: sigset_t = [_]u32{0xffffffff} ** @typeInfo(sigset_t).array.len;
|
||||
pub const app_mask: sigset_t = [2]u32{ 0xfffffffc, 0x7fffffff } ++ [_]u32{0xffffffff} ** 30;
|
||||
|
||||
const k_sigaction_funcs = struct {
|
||||
@@ -4947,7 +4947,7 @@ pub const Sigaction = extern struct {
|
||||
restorer: ?*const fn () callconv(.C) void = null,
|
||||
};
|
||||
|
||||
const sigset_len = @typeInfo(sigset_t).Array.len;
|
||||
const sigset_len = @typeInfo(sigset_t).array.len;
|
||||
pub const empty_sigset = [_]u32{0} ** sigset_len;
|
||||
pub const filled_sigset = [_]u32{(1 << (31 & (usize_bits - 1))) - 1} ++ [_]u32{0} ** (sigset_len - 1);
|
||||
|
||||
@@ -7420,7 +7420,7 @@ pub const MADV = struct {
|
||||
};
|
||||
|
||||
pub const POSIX_FADV = switch (native_arch) {
|
||||
.s390x => if (@typeInfo(usize).Int.bits == 64) struct {
|
||||
.s390x => if (@typeInfo(usize).int.bits == 64) struct {
|
||||
pub const NORMAL = 0;
|
||||
pub const RANDOM = 1;
|
||||
pub const SEQUENTIAL = 2;
|
||||
|
||||
Reference in New Issue
Block a user