From 57ea560cfca1821fc4708b1919dbe8a372862388 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Fri, 15 Jan 2021 10:03:01 -0500 Subject: [PATCH] windows: comment on fields omitted from the win32finddata1 struct Updates golang/go#42637 Change-Id: I2e8c95af3cf2172c55bda6a15a749afcc6c45581 Reviewed-on: https://go-review.googlesource.com/c/sys/+/284172 Trust: Bryan C. Mills Trust: Jason A. Donenfeld Trust: Alex Brainman Run-TryBot: Bryan C. Mills TryBot-Result: Go Bot Reviewed-by: Jason A. Donenfeld Reviewed-by: Alex Brainman --- windows/types_windows.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/windows/types_windows.go b/windows/types_windows.go index 68b65d28..28cf15b0 100644 --- a/windows/types_windows.go +++ b/windows/types_windows.go @@ -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) {