1 //===- llvm/System/Win32/Host.inc -------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements the Win32 Host support.
12 //===----------------------------------------------------------------------===//
20 std::string sys::osName() {
24 std::string sys::osVersion() {
25 OSVERSIONINFO osvi = { 0 };
26 osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
28 if (!GetVersionEx(&osvi))
32 sprintf(buf, "%d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);