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() {
27 memset(&osvi, 0, sizeof(osvi));
28 osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
30 if (!GetVersionEx(&osvi))
34 sprintf(buf, "%d.%d", (int)osvi.dwMajorVersion, (int)osvi.dwMinorVersion);