diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-10-07 19:33:47 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-10-07 19:33:47 +0000 |
commit | 010bcfa9df31b1a07dcc543eaecca1fdfd353f0f (patch) | |
tree | 87596f084f2fb383a5abe69fda54a531924a5e06 /src | |
parent | 83e119154b672788c9bf959af2a0d394e211ccf9 (diff) | |
download | tor-010bcfa9df31b1a07dcc543eaecca1fdfd353f0f.tar.gz tor-010bcfa9df31b1a07dcc543eaecca1fdfd353f0f.zip |
Win32 compilation/correctness fixes.
svn:r5218
Diffstat (limited to 'src')
-rw-r--r-- | src/common/compat.c | 20 | ||||
-rw-r--r-- | src/win32/orconfig.h | 3 |
2 files changed, 13 insertions, 10 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index 0fc2dc0dda..e54d718c75 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -711,7 +711,7 @@ get_uname(void) { -1, -1, NULL } }; info.dwOSVersionInfoSize = sizeof(info); - GetVersionEx(&info); + GetVersionEx((LPOSVERSIONINFO)&info); if (info.dwMajorVersion == 4 && info.dwMinorVersion == 0) { if (info.dwPlatformId == VER_PLATFORM_WIN32_NT) plat = "Windows NT 4.0"; @@ -727,7 +727,7 @@ get_uname(void) } } if (plat) { - tor_snprtint(uname_result, sizeof(uname_result), "%s %s", + tor_snprintf(uname_result, sizeof(uname_result), "%s %s", plat, info.szCSDVersion); } else { if (info.dwMajorVersion > 6 || @@ -740,26 +740,26 @@ get_uname(void) "Unrecognized version of Windows [major=%d,minor=%d]", (int)info.dwMajorVersion,(int)info.dwMinorVersion); } - if (info.dwProductType == VER_NT_DOMAIN_CONTROLLER) { + if (info.wProductType == VER_NT_DOMAIN_CONTROLLER) { strlcat(uname_result, " [domain controller]", sizeof(uname_result)); - } else if (info.dwProductType == VER_NT_SERVER) { + } else if (info.wProductType == VER_NT_SERVER) { strlcat(uname_result, " [server]", sizeof(uname_result)); - } else if (info.dwProductType == VER_NT_WORKSTATION) { + } else if (info.wProductType == VER_NT_WORKSTATION) { strlcat(uname_result, " [workstation]", sizeof(uname_result)); } - if (info.dwSuiteMask & VER_SUITE_DATACENTER) { + if (info.wSuiteMask & VER_SUITE_DATACENTER) { strlcat(uname_result, " {datacenter}", sizeof(uname_result)); } - if (info.dwSuiteMask & VER_SUITE_ENTERPRISE) { + if (info.wSuiteMask & VER_SUITE_ENTERPRISE) { strlcat(uname_result, " {enterprise}", sizeof(uname_result)); } - if (info.dwSuiteMask & VER_SUITE_PERSONAL) { + if (info.wSuiteMask & VER_SUITE_PERSONAL) { strlcat(uname_result, " {personal}", sizeof(uname_result)); } - if (info.dwSuiteMask & VER_SUITE_EMBEDDED) { + if (info.wSuiteMask & VER_SUITE_EMBEDDEDNT) { strlcat(uname_result, " {personal}", sizeof(uname_result)); } - if (info.dwSuiteMask & VER_SUITE_PERSONAL) { + if (info.wSuiteMask & VER_SUITE_PERSONAL) { strlcat(uname_result, " {personal}", sizeof(uname_result)); } #else diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h index 298584b85f..c38508e3ae 100644 --- a/src/win32/orconfig.h +++ b/src/win32/orconfig.h @@ -125,6 +125,9 @@ /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H +/* Define to 1 if you have the <sys/utime.h> header file. */ +#define HAVE_SYS_UTIME_H + /* Define to 1 if you have the <sys/wait.h> header file. */ #undef HAVE_SYS_WAIT_H |