1
hermetic_cc_toolchain/test/windows/main.c
Motiejus Jakštys 73a9ceccfb
revert "Re-license portions of the code to Apache 2.0" (#35)
This (partially) reverts commit dfdb1f2680
2023-04-19 20:23:25 -04:00

20 lines
490 B
C

// Copyright 2023 Uber Technologies, Inc.
// Licensed under the MIT License
#include <stdio.h>
#include <windows.h>
int main() {
DWORD version = GetVersion();
DWORD majorVersion = (DWORD)(LOBYTE(LOWORD(version)));
DWORD minorVersion = (DWORD)(HIBYTE(LOWORD(version)));
DWORD build = 0;
if (version < 0x80000000) {
build = (DWORD)(HIWORD(version));
}
printf("Running Windows version %d.%d (%d).\n", majorVersion, minorVersion, build);
return 0;
}