Skip to content

Commit bd99c72

Browse files
committed
Add a comment
1 parent 873d3b1 commit bd99c72

File tree

1 file changed

+5
-1
lines changed
  • aws-crt-kotlin/mingw/src/aws/sdk/kotlin/crt/util

1 file changed

+5
-1
lines changed

aws-crt-kotlin/mingw/src/aws/sdk/kotlin/crt/util/OsVersion.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ import aws.sdk.kotlin.crt.winver.*
88
import kotlinx.cinterop.*
99
import platform.posix.memcpy
1010

11+
// The following code is used to resolve the OS version on Windows machines.
12+
// This eventually ends up in aws-sdk-kotlin's User-Agent header.
13+
// It briefly lived in smithy-kotlin but was removed because it needs a MinGW installation to compile
14+
// FIXME Can we get the same information without all these API calls?
15+
1116
// The functions below are adapted from C++ SDK:
1217
// https://github.com/aws/aws-sdk-cpp/blob/0e6085bf0dd9a1cb1f27d101c4cf2db6ade6f307/src/aws-cpp-sdk-core/source/platform/windows/OSVersionInfo.cpp#L49-L106
13-
1418
private val wordHexFormat = HexFormat {
1519
upperCase = false
1620
number {

0 commit comments

Comments
 (0)