diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-07-09 22:29:12 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-07-09 22:29:12 +0000 |
commit | 28a7c8a64cb52189c81ebe31d77e69d1485a8f5f (patch) | |
tree | 82738535c8fdcb5fb5ff03a2959ad54925c0e4e1 | |
parent | a7a1d4e3d35621f048e908093370c7768a431eeb (diff) | |
download | tor-28a7c8a64cb52189c81ebe31d77e69d1485a8f5f.tar tor-28a7c8a64cb52189c81ebe31d77e69d1485a8f5f.tar.gz |
Make compilation work on old MSVCs without GetVertsionEx magic. Patch from Frediano Ziglio.
svn:r6749
-rw-r--r-- | src/common/compat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index a376285a6..9ab5d8fb4 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -768,6 +768,7 @@ get_uname(void) { 3, 51, "Windows NT 3.51" }, { -1, -1, NULL } }; +#ifdef VER_SUITE_BACKOFFICE static struct { unsigned int mask; const char *str; } win_mask_table[] = { @@ -785,6 +786,7 @@ get_uname(void) { VER_SUITE_TERMINAL, " {terminal services}" }, { 0, NULL }, }; +#endif memset(&info, 0, sizeof(info)); info.dwOSVersionInfoSize = sizeof(info); if (! GetVersionEx((LPOSVERSIONINFO)&info)) { @@ -824,6 +826,7 @@ get_uname(void) (int)info.dwMajorVersion,(int)info.dwMinorVersion, info.szCSDVersion); } +#ifdef VER_SUITE_BACKOFFICE if (info.wProductType == VER_NT_DOMAIN_CONTROLLER) { strlcat(uname_result, " [domain controller]", sizeof(uname_result)); } else if (info.wProductType == VER_NT_SERVER) { @@ -843,6 +846,7 @@ get_uname(void) tor_snprintf(uname_result+len, sizeof(uname_result)-len, " {0x%x}", info.wSuiteMask); } +#endif #else strlcpy(uname_result, "Unknown platform", sizeof(uname_result)); #endif |