From b2aaf69e62f4109ffb8aaf39e9bd2571abb29dfb Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Thu, 28 Jun 2012 14:22:07 +0100 Subject: [PATCH] hw/xwin: Report Cygwin version information in log Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison --- hw/xwin/winprocarg.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c index e8cccb4c2..837cdb2f4 100644 --- a/hw/xwin/winprocarg.c +++ b/hw/xwin/winprocarg.c @@ -31,6 +31,10 @@ from The Open Group. #include #endif +#ifdef HAVE_SYS_UTSNAME_H +#include +#endif + #include <../xfree86/common/xorgVersion.h> #include "win.h" #include "winconfig.h" @@ -1181,6 +1185,16 @@ winLogVersionInfo(void) ErrorF("Vendor: %s\n", XVENDORNAME); ErrorF("Release: %d.%d.%d.%d\n", XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP); +#ifdef HAVE_SYS_UTSNAME_H + { + struct utsname name; + + if (uname(&name) >= 0) { + ErrorF("OS: %s %s %s %s %s\n", name.sysname, name.nodename, + name.release, name.version, name.machine); + } + } +#endif if (strlen(BUILDERSTRING)) ErrorF("%s\n", BUILDERSTRING); ErrorF("Contact: %s\n", BUILDERADDR);