Skip to content

Commit

Permalink
windows: comment on fields omitted from the win32finddata1 struct
Browse files Browse the repository at this point in the history
Updates golang/go#42637

Change-Id: I2e8c95af3cf2172c55bda6a15a749afcc6c45581
Reviewed-on: https://go-review.googlesource.com/c/sys/+/284172
Trust: Bryan C. Mills <bcmills@google.com>
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
  • Loading branch information
Bryan C. Mills authored and zx2c4 committed Feb 19, 2021
1 parent 3351caf commit 57ea560
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions windows/types_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,14 @@ type win32finddata1 struct {
Reserved1 uint32
FileName [MAX_PATH]uint16
AlternateFileName [14]uint16

// The Microsoft documentation for this struct¹ describes three additional
// fields: dwFileType, dwCreatorType, and wFinderFlags. However, those fields
// are empirically only present in the macOS port of the Win32 API,² and thus
// not needed for binaries built for Windows.
//
// ¹ https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-win32_find_dataw describe
// ² https://golang.org/issue/42637#issuecomment-760715755.
}

func copyFindData(dst *Win32finddata, src *win32finddata1) {
Expand Down

0 comments on commit 57ea560

Please sign in to comment.