]> wimlib.net Git - wimlib/commitdiff
win32_common.c: Remove code for windows version detection
authorEric Biggers <ebiggers3@gmail.com>
Sun, 3 Aug 2014 23:41:11 +0000 (18:41 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 3 Aug 2014 23:41:52 +0000 (18:41 -0500)
This isn't used by anything anymore.

include/wimlib/win32_common.h
src/win32_common.c

index 691af744c9fc00eb04d4c34957fca98485760177..8b4a48d4c7badf72bad7741d16e158fea6280c0d 100644 (file)
@@ -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);
 
index 412421ea28ce1480cb56bcea651c2b6896e038e4..48e2146855278122048f6e3be789a42240572d3c 100644 (file)
@@ -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;