From: Eric Biggers Date: Sun, 3 Aug 2014 23:41:11 +0000 (-0500) Subject: win32_common.c: Remove code for windows version detection X-Git-Tag: v1.7.1~14 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=969809ef646ec6ceb9730da2eb21884feaff994d;hp=919b97754cedca6f37dd1808b00198dc3cb8bf98 win32_common.c: Remove code for windows version detection This isn't used by anything anymore. --- diff --git a/include/wimlib/win32_common.h b/include/wimlib/win32_common.h index 691af744..8b4a48d4 100644 --- a/include/wimlib/win32_common.h +++ b/include/wimlib/win32_common.h @@ -143,19 +143,6 @@ extern NTSTATUS (WINAPI *func_RtlDosPathNameToNtPathName_U_WithStatus) extern NTSTATUS (WINAPI *func_RtlCreateSystemVolumeInformationFolder) (PCUNICODE_STRING VolumeRootPath); - -extern bool -windows_version_is_at_least(unsigned major, unsigned minor); - -#define running_on_windows_xp_or_later() \ - windows_version_is_at_least(5, 1) - -#define running_on_windows_vista_or_later() \ - windows_version_is_at_least(6, 0) - -#define running_on_windows_7_or_later() \ - windows_version_is_at_least(6, 1) - extern int win32_path_to_nt_path(const wchar_t *win32_path, UNICODE_STRING *nt_path); diff --git a/src/win32_common.c b/src/win32_common.c index 412421ea..48e21468 100644 --- a/src/win32_common.c +++ b/src/win32_common.c @@ -484,20 +484,8 @@ NTSTATUS (WINAPI *func_RtlDosPathNameToNtPathName_U_WithStatus) NTSTATUS (WINAPI *func_RtlCreateSystemVolumeInformationFolder) (PCUNICODE_STRING VolumeRootPath); -static OSVERSIONINFO windows_version_info = { - .dwOSVersionInfoSize = sizeof(OSVERSIONINFO), -}; - static bool acquired_privileges = false; -bool -windows_version_is_at_least(unsigned major, unsigned minor) -{ - return windows_version_info.dwMajorVersion > major || - (windows_version_info.dwMajorVersion == major && - windows_version_info.dwMinorVersion >= minor); -} - struct dll_sym { void **func_ptr; const char *name; @@ -599,9 +587,6 @@ win32_global_init(int init_flags) acquired_privileges = true; } - /* Get Windows version information. */ - GetVersionEx(&windows_version_info); - ret = init_dll(&ntdll_spec); if (ret) goto out_drop_privs;