Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/std/io/Reader.zig
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ pub fn isBytes(self: Self, slice: []const u8) anyerror!bool {
}

pub fn readStruct(self: Self, comptime T: type) anyerror!T {
// Only extern and packed structs have defined in-memory layout.
comptime assert(@typeInfo(T).Struct.layout != .Auto);
// Only extern structs have defined in-memory layout.
comptime assert(@typeInfo(T).Struct.layout == .Extern);
var res: [1]T = undefined;
try self.readNoEof(mem.sliceAsBytes(res[0..]));
return res[0];
Expand Down
22 changes: 22 additions & 0 deletions lib/std/os/windows.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5044,6 +5044,7 @@ pub const SYSTEM_INFORMATION_CLASS = enum(c_int) {
SystemInterruptInformation = 23,
SystemExceptionInformation = 33,
SystemRegistryQuotaInformation = 37,
SystemCurrentTimeZoneInformation = 44,
SystemLookasideInformation = 45,
SystemCodeIntegrityInformation = 103,
SystemPolicyInformation = 134,
Expand All @@ -5063,6 +5064,27 @@ pub const SYSTEM_BASIC_INFORMATION = extern struct {
NumberOfProcessors: UCHAR,
};

pub const TIME_ZONE_INFORMATION = extern struct {
Bias: LONG,
StandardName: [32]WCHAR,
StandardDate: SYSTEMTIME,
StandardBias: LONG,
DaylightName: [32]WCHAR,
DaylightDate: SYSTEMTIME,
DaylightBias: LONG,
};

pub const SYSTEMTIME = extern struct {
wYear: WORD,
wMonth: WORD,
wDayOfWeek: WORD,
wDay: WORD,
wHour: WORD,
wMinute: WORD,
wSecond: WORD,
wMilliseconds: WORD,
};

pub const THREADINFOCLASS = enum(c_int) {
ThreadBasicInformation,
ThreadTimes,
Expand Down
4 changes: 0 additions & 4 deletions lib/std/std.zig
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ pub const TailQueue = DoublyLinkedList;
pub const Target = @import("target.zig").Target;
pub const Thread = @import("Thread.zig");
pub const Treap = @import("treap.zig").Treap;
pub const Tz = tz.Tz;
pub const Uri = @import("Uri.zig");

pub const array_hash_map = @import("array_hash_map.zig");
Expand Down Expand Up @@ -177,9 +176,6 @@ pub const testing = @import("testing.zig");
/// Sleep, obtaining the current time, conversion constants, and more.
pub const time = @import("time.zig");

/// Time zones.
pub const tz = @import("tz.zig");

/// UTF-8 and UTF-16LE encoding/decoding.
pub const unicode = @import("unicode.zig");

Expand Down
Loading